|
This is just what I'm looking for, I think I'm going for the ReaderWriterLockSlim as the dictionary will be used mostly for reading with occasional writes.
Thanks a million!
|
|
|
|
|
|
I'm using the .net Settings feature to keep track of user preferences for a click once app.
Problem is that every time I release a update, the settings all reset to default.
(This is because the settings are being stored in the users documents and settings folder under a folder that includes the version number, so when I release and update and increase the version number, the app can no longer find the file to load the settings from, so goes back to the default)
Is there a way to cause it to ignore version numbers and just save the settings in a non version specific folder?
Cheers.
Simon
|
|
|
|
|
The best way is to write specific code to seek the previous versions configuration and import it into the new version. This is because future versions, could in theory, break and not rely on the same configuration information.
Otherwise, just use non-api methods to access folders and pick a good place ... like create a common in your company folder created for the user for the version information.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Thanks Ennis
Ennis Ray Lynch, Jr. wrote: The best way is to write specific code to seek the previous versions configuration and import it into the new version.
Tricky because the folder the config file is stored in looks like some form of hash combined with part of the assembly name. I don't know the rules for generating this path.
Ennis Ray Lynch, Jr. wrote: This is because future versions, could in theory, break and not rely on the same configuration information.
Thats fair enough, I can kind of understand why MS didn't just make it work. Weirdly though, I wrote quick test app to make sure it wasn't something wrong with my code, and it behaved as I described (settings reset after version increase). But then I went back to it after writing the post, and now it works fine settings are maintained between version increases exactly as I want them to be.
Ennis Ray Lynch, Jr. wrote: Otherwise, just use non-api methods to access folders and pick a good place ... like create a common in your company folder created for the user for the version information.
Yeah, I thought about doing this, but it feels like going back to the old .ini file way of doing things. I thought 'settings' was supposed to remove the need for doing messy things like this.
Simon
|
|
|
|
|
You should be able to use the Upgrade() method available with the built-in settings to "upgrade" the user.config created with your new revision with the settings from your old revision. You don't have to worry about where the old user.config is located.
I typically create an 'ApplicationVersion' setting which I compare to Application.ProductVersion each time a program starts to run. When they are no longer equal, I use the Upgrade() method to ensure my settings get brought over from the prior version's last known settings. For example...
if (MyApp.Properties.Settings.Default.ApplicationVersion != Application.ProductVersion)
{
MyApp.Properties.Settings.Default.Upgrade();
MyApp.Properties.Settings.Default.ApplicationVersion = Application.ProductVersion;
MyApp.Properties.Settings.Default.Save();
}
Something like that will hopefully work for you.
|
|
|
|
|
Brilliant. Thanks
I'll try it out when I'm back in work tomorrow.
(Although, like I said in my other post, it suddenly seems to be just working now although I'm sure it shouldn't be.)
Cheers
Simon
|
|
|
|
|
Hello!
I have a datagridview consisting of two columns and many rows. One of the columns consists of texboxes and one of comboboxes.
Sometimes the user wants to select many of the rows and change either the textboxvalue or the combobox value for all the selected rows.
Is it possible to do this in a sample manner?
|
|
|
|
|
|
No, it's a C# windows application.
|
|
|
|
|
it can be done if the user hold the CTRL key while clicking on the rows
or by clicking a row and dragging it...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Yes, I manage to select several rows but I can't change the values for all of the selected rows.
|
|
|
|
|
youll have to foreach them... somethink like this
foreach(DataRow myRow in DataGridView.SelectedRows)
{
}
changing the data in these rows are not as straight forward as it seems... have you been able to do that with just one row?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
We have developed an application and published it. In application we have implimented scanners and camera(Canon Power Shot A640). When we published it was throwing some error as scanner dll is missing. So we pasted all dll's in server where we have published. Scanner Error was solved.
After this app was opening and when we cliked on camera module it is giving error PRSDK.dll is unable to load. after this when we click any button in this screen it is showing unable to load CDSDK.dll.
Please any one help in solving this...
How to include PRSDK.dll n CDSDK.dll while publishing?????
And one more thing while developing this application we have reffered these dll's from bin folder.
waiting for ur reply's.....
Rashmi.M.K
|
|
|
|
|
Did you verify for both DLL whether it exist or not in your system ?
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Ya it exists. Even we have copied our existing dll's to static IP system. But still not able to solve Prob....
Rashmi.M.K
|
|
|
|
|
Do the dlls need registering?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Ya. What ever dll's we are using, all those are registered dll's which we got from Canon Company...
Rashmi.M.K
|
|
|
|
|
Do someone know how to send file from pc to other while each one is connected to a modem only in c# .
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
It should work the exact same way. Look-up the protocol windows is using for the communication and then use the associated socket implementation in C#.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I have created parameter fields in Crystal Reports using Field Explorer, and everytime I execute my program, a prompt appears asking for the parameter values.........instead I want it to be loaded directly from the user defined Combobox selection...........pls help..........TIA
|
|
|
|
|
|
...Unless you want me to wave my "virtual internet knife" at you again
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
i didnt get a solution for this yet and i'm still scratching my head for this.........if u wanna share something abt this..........pls go ahead........TIA...........
|
|
|
|
|
dude, you have much to learn about these forums...
if you didnt get an answer then no one here has it... double AND cross posting is concidered rude!
FACT: there arent many people who are experts on crystal reports and the resources on the web are limited.
SOLUTION TO YOUR PROBLEM: - seriously, not trying to be sarcastic i did this a few weeks back
buy a book on crystal reports
im stil waiting for my book so im unable to help with this problem
good luck
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|