|
Is this book also good if I'm going with WinForms Controls instead of ASP.Net Server Controls ?
|
|
|
|
|
|
Thank you!
I will try the first one
Cheers Chris
|
|
|
|
|
Hi,
I have created some settings file other than the main Settings.settings within my C# Win project. Before I used to see that, all new varaibles of all other settings files are being saved in the app.config file as an serializable XML. But in the past few days, I faced a problem with Configuration manager and I used to get error message "Configuration manager failed to load". After hassling for a while I found that, once I changed my project folder's name, the "Configuration manager error gone." but Now, I dont see the new variables in the app.config file any more. yet the settings vars are being saved in my computer somehow somewhere... I dont have any idea where are they being saved. I am worrid thinking that, if I ship my software to my client's pc, will it work in the same way by saving the settings variable somewhere in the PC without saving in app.config ?
Thanks and regards
Emran
|
|
|
|
|
Each project has a different settings file, make sure you are looking into the right one.
Other than that, as you already know, settings are always stored as XML, cant think of any other place they are stored in.
Hope that helps
|
|
|
|
|
Application setting persistence is thorougly described in "Application Settings Architecture" MSDN article (http://msdn2.microsoft.com/en-us/library/8eyb2ct1(VS.80).aspx), though, to say in short, they are stored in two parts: application-scope settings are stored in app.exe.config file that should be in the application folder, user-scope settings are stored in local user profile %InstallRoot%\Documents and Settings\username\Local Settings\Application data\CompanyName\ProductName\ProductVersion. The key thing is that this storage depends not only on product-name but on product build either. So, if you will leave apllication build number as it is set by default (1.0.*) or will change build number yourself location will change after build and your settings will be lost because they automatically migrate only when you use ClickOnce application deployment. Therefore you have to create your own settings migration mechanism or your own custom provider for settings storage to control your settings completely.
|
|
|
|
|
Hi,
Thanks for your reply.
I have gone thru the article you provided (MSDN) and I realized that the User Scope application settings are stored in the User's profile path returned by System.Windows.Forms.Application.LocalUserAppDataPath.
Now, it will be an issue to pack this item into a single installer as I am not using "click Once", how can I instruct my application to load and save user scoped settings.config file in the same Application.StartupPath ?
Regards
emran
|
|
|
|
|
Well, I'm afraid I cannot be much help to you. I can say that LocalFileSettingsProvider is a bit of a tough job after I looked through its source. It can be reproduced of course but there is a hell lot of work to do.
To be honest I use standard application settings only for a small stuff like window positions - even if they are lost it doesn't make much trouble and can be replaced by reasonable defaults. As for serious things, global settings that persist from version to version and all that I use the same strategy as with common data files - I simply choose the convenient location and put my settings there using simple Dictionary object to store them and serialize/deserialize manually with somthing like SoapFormatter. After all ApplicationSettingsBase is a simple dictionary wrapper too.
Regards, Oleg.
|
|
|
|
|
How to download file from FTPsite in asynchronous way?
Please help me.
|
|
|
|
|
You can use the System.NET.FtpWebRequest to request files from an FTP site. You can use the FtpWebRequest.BeginGetResponse to do this asynchronously.
|
|
|
|
|
Hi,
I am generating product key in the form of ; XXXXX-XXXXX-XXXXX-XXXXX
I want to generate unique serial key related to this product key.
I'd be so glad if someone help me.
Thank you in advance.
|
|
|
|
|
Guid.NewGuid().ToByteArray() will give you 16 bytes.
|
|
|
|
|
But,
GUID will generate RANDOM string, that will NOT related to my product key.
Thank you.
|
|
|
|
|
I don't understand, then, what you're trying to do. You want a product key, I gave you a piece of code to generate one. Are you saying you want to validate that? If so, validate with a server? Or just some special crafted key that is either valid or invalid?
|
|
|
|
|
Check google for Elliptic Curve Cryptography
|
|
|
|
|
This is definately what I'm looing for...
Thank you so much...
|
|
|
|
|
Hi
Have never done such a thing, but you could just run a for loop with an ID and then hash it.
<br />
for(int i = ID; ID < limit; ID++)<br />
{<br />
string hash = ID.gethash().toString();<br />
<br />
hash = hash.gethash().toString();<br />
<br />
}<br />
Not pretty, but it would work.
|
|
|
|
|
Well your code give me some ideas for doing that.
Thank you so much.
I'll test this now...
|
|
|
|
|
How to call the hhctrl.ocx and execute a file such as .hlp,.htm?
Thanks.
K.Alex
|
|
|
|
|
Why bother, there are some classes built into .NET to do this for you. I think anyway, never bothered much with help.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
|
I want to find out if an excel file (Let us say "c:\ABCD.xls")is currently open.
I am using c# and Excel Interop.
Thanks
Abhishek
|
|
|
|
|
Try to open the file exclusively. If an exception is returned, it's in use.
|
|
|
|
|
i have a listview in my program and whenever the item is checked or unchecked i want certain things to happen. how can i accomplish this without the item checked event handler taking over every time i add an item to the listview?
|
|
|
|
|
numbers1thru9 wrote: i have a listview in my program and whenever the item is checked or unchecked i want certain things to happen. how can i accomplish this without the item checked event handler taking over every time i add an item to the listview?
Those statements contradict each other. Unless you mean that the CheckChanged or what ever it's called event is being fired when you add an item to the list view?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|