Skip to content

Commit

Permalink
Added a new private method ShowMainForm() to the Program class.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Nov 5, 2024
1 parent 02c619b commit ca1a4b7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/kbhelper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ private static void CheckLibrary()
}
}

/// <summary>
/// Initializes and shows the main form of the application.
/// </summary>
private static void ShowMainForm()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmKBHelper());
}

/// <summary>
/// The main entry point for the application.
/// </summary>
Expand All @@ -43,9 +53,7 @@ private static void Main()
{
if (Mtx.WaitOne(0, false))
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmKBHelper());
ShowMainForm();
}
else
{
Expand Down

0 comments on commit ca1a4b7

Please sign in to comment.