|
I think you are confused about the various types of settings.
There are USER SPECIFIC settings which are, you guessed it , specific to each user. These are things like window layouts, fonts, colors, option checkboxes, usernames, passwords, etc.
There are also APPLICATION SPECIFIC settings which are global application settings. These may OR MAY NOT be changed by the user.
It sounds like you are trying to jam APPLICATION SPECIFIC (that may NOT be changed) into the USER SPECIFIC settings infrastructure which is why you are not liking the result.
Use the application specific / read-only infrastructure instead. Store your configuration settings in the app.config file. Configuration \ AppSettings.
|
|
|
|
|
The settings need to be changeable via the application (so can't be application specific). They need to be in effect a mid point between application and user specific (computer specific?). It seams so simple years ago a simple .ini file would do this, even they registry can do this (though in a far more complex way) and now with .net you can't. It looks like a big step in the wrong direction yet again by microsoft with them trying to stop users (and programmers) being able to use their computers how they want.
|
|
|
|
|
Boris The Bold wrote: It looks like a big step in the wrong direction yet again by microsoft with them trying to stop users (and programmers) being able to use their computers how they want.
Ah, so you think that making the OS more secure is bad practice. It's thinking like this that makes Linux users mock Windows users.
If you want to be able to manage and administer your application to save application specific configuration, it's a simple matter to roll your own mechanism. All you need to do is create a file that represents the settings you want to save, and then serialize that out to a directory that sits under:
Environment.GetEnvironmentVariable(Environment.SpecialFolder.CommonApplicationData))
|
|
|
|
|
I'm sorry that came out a bit stronger than I meant.
It's just that I think that the person who bought the computer should control how and what they can do on it and not Microsoft.
It looks as it I will have to implement my own application settings system.
|
|
|
|
|
Boris The Bold wrote: I think that the person who bought the computer should control how and what they can do on it and not Microsoft.
Microsoft were slammed repeatedly for allowing this. They finally learnt their lessons and made the OS a whole lot more secure.
|
|
|
|
|
I would like to know who to accomplish the following goal using an existing C# 2008 desktop application.
I would like to take the C# run time input and output parameters and possibly put the calls into a batch file and or with some method you recommend. Here are the following I would like to complete:
1. I would like to run the C# 2008 desktop application and give it input parameters. (This is how the program currently runs.)
2. I would then like to wait for a response from the C# 2008 desktop application before proceeding to the next step. (The program needs to
wait since it is calling a web service and loading documents to the web service.) I need to make certain the response code call to the web service = 0.
3. Next step depending upon the response from the web service.
a. If the response from the web service = 0, then the C# 2008 desktop application is called again with parameters to close out the customer account on the web service.
Also under this step, the results for the second call to the desktop application should be displayed in a message the user can see.
b. If the response from the web service not = 0, then a message should be displayed to the user stating what the problem is. No further call is made.
Thus can you show me code and/or point me to a reference on how to accomplish this goal?
|
|
|
|
|
I would save configuration to an xml file, and then read from that. If it is real simple you can use an ini file, but that is probably considered obsolete.
|
|
|
|
|
Can you show me code on how to read the xml file? Would I write some C#.net code? Would I use a dos bat file to read the xml file? If so, how would you have the dos promnpt command read the xml file?
|
|
|
|
|
|
All of the different steps can be accomplished without restarting the program. Start with the input parameters as required and then use the results of the webservice to decide whether the program terminates or requests further input and restarts. The actual design will depend on how the input parameters are to be passed to the program.
Use the best guess
|
|
|
|
|
If you want to access functionality of your C# program from some kind of script, you may want to have a look at the Application Framework (namespace Microsoft.Samples.ApplicationFramework): that allows for sending requests to a running application.
|
|
|
|
|
dcof wrote: using an existing C# 2008 desktop application.
All of this depends on what the application does. Specifically HOW does the application take "input"? HOW does the application provide "output"?
|
|
|
|
|
I want code for video streaming in c#
can you help me
|
|
|
|
|
Talal H.Daoud wrote: can you help me
No, not without a more specific question. We can't give you the code for your whole project. You need to tell us what you've tried already and ask why that didn't work.
|
|
|
|
|
You need to be more specific. Do you want to create a windows app or a web app?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Are you creating the stream server or the client side?
|
|
|
|
|
|
I would like to write a program of Fibonacci sequence.
F0=0;
F1=1;
F2=F0+F1;
F3=F1+F2;
.
.
Fn=Fn-1 + Fn-2
Like this.
And for sure, I know that I have to use recursive algorithm to do this.
But this is first time to make this kind of program.
So could someone help me out?
|
|
|
|
|
|
It's a homework assignment - that's why we're getting them now.
|
|
|
|
|
harold aptroot wrote: Why?
It's obvious: infinite recursion is more fun than anything with a wimpy limit on the number of iterations!
Factorials are supposed to end, which spoils the fun of blowing the top off the stack.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Blow the top off the stacked what?
|
|
|
|
|
OriginalGriff wrote: Factorials are supposed to end
Suffering from BDS again? (Bacon Deprivation Syndrom)
What am I missing here?
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Factorials are the "normal" example given to students to teach them recursion:
!n == n * !(n - 1) where n > 1 So factorials are naturally limiting - whatever finite number you start with, there is a termination to the sequence. (And never mind that recursion is a poor way to implement it anyway)
Fibonacci numbers on the other hand are different:
Fn = F(n-1) + F(n-2) Where F0 = 0, and F1 = 1 So instead of decreasing towards a limit, Fibonacci numbers increase to towards infinity, with no limiting condition at all to terminate them. That makes them a poor candidate for recursion, because unless an artificial outside limit such as "n < 1000" is applied as well, the recursion continues indefinitely, and the stack is compromised.
Another very poor implementation!
Thinking on this before I posted, I realised that I was wrong: the only practical way to write Fibonacci sequences as recursive functions means providing the limit first, and then calculating all the values before it, in much the same way as a factorial would be - I was thinking of it in terms of calculating the sequence from the start, without providing a limit: the sensible way since it doesn't duplicate work!
As a result, I was wrong, the stack won't self destruct.
It's still a silly recursion example though!
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
OriginalGriff wrote: Thinking on this before I posted, I realised that I was wrong
Are you properly baconized? I hope there isn't another shortage on the horizon.
We all know that'll wreak havoc on your otherwise exceptional abilities.
(Which would indeed be expected from every bacon afficinado under such dire circumstances.)
OriginalGriff wrote: It's still a silly recursion example though!
Agreed!
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|