-
Couldn't load subscription status.
- Fork 180
448 allow only 1 instance setting does nothing #455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Development
Are you sure you want to change the base?
448 allow only 1 instance setting does nothing #455
Conversation
| dlg.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); | ||
| OpenFileDialog dlg = new() | ||
| { | ||
| InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you didn't do this change but why is the initial folder Program Files?
| }; | ||
|
|
||
| if (string.IsNullOrEmpty(textBox.Text) == false) | ||
| if (!string.IsNullOrEmpty(textBox.Text)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think IsNullOrWhiteSpace is better here
| { | ||
| Preferences.SaveLocation = SessionSaveLocation.SameDir; | ||
| } | ||
| Preferences.SaveLocation = radioButtonsessionSaveDocuments.Checked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is another option. See if you like it:
Preferences.SaveLocation = radioButtonsessionSaveDocuments.Checked switch
{
true => SessionSaveLocation.DocumentsDir,
_ when radioButtonSessionSaveOwn.Checked => SessionSaveLocation.OwnDir,
_ when radioButtonSessionApplicationStartupDir.Checked => SessionSaveLocation.ApplicationStartupDir,
_ => SessionSaveLocation.SameDir
};
Rework of Allow only one Instance
Lock Instance and "Allow only one Instance" have similar functionality, will be moved together