|I'm working on a WPF app that we now want to have a 'Test Mode'.
Right now, I have an 'IsTestMode' property in the app.config. If I set it to True, then the login window's border is red, and there's a red TEST MODE banner across the top of the main window. The Test Mode copy is installed in a different location then the production copy.
In the code behind of the Main Window I have:
Uri iconUri = null;
iconUri = new Uri("my_test.ico", UriKind.Relative);
iconUri = new Uri("my.ico", UriKind.Relative);
this.Icon = BitmapFrame.Create(iconUri);
This changes the Taskbar Icon, not the desktop icon
This all works fine.
Now I want to add an installer project, but I'm stuck on how to make the Test Mode changes during installation. I'd like to do the following during installation and not let the user change them:
Can anyone shed some light on how to do this?
- Set the installation location
- Set the IsTestMode setting
- Change the desktop icon.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
modified 19-Jul-21 15:14pm.