Updated minimise checkbox to also boot

Made the MainForm's minimise checkbox also
start DisplayMagician on boot.
This commit is contained in:
Terry MacDonald 2021-04-23 17:41:59 +12:00
parent d7dad2e864
commit 719c7f3350
3 changed files with 23 additions and 7 deletions

View File

@ -190,6 +190,7 @@
// //
resources.ApplyResources(this.notifyIcon, "notifyIcon"); resources.ApplyResources(this.notifyIcon, "notifyIcon");
this.notifyIcon.ContextMenuStrip = this.mainContextMenuStrip; this.notifyIcon.ContextMenuStrip = this.mainContextMenuStrip;
this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);
// //
// mainContextMenuStrip // mainContextMenuStrip
// //

View File

@ -68,6 +68,14 @@ namespace DisplayMagician.UIForms
allowVisible = true; allowVisible = true;
// Really close the application when the form is closed // Really close the application when the form is closed
allowClose = true; allowClose = true;
}
if (Program.AppProgramSettings.MinimiseOnStart && Program.AppProgramSettings.StartOnBootUp)
{
cb_minimise_notification_area.Checked = true;
}
else
{
cb_minimise_notification_area.Checked = false; cb_minimise_notification_area.Checked = false;
} }
@ -320,6 +328,7 @@ namespace DisplayMagician.UIForms
allowClose = false; allowClose = false;
// Enable the MinimiseOnStart setting // Enable the MinimiseOnStart setting
Program.AppProgramSettings.MinimiseOnStart = true; Program.AppProgramSettings.MinimiseOnStart = true;
Program.AppProgramSettings.StartOnBootUp = true;
// Change the exit_button text to say 'Close' // Change the exit_button text to say 'Close'
btn_exit.Text = "&Close"; btn_exit.Text = "&Close";
} }
@ -331,6 +340,7 @@ namespace DisplayMagician.UIForms
allowClose = true; allowClose = true;
// Disable the MinimiseOnStart setting // Disable the MinimiseOnStart setting
Program.AppProgramSettings.MinimiseOnStart = false; Program.AppProgramSettings.MinimiseOnStart = false;
Program.AppProgramSettings.StartOnBootUp = false;
// Change the exit_button text to say 'Exit' // Change the exit_button text to say 'Exit'
btn_exit.Text = "&Exit"; btn_exit.Text = "&Exit";
@ -475,5 +485,10 @@ namespace DisplayMagician.UIForms
string targetURL = @"https://github.com/sponsors/terrymacdonald"; string targetURL = @"https://github.com/sponsors/terrymacdonald";
System.Diagnostics.Process.Start(targetURL); System.Diagnostics.Process.Start(targetURL);
} }
private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
{
openApplicationWindow();
}
} }
} }

View File

@ -10837,7 +10837,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbl_create_shortcut.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbl_create_shortcut.Location" type="System.Drawing.Point, System.Drawing">
<value>282, 245</value> <value>282, 247</value>
</data> </data>
<data name="lbl_create_shortcut.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbl_create_shortcut.Size" type="System.Drawing.Size, System.Drawing">
<value>222, 22</value> <value>222, 22</value>
@ -10879,16 +10879,16 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="cb_minimise_notification_area.Location" type="System.Drawing.Point, System.Drawing"> <data name="cb_minimise_notification_area.Location" type="System.Drawing.Point, System.Drawing">
<value>234, 353</value> <value>162, 356</value>
</data> </data>
<data name="cb_minimise_notification_area.Size" type="System.Drawing.Size, System.Drawing"> <data name="cb_minimise_notification_area.Size" type="System.Drawing.Size, System.Drawing">
<value>332, 20</value> <value>460, 20</value>
</data> </data>
<data name="cb_minimise_notification_area.TabIndex" type="System.Int32, mscorlib"> <data name="cb_minimise_notification_area.TabIndex" type="System.Int32, mscorlib">
<value>5</value> <value>5</value>
</data> </data>
<data name="cb_minimise_notification_area.Text" xml:space="preserve"> <data name="cb_minimise_notification_area.Text" xml:space="preserve">
<value>Start DisplayMagician minimised in notification area</value> <value>Start DisplayMagician minimised in notification area when computer starts</value>
</data> </data>
<data name="&gt;&gt;cb_minimise_notification_area.Name" xml:space="preserve"> <data name="&gt;&gt;cb_minimise_notification_area.Name" xml:space="preserve">
<value>cb_minimise_notification_area</value> <value>cb_minimise_notification_area</value>
@ -10912,7 +10912,7 @@
<value>Microsoft Sans Serif, 9.75pt</value> <value>Microsoft Sans Serif, 9.75pt</value>
</data> </data>
<data name="lbl_version.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbl_version.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 354</value> <value>12, 357</value>
</data> </data>
<data name="lbl_version.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbl_version.Size" type="System.Drawing.Size, System.Drawing">
<value>25, 16</value> <value>25, 16</value>
@ -10948,7 +10948,7 @@
<value>Microsoft Sans Serif, 21.75pt</value> <value>Microsoft Sans Serif, 21.75pt</value>
</data> </data>
<data name="btn_setup_game_shortcuts.Location" type="System.Drawing.Point, System.Drawing"> <data name="btn_setup_game_shortcuts.Location" type="System.Drawing.Point, System.Drawing">
<value>212, 172</value> <value>212, 174</value>
</data> </data>
<data name="btn_setup_game_shortcuts.Size" type="System.Drawing.Size, System.Drawing"> <data name="btn_setup_game_shortcuts.Size" type="System.Drawing.Size, System.Drawing">
<value>360, 50</value> <value>360, 50</value>
@ -10981,7 +10981,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="btn_exit.Location" type="System.Drawing.Point, System.Drawing"> <data name="btn_exit.Location" type="System.Drawing.Point, System.Drawing">
<value>700, 350</value> <value>700, 353</value>
</data> </data>
<data name="btn_exit.Size" type="System.Drawing.Size, System.Drawing"> <data name="btn_exit.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value> <value>75, 23</value>