Example #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);
        }
Example #2
0
 public override DishType GetDish(DishType t)
 {
     RefreshTimer.Change(RefreshTime, 0);
     return(base.GetDish(t));
 }
Example #3
0
        private async void RefreshTrayIcon(object state)
        {
            await Parrot.Battery.RefreshAsync();

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