public Control()
 {
     InitializeComponent();
     label1.Hide();
     label2.Hide();
     label3.Hide();
     label4.Hide();
     label5.Hide();
     label6.Hide();
     label7.Hide();
     FullBattery.Hide();
     NearlyFullBattery.Hide();
     LowBattery.Hide();
     HalfBattery.Hide();
     PowerOff.Enabled          = false;
     WebBrowsersFolder.Enabled = false;
     Home.Enabled              = false;
     Lock.Enabled              = false;
     FullBattery.Enabled       = false;
     Charging.Enabled          = false;
     FullBattery.Enabled       = false;
     NearlyFullBattery.Enabled = false;
     LowBattery.Enabled        = false;
     HalfBattery.Enabled       = false;
 }
Ejemplo n.º 2
0
        public bool RobotHasEnoughBattery(Robot robot)
        {
            //var location = robot.Position.Location;
            LowBattery += OnLowBattery;

            if (robot.Battery - NeededBatteryCommand < 0)
            {
                //robot.Position.Location = location;
                LowBattery?.Invoke(this, new RobotEventArgs(robot));
                return(false);
            }

            robot.Battery -= NeededBatteryCommand;
            return(true);
        }
        private void PowerOn_Click(object sender, EventArgs e)
        {
            Form AndriodStart = new AndriodStart();

            AndriodStart.Show();

            PowerOff.Enabled          = true;
            WebBrowsersFolder.Enabled = true;
            Home.Enabled = true;
            Charging.Hide();
            FullBattery.Show();

            Thread.Sleep(3600000);
            FullBattery.Hide();
            NearlyFullBattery.Show();

            Thread.Sleep(7200000);
            NearlyFullBattery.Hide();
            HalfBattery.Show();

            Thread.Sleep(10800000);
            HalfBattery.Hide();
            LowBattery.Show();
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Overrides this method if want to handle behavior when the system battery is low.
 /// If base.OnLowBattery() is not called, the event 'LowBattery' will not be emitted.
 /// </summary>
 /// <param name="e">The low battery event argument</param>
 /// <since_tizen> 3 </since_tizen>
 protected virtual void OnLowBattery(LowBatteryEventArgs e)
 {
     LowBattery?.Invoke(this, e);
 }
Ejemplo n.º 5
0
 internal void OnLowBatteryCallback(int status)
 {
     LowBattery?.Invoke(this, new LowBatteryEventArgs((LowBatteryStatus)status));
 }