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); }
public override DishType GetDish(DishType t) { RefreshTimer.Change(RefreshTime, 0); return(base.GetDish(t)); }
private async void RefreshTrayIcon(object state) { await Parrot.Battery.RefreshAsync(); RefreshTimer.Change(RefreshPollDelay, Timeout.Infinite); }
private void FrmControl_FormClosing(object sender, FormClosingEventArgs e) { RefreshTimer.Change(Timeout.Infinite, Timeout.Infinite); }