Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="newUserWindow"/> class.
 /// </summary>
 public newUserWindow()
 {
     InitializeComponent();
     if (GlobalProperties.getDarkMode() == true)
     {
         this.Theme = MetroFramework.MetroThemeStyle.Dark;
     }
     else if (GlobalProperties.getDarkMode() == false)
     {
         this.Theme = MetroFramework.MetroThemeStyle.Light;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Handles the CheckedChanged event of dark mode in the entire application.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void metroToggle1_CheckedChanged(object sender, EventArgs e)
 {
     GlobalProperties.setDarkMode(metroToggle1.Checked);
     if (GlobalProperties.getDarkMode() == true)
     {
         this.Theme = MetroFramework.MetroThemeStyle.Dark;
     }
     else if (GlobalProperties.getDarkMode() == false)
     {
         this.Theme = MetroFramework.MetroThemeStyle.Light;
     }
 }