// ################################################################################################################
        // ################################################################################################################
        // ################################################################################################################
        //
        // Event Handling Methods
        //
        // ################################################################################################################
        // ################################################################################################################
        // ################################################################################################################

        private void BtnIdentify_Click(object sender, RoutedEventArgs e)
        {
            UpdateLogFile("Identify button was clicked.");
            DisableFields(true);
            Identify identifier = new Identify();

            identifier.Show();
            UpdateLogFile("Created an Identify object and displayed it.");
            WaitTime(2);
            identifier.Close();
            UpdateLogFile("Closed the Identify object");
            EnableFields();
        }
Exemple #2
0
 private void IdentifyMonitors()
 {
     if (Globals.Settings.MonitorCount == 1)
     {
         Identify identify1 = new Identify(1, 0);
         identify1.Show();
         WaitTime(2);
         identify1.Close();
     }
     else if (Globals.Settings.MonitorCount == 2)
     {
         if (Screen.AllScreens[0].Primary)
         {
             Globals.Monitor1X = 0;
             Globals.Monitor2X = Globals.Settings.Monitors[0].Width;
         }
         else
         {
             Globals.Monitor1X = Globals.Settings.Monitors[0].Width * -1;
             Globals.Monitor2X = 0;
         }
         Identify identify1 = new Identify(1, Globals.Monitor1X);
         identify1.Show();
         Identify identify2 = new Identify(2, Globals.Monitor2X);
         identify2.Show();
         WaitTime(2);
         identify1.Close();
         identify2.Close();
     }
     else
     {
         if (Screen.AllScreens[0].Primary)
         {
             Globals.Monitor1X = 0;
             Globals.Monitor2X = Globals.Settings.Monitors[0].Width;
             Globals.Monitor3X = Globals.Settings.Monitors[0].Width + Globals.Settings.Monitors[1].Width;
         }
         else if (Screen.AllScreens[1].Primary)
         {
             Globals.Monitor1X = Globals.Settings.Monitors[0].Width * -1;
             Globals.Monitor2X = 0;
             Globals.Monitor3X = Globals.Settings.Monitors[0].Width;
         }
         else
         {
             Globals.Monitor1X = (Globals.Settings.Monitors[0].Width + Globals.Settings.Monitors[1].Width) * -1;
             Globals.Monitor2X = Globals.Settings.Monitors[1].Width * -1;
             Globals.Monitor3X = 0;
         }
         Identify identify1 = new Identify(1, Globals.Monitor1X);
         identify1.Show();
         Identify identify2 = new Identify(2, Globals.Monitor2X);
         identify2.Show();
         Identify identify3 = new Identify(3, Globals.Monitor3X);
         identify3.Show();
         WaitTime(2);
         identify1.Close();
         identify2.Close();
         identify3.Close();
     }
 }