void NotificationListItemUpdated(object sender, ItemUpdatedEventArgs e) { CustomNotification notification = e.Item as CustomNotification; if (notification.RequiresMonitoring()) { if (notification.Enabled) { if (notification.Running) { log.DebugFormat("Notification {0} restarting", notification.ToString()); notification.Stop(); } else { log.DebugFormat("Notification {0} starting", notification.ToString()); } notification.Start(); } else if (notification.Running) { log.DebugFormat("Notification {0} stopping", notification.ToString()); notification.Stop(); } } }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { this.Notification = notification as NotificationTest; comboboxFrequency.Active = (int)Notification.Frequency; buttonTrigger.Sensitive = this.Notification.DataModel != null; }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { this.Notification = (NotificationMood)notification; comboboxTransitionSpeed.Active = (int)this.Notification.MoodlightSpeed; comboboxAnimationSpeed.Active = (int)this.Notification.AnimationSpeed; }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { this.Notification = (NotificationRemoteControl)notification; entryBindAddress.Text = Notification.ApiBindAddress; spinbuttonPort.Value = Notification.ApiAccessPort; }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { Notification = (notification as EmailNotification); if (Notification is NotificationPop3) { DefaultPort = 110; DefaultSslPort = 995; } GtkLabel1.Markup = String.Format("<b>Configure {0} account settings</b>", Notification.GetTypeName()); IgnoreChanges = true; entryUsername.Text = Notification.Username; entryPassword.Text = Notification.Password; entryServer.Text = Notification.ServerAddress; spinbuttonPort.Value = Notification.Port; checkbuttonUseSSL.Active = Notification.UseSsl; spinbuttonCheckPeriod.Value = Notification.CheckPeriod; UpdateUI(); IgnoreChanges = false; if (spinbuttonPort.Value == 0) { OnCheckbuttonUseSSLToggled(checkbuttonUseSSL, EventArgs.Empty); } }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { Notification = (notification as NotificationGmail); entryEmail.Text = Notification.Email; entryPassword.Text = Notification.Password; spinbuttonCheckPeriod.Value = Notification.CheckPeriod; }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { this.Notification = notification as NotificationKeyboard; comboboxKey.Active = AvailableKeys.IndexOf(Notification.Key); checkbuttonAlt.Active = Notification.ModifierKeys.HasFlag(ModifierKeys.Alt); checkbuttonCtrl.Active = Notification.ModifierKeys.HasFlag(ModifierKeys.Control); checkbuttonWin.Active = Notification.ModifierKeys.HasFlag(ModifierKeys.Win); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationRam(); } return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationTest(); } ((NotificationTest)notification).Frequency = this.Frequency; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationApplication(); } ((NotificationApplication)notification).SearchString = this.SearchString; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationBlinkStickDotCom(); } ((NotificationBlinkStickDotCom)notification).AccessCode = this.AccessCode; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationStart(); } //((NotificationStart)notification). = this.; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { ((EmailNotification)notification).Username = this.Username; ((EmailNotification)notification).Password = this.Password; ((EmailNotification)notification).ServerAddress = this.ServerAddress; ((EmailNotification)notification).Port = this.Port; ((EmailNotification)notification).UseSsl = this.UseSsl; ((EmailNotification)notification).CheckPeriod = this.CheckPeriod; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationRemoteControl(); } ((NotificationRemoteControl)notification).ApiAccessPort = this.ApiAccessPort; ((NotificationRemoteControl)notification).ApiBindAddress = this.ApiBindAddress; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationKeyboard(); } ((NotificationKeyboard)notification).ModifierKeys = this.ModifierKeys; ((NotificationKeyboard)notification).Key = this.Key; return(base.Copy(notification)); }
public virtual CustomNotification Copy(CustomNotification notification = null) { if (notification == null) { throw new ArgumentNullException("notification"); } notification.Enabled = this.Enabled; notification.Name = this.Name; return(notification); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationMood(); } ((NotificationMood)notification).MoodlightSpeed = this.MoodlightSpeed; ((NotificationMood)notification).AnimationSpeed = this.AnimationSpeed; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { throw new ArgumentNullException("notification"); } (notification as PatternNotification).Pattern = this.Pattern; (notification as PatternNotification).LedIndex = this.LedIndex; return(base.Copy(notification)); }
public RgbColor GetColor(CustomNotification notification) { int index = 0; int channel = 0; if (notification is DeviceNotification) { index = ((DeviceNotification)notification).LedFirstIndex * 3; channel = ((DeviceNotification)notification).GetValidChannel(); } return(RgbColor.FromRgb(LedFrame[channel][index + 1], LedFrame[channel][index], LedFrame[channel][index + 2])); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationGmail(); } ((NotificationGmail)notification).Email = this.Email; ((NotificationGmail)notification).Password = this.Password; ((NotificationGmail)notification).CheckPeriod = this.CheckPeriod; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationCpu(); } ((HardwareNotification)notification).Configuration = this.Configuration; ((HardwareNotification)notification).TriggerType = this.TriggerType; ((HardwareNotification)notification).AlertPercent = this.AlertPercent; ((HardwareNotification)notification).CheckPeriod = this.CheckPeriod; return(base.Copy(notification)); }
public override CustomNotification Copy(CustomNotification notification = null) { if (notification == null) { throw new ArgumentNullException("notification"); } ((DeviceNotification)notification).BlinkStickSerial = this.BlinkStickSerial; ((DeviceNotification)notification).LedFirstIndex = this.LedFirstIndex; ((DeviceNotification)notification).LedLastIndex = this.LedLastIndex; ((DeviceNotification)notification).LedChannel = this.LedChannel; return(notification); }
public override CustomNotification Copy(CustomNotification notification) { if (notification == null) { notification = new NotificationDiskSpace(); } ((NotificationDiskSpace)notification).Drive = this.Drive; ((NotificationDiskSpace)notification).DriveFreeSpaceLimit = this.DriveFreeSpaceLimit; ((NotificationDiskSpace)notification).Measurement = this.Measurement; ((NotificationDiskSpace)notification).CheckPeriod = this.CheckPeriod; return(base.Copy(notification)); }
public TriggeredEvent(PatternNotification notification, String message) { this.TimeStamp = DateTime.Now; this.Notification = notification; this.NotificationSnapshot = ((CustomNotification)notification).Copy(); this.Message = message; this.FirstLed = notification.LedFirstIndex; this.LastLed = notification.LedLastIndex; this.Device = notification.Device; this.Pattern = notification.Pattern; this.Repeat = 1; this.Duration = 0; }
public TriggeredEvent(CustomNotification notification, int channel, int firstLed, int lastLed, BlinkStickDeviceSettings device, Pattern pattern, int repeat, int duration) { this.Channel = channel; this.TimeStamp = DateTime.Now; this.Notification = notification; this.NotificationSnapshot = notification.Copy(); this.FirstLed = firstLed; this.LastLed = lastLed; this.Device = device; this.Pattern = pattern; this.Repeat = repeat; this.Duration = duration; }
public static int Register(String category, String description, Type type, Type editorType, Pixbuf icon = null) { using (CustomNotification notification = (CustomNotification)Activator.CreateInstance(type)) { NotificationTypes.Add( new NotificationRegistryEntry( category, notification.GetTypeName(), description, type, notification.IsSupported(), editorType, icon)); } return(NotificationTypes.Count - 1); }
void NotificationColor(object sender, ColorSendEventArgs e) { CustomNotification notification = sender as CustomNotification; if (e.Device == null) { log.WarnFormat("({0}) Device for notification not found", notification.Name); return; } if (e.Device.Led == null) { log.WarnFormat("({0}) BlinkStick is not connected", notification.Name); return; } e.Device.SetColor(e.Channel, e.FirstLed, e.LastLed, e.R, e.G, e.B); }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { Notification = (notification as NotificationDiskSpace); spinbuttonSize.Value = Notification.DriveFreeSpaceLimit; spinbuttonCheckPeriod.Value = Notification.CheckPeriod; comboboxSizeType.Active = (int)Notification.Measurement; int index = 0; foreach (string drive in Notification.GetDrives()) { comboboxDrive.AppendText(drive); if (drive == Notification.Drive) { comboboxDrive.Active = index; } index++; } }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { this.Notification = (NotificationBlinkStickDotCom)notification; entryAccessCode.Text = this.Notification.AccessCode; }
public void SetNotification(BlinkStickClient.DataModel.CustomNotification notification) { this.Notification = (NotificationApplication)notification; entrySearchString.Text = this.Notification.SearchString; }