Skip to content

448 allow only 1 instance setting does nothing - #455

Closed
Hirogen wants to merge 9 commits into
Developmentfrom
448-allow-only-1-instance-setting-does-nothing
Closed

Hirogen wants to merge 9 commits into
Developmentfrom
448-allow-only-1-instance-setting-does-nothing

Conversation

@Hirogen

@Hirogen Hirogen commented Jul 21, 2025

Copy link
Copy Markdown
Member

Rework of Allow only one Instance

Lock Instance and "Allow only one Instance" have similar functionality, will be moved together

@Hirogen Hirogen linked an issue Jul 21, 2025 that may be closed by this pull request
dlg.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
OpenFileDialog dlg = new()
{
InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)

Copy link
Copy Markdown
Contributor

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))

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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
};

Hirogen and others added 6 commits September 6, 2025 20:11
…s-nothing

# Conflicts:
#	src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs
#	src/LogExpert.UI/Dialogs/SettingsDialog.cs
#	src/LogExpert/Program.cs
…s-nothing

# Conflicts:
#	src/LogExpert.Core/Interface/ILogTabWindow.cs
#	src/LogExpert.UI/Dialogs/AboutBox.cs
#	src/LogExpert.UI/Dialogs/AllowOnlyOneInstanceErrorDialog.cs
#	src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs
#	src/LogExpert.UI/Dialogs/SettingsDialog.cs
#	src/LogExpert/Classes/LogExpertProxy.cs
#	src/LogExpert/Program.cs
…s://github.com/LogExperts/LogExpert into 448-allow-only-1-instance-setting-does-nothing

# Conflicts:
#	src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs
#	src/LogExpert.UI/Dialogs/SettingsDialog.cs
#	src/LogExpert/Program.cs
…s-nothing

# Conflicts:
#	src/LogExpert/Program.cs
Comment thread src/LogExpert/Program.cs Fixed
Comment thread src/LogExpert/Program.cs Fixed
Comment thread src/LogExpert/Program.cs Fixed
…s-nothing

# Conflicts:
#	src/LogExpert/Program.cs
Comment thread src/LogExpert/Program.cs

_logger.Info(CultureInfo.InvariantCulture, $"\r\n============================================================================\r\nLogExpert {Assembly.GetExecutingAssembly().GetName().Version.ToString(3)} started.\r\n============================================================================");

CancellationTokenSource cts = new();
Comment thread src/LogExpert/Program.cs
ConfigManager.Instance);

// first instance
var wi = WindowsIdentity.GetCurrent();
Comment thread src/LogExpert/Program.cs
{
try
{
var wi = WindowsIdentity.GetCurrent();
@Hirogen Hirogen closed this Nov 27, 2025
@Hirogen
Hirogen deleted the 448-allow-only-1-instance-setting-does-nothing branch November 27, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Allow only 1 Instance" setting does nothing

2 participants