Ejemplo n.º 1
0
        private void ParrotOnConnectedEvent(object sender, EventArgs eventArgs)
        {
            this.InvokeIfRequired(() =>
            {
                TrayIcon.ContextMenuStrip = TrayIconContextMenu;
                TrayIcon.Text             = $"Parroter\r\nConnected to {Parrot.Device.DeviceName}";
                TrayIcon.ShowBalloonTip(5000, "Parroter connection was successful.", $"Parroter has been succesfully connected to your {Parrot.Device.DeviceName}.", ToolTipIcon.Info);
            });

            RefreshTimer.Change(RefreshPollDelay, Timeout.Infinite);
        }
Ejemplo n.º 2
0
 public override DishType GetDish(DishType t)
 {
     RefreshTimer.Change(RefreshTime, 0);
     return(base.GetDish(t));
 }
Ejemplo n.º 3
0
        private async void RefreshTrayIcon(object state)
        {
            await Parrot.Battery.RefreshAsync();

            RefreshTimer.Change(RefreshPollDelay, Timeout.Infinite);
        }
Ejemplo n.º 4
0
 private void FrmControl_FormClosing(object sender, FormClosingEventArgs e)
 {
     RefreshTimer.Change(Timeout.Infinite, Timeout.Infinite);
 }