Update() private method

private Update ( ) : void
return void
Ejemplo n.º 1
0
    private void SetBatteryScreen()
    {
        gBattery.Update();

        SetDisplayColor(lSurface[2], 100 - (int)gBattery.Percentage, ref iStateBattery);
        lSurface[2].WriteText(string.Format("Battery\n{0:0.0}%", gBattery.Percentage));
    }
Ejemplo n.º 2
0
        public void Update()
        {
            if (_isDisposed)
            {
                return;
            }

            Info.Update();
            Battery.Update();
            Processor.Update();
            Memory.Update();
            Network.Update();
        }
Ejemplo n.º 3
0
        static void WriteBatteryInfo()
        {
            Battery b = new Battery();

            b.Update();
            Console.WriteLine("Battery Information:");
            Console.WriteLine("Status: \t" + b.Status);
            if (b.Status == BatteryStatus.Unavailable)
            {
                return;
            }
            Console.WriteLine("Charge: \t" + b.ChargePercent + " %");
            Console.WriteLine("Voltage:\t" + b.CurrentVoltage + " V");
            Console.WriteLine("Charge rate:\t" + b.ChargeRate + " W");
            Console.WriteLine("Time remaining:\t" + b.TimeToDischarge);
            Console.WriteLine();
        }
Ejemplo n.º 4
0
 public void Main(string _, UpdateType updateSource)
 {
     if ((updateSource & UpdateType.Update10) != 0)
     {
         if (gCockpit.IsUnderControl)
         {
             gBattery.Update();
             gSurface.WriteText(string.Format(sFormat, gBattery.CurrentPower, gBattery.MaxPower, gBattery.Percentage));
         }
         else
         {
             Runtime.UpdateFrequency = UpdateFrequency.Update100;
         }
     }
     else if (gCockpit.IsUnderControl)
     {
         Runtime.UpdateFrequency = UpdateFrequency.Update10;
     }
 }
Ejemplo n.º 5
0
 public void UpdateTask(object sender, EventArgs e)
 {
     battery.Update();
     GraphUpdate();
     UIUpdate();
 }