Exemple #1
0
        private void batteryManagement()
        {
            // Charge Level
            float turner    = Screen.PrimaryScreen.WorkingArea.Height * SystemInformation.PowerStatus.BatteryLifePercent;
            int   turnerInt = (int)Math.Ceiling(turner);

            if (SystemInformation.PowerStatus.BatteryChargeStatus != BatteryChargeStatus.Charging && SystemInformation.PowerStatus.BatteryLifePercent > 0.08 && SystemInformation.PowerStatus.BatteryLifePercent <= 0.12 && !l1)
            {
                l1 = true;
                BattLow nbl = new BattLow();
                nbl.Show();
                nbl.BringToFront();
            }
            else if (SystemInformation.PowerStatus.BatteryChargeStatus != BatteryChargeStatus.Charging && SystemInformation.PowerStatus.BatteryLifePercent <= 0.08 && !l2)
            {
                l2 = true;
                BattCritical bcr = new BattCritical();
                bcr.Show();
                bcr.BringToFront();
            }
            else if (SystemInformation.PowerStatus.BatteryLifePercent > 0.12 || SystemInformation.PowerStatus.BatteryChargeStatus == BatteryChargeStatus.Charging)
            {
                l1 = l2 = false;
            }
        }
Exemple #2
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            BattCritical battCriticalHm = new BattCritical();

            battCriticalHm.Show();
            battCriticalHm.BringToFront();
        }
Exemple #3
0
 private void toolStripMenuItem1_Click(object sender, EventArgs e)
 {
     BattCritical battCriticalHm = new BattCritical();
     battCriticalHm.Show();
     battCriticalHm.BringToFront();
 }
        private void batteryManagement()
        {
            // Charge Level
            float turner = Screen.PrimaryScreen.WorkingArea.Height * SystemInformation.PowerStatus.BatteryLifePercent;
            int turnerInt = (int)Math.Ceiling(turner);

            if (SystemInformation.PowerStatus.BatteryChargeStatus != BatteryChargeStatus.Charging && SystemInformation.PowerStatus.BatteryLifePercent > 0.08 && SystemInformation.PowerStatus.BatteryLifePercent <= 0.12 && !l1)
            {
                l1 = true;
                BattLow nbl = new BattLow();
                nbl.Show();
                nbl.BringToFront();
            }
            else if (SystemInformation.PowerStatus.BatteryChargeStatus != BatteryChargeStatus.Charging && SystemInformation.PowerStatus.BatteryLifePercent <= 0.08 && !l2)
            {
                l2 = true;
                BattCritical bcr = new BattCritical();
                bcr.Show();
                bcr.BringToFront();
            }
            else if (SystemInformation.PowerStatus.BatteryLifePercent > 0.12 || SystemInformation.PowerStatus.BatteryChargeStatus == BatteryChargeStatus.Charging)
            {
                l1 = l2 = false;
            }
        }