Click here to Skip to main content
15,914,594 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Open Source Application with good OO Design Pin
Christian Graus10-Apr-08 1:52
protectorChristian Graus10-Apr-08 1:52 
GeneralRe: Open Source Application with good OO Design Pin
papadimitriou10-Apr-08 4:58
papadimitriou10-Apr-08 4:58 
GeneralRe: Open Source Application with good OO Design Pin
lonforce11-Apr-08 0:49
lonforce11-Apr-08 0:49 
QuestionHow to properly pre-load assemblies (in background) to prevent delay on first use? Pin
User 32754409-Apr-08 23:17
User 32754409-Apr-08 23:17 
AnswerRe: How to properly pre-load assemblies (in background) to prevent delay on first use? Pin
led mike10-Apr-08 5:06
led mike10-Apr-08 5:06 
GeneralRe: How to properly pre-load assemblies (in background) to prevent delay on first use? Pin
User 327544013-Apr-08 21:11
User 327544013-Apr-08 21:11 
QuestionHow to modify the aseembly Pin
sujithkumarsl9-Apr-08 18:35
sujithkumarsl9-Apr-08 18:35 
GeneralUsing "Settings.settings" files with multiple assemblies (a windows service and a windows form config app) Pin
blak3r9-Apr-08 2:42
blak3r9-Apr-08 2:42 
I developed a program which monitors a web service and upon certain events it would do a task. Initially, it was a Windows Form application which consisted of:
1) a Timer which performed business logic
2) a Settings1.settings files
3) A simple GUI which was mainly a PropertyGrid which was bound to the Settings file.

(By Settings file i mean the built in Settings file creator which has VS designer support that lets you specify user or application scope).

The application worked perfect. The business logic that executed when the Timer elapsed made use of the Settings1.settings.

Then, i refactored the business logic into an independent class (note in the same project as the Windows Form, Settings1.settings) which is called through a Windows Service Object. I kept the Windows Form application as a means to allow the user to change the settings.

But, now since each project is effectively it's own assembly. The changes made in the GUI aren't reflected in the windows service.

The Windows Form Project creates a local user configuration file where the service creates one for the "Default User". I found that i after i modify the settings in the windows form... i could copy the generated user.config file as shown below to bring the new settings into the windows service:

COPY the user.config file from:
C:\Documents and Settings\blake\Local Settings\Application Data\MyCompanyName\\eEASAlertServiceActivator_Url_i10wwnu40dieoj2szfvkyaqsxsafbbhj\2.1.2.14

TO:
C:\Documents and Settings\Default User\Local Settings\Application Data\MyCompanyName\eEASAlertServiceActivator_Url_qfzoqgk0ecwshk1ztshws5yghp51pxoc\1.1.3.4


I'm wondering what is the best practice to go from here. I like using Settings.settings file for the following reasons:
1) you get VS Designer support
2) ability to use PropertyGrid's which provide an extremely fast way of allowing users to update the settings.
3) Very simple to access "string s = Settings1.Default.MyString;"

Is there anyway that you specify the file path that the settings are read from? I looked at other solutions on code project and the alternatives don't seem to have 1, 2, or 3.

My research suggests that there isn't such a solution... which is frustrating because if only the generated Settings class had a .Save( <filepath>) and .Load( <filepath> ) it would be perfect for what i wanted to do.

Thanks In Advance,
~blake

http://www.blakerobertson.com

GeneralRe: Using "Settings.settings" files with multiple assemblies (a windows service and a windows form config app) Pin
led mike9-Apr-08 4:56
led mike9-Apr-08 4:56 
GeneralRe: Using "Settings.settings" files with multiple assemblies (a windows service and a windows form config app) Pin
blak3r9-Apr-08 6:42
blak3r9-Apr-08 6:42 
GeneralRe: Using "Settings.settings" files with multiple assemblies (a windows service and a windows form config app) Pin
blak3r14-Apr-08 16:27
blak3r14-Apr-08 16:27 
GeneralIntegrating Google Earth to my "windows application" Pin
Member 38458158-Apr-08 23:23
Member 38458158-Apr-08 23:23 
GeneralRe: Integrating Google Earth to my "windows application" Pin
led mike9-Apr-08 4:51
led mike9-Apr-08 4:51 
GeneralIntegrating Google Earth to my "windows application" Pin
Member 38458159-Apr-08 19:00
Member 38458159-Apr-08 19:00 
GeneralMaximum connection between client and remoting server. Pin
manikandanid8-Apr-08 19:18
manikandanid8-Apr-08 19:18 
GeneralRe: Maximum connection between client and remoting server. Pin
Dave Kreskowiak9-Apr-08 6:42
mveDave Kreskowiak9-Apr-08 6:42 
GeneralRe: Maximum connection between client and remoting server. Pin
manikandanid9-Apr-08 22:32
manikandanid9-Apr-08 22:32 
GeneralRe: Maximum connection between client and remoting server. Pin
Dave Kreskowiak10-Apr-08 1:46
mveDave Kreskowiak10-Apr-08 1:46 
GeneralSystem.IO.Ports.SerialPort memory issue on WINCE 5.0 device using .Net CF 3.5 Pin
SeanBryant8-Apr-08 14:16
SeanBryant8-Apr-08 14:16 
GeneralRe: System.IO.Ports.SerialPort memory issue on WINCE 5.0 device using .Net CF 3.5 Pin
Luc Pattyn8-Apr-08 14:39
sitebuilderLuc Pattyn8-Apr-08 14:39 
QuestionDiscover private key with value and hashed value? Pin
Mark J. Miller8-Apr-08 4:43
Mark J. Miller8-Apr-08 4:43 
GeneralRe: Discover private key with value and hashed value? Pin
Dave Kreskowiak8-Apr-08 7:11
mveDave Kreskowiak8-Apr-08 7:11 
GeneralRe: Discover private key with value and hashed value? Pin
Mark J. Miller8-Apr-08 7:17
Mark J. Miller8-Apr-08 7:17 
GeneralRe: Discover private key with value and hashed value? Pin
Dave Kreskowiak8-Apr-08 8:10
mveDave Kreskowiak8-Apr-08 8:10 
GeneralRe: Discover private key with value and hashed value? Pin
Mark J. Miller8-Apr-08 8:18
Mark J. Miller8-Apr-08 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.