Пример #1
0
 /*
  *              This timer is required for Reading The Settings for the 2 icon Events for when Elsword is running or not.
  *              What this should do is make it actually work and read in a timely manner using global variables to compare the 2 values if not the same change
  *              the used global variable and set it accordingly.
  */
 void Timer5_Tick(object sender, EventArgs e)
 {
     showintaskbar_tempvalue  = settingsini.Read("Settings.ini", "IconWhileElsNotRunning");
     showintaskbar_tempvalue2 = settingsini.Read("Settings.ini", "IconWhileElsRunning");
     if (!Classes.ExecutionManager.RunningElswordDirectly)
     {
         if (showintaskbar_value != showintaskbar_tempvalue)
         {
             showintaskbar_value = showintaskbar_tempvalue;
         }
         TaskbarShow?.Invoke(this, new Classes.ShowTaskbarEvent(showintaskbar_value));
     }
     else
     {
         if (showintaskbar_value2 != showintaskbar_tempvalue2)
         {
             showintaskbar_value2 = showintaskbar_tempvalue2;
         }
         TaskbarShow?.Invoke(this, new Classes.ShowTaskbarEvent(showintaskbar_value2));
     }
 }
Пример #2
0
 private void CheckSettings(object sender, System.EventArgs e)
 {
     if (end_settings_loop)
     {
         SettingsTmr.Enabled = false;
     }
     else
     {
         if (AbleToClose())
         {
             Classes.SettingsFile.Settingsxml.ReopenFile();
             showintaskbar_tempvalue  = Classes.SettingsFile.Settingsxml.Read("IconWhileElsNotRunning");
             showintaskbar_tempvalue2 = Classes.SettingsFile.Settingsxml.Read("IconWhileElsRunning");
             ElsDir_temp = Classes.SettingsFile.Settingsxml.Read("ElsDir");
             if (!string.Equals(ElsDir, ElsDir_temp))
             {
                 ElsDir = ElsDir_temp;
             }
             if (!Classes.ExecutionManager.GetRunningElswordDirectly())
             {
                 if (showintaskbar_value != showintaskbar_tempvalue)
                 {
                     showintaskbar_value = showintaskbar_tempvalue;
                 }
                 TaskbarShow?.Invoke(this, new Classes.ShowTaskbarEvent(showintaskbar_value));
             }
             else
             {
                 if (showintaskbar_value2 != showintaskbar_tempvalue2)
                 {
                     showintaskbar_value2 = showintaskbar_tempvalue2;
                 }
                 TaskbarShow?.Invoke(this, new Classes.ShowTaskbarEvent(showintaskbar_value));
             }
         }
     }
 }