Skip to content

Commit

Permalink
Reduce complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
fahminlb33 committed Jun 13, 2020
1 parent 22946a3 commit 01e0e1f
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/KFmaintenance/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,25 @@ static void Main()
using (var mutex = new Mutex(true, MutexName))
{
if (mutex.WaitOne(MutexTimeout))
{
// install modules
Container.Install(new AppModulesInstaller());

// enable TLS;
Helpers.EnableTls();

// app exit handler
Application.ApplicationExit += Application_ApplicationExit;

// bootstrap
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(Container.Resolve<CustomApplicationContext>());
}
else
{
MessageBox.Show(Resources.SingleInstanceMessage, Resources.AppName,
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}

// install services
Container.Install(new AppModulesInstaller());

// enable TLS;
Helpers.EnableTls();

// app exit handler
Application.ApplicationExit += Application_ApplicationExit;

// bootstrap
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(Container.Resolve<CustomApplicationContext>());
}
}

Expand Down

0 comments on commit 01e0e1f

Please sign in to comment.