public Tasks() { InitializeComponent(); InitToolStrips(); Instance = this; ReminderHandler.Load(); }
public static void Main(string[] args) { Console.WriteLine(DateTime.Now.TimeOfDay); Console.WriteLine("DSS invoked...##"); var reminderHandler = new ReminderHandler(); var motionHandler = new MotionEventHandler(); var fallEventHandler = new FallDetectionHandler(); var measurementHandler = new MeasurementHandler(); var url = "amqp://*****:*****@cami-rabbitmq:5672/cami"; try { var rmqEvents = new RmqExchange(url, "events", "event.*", (json) => { reminderHandler.Handle(json); motionHandler.Handle(json); fallEventHandler.Handle(json); }); var rmqMeasurements = new RmqExchange(url, "measurements", "measurement.*", (json) => { measurementHandler.Handle(json); }); } catch (Exception ex) { Console.WriteLine("Something went wrong with the rmq exchange: " + ex); } Console.WriteLine("RMQ binding done!"); while (true) { } Console.WriteLine("Exiting DSS..."); }
private void TaskList_ItemChecked(object sender, ItemCheckedEventArgs e) { if (e.Item != null && e.Item.Tag != null && !reloading) { Reminder r = (Reminder)e.Item.Tag; r.Completed = e.Item.Checked; ReminderHandler.UpdateReminder(r); } }
public static void ReloadList() { reloading = true; if (Instance == null || Instance.TaskList == null) { return; } Instance.TaskList.Items.Clear(); ReminderHandler.GenerateList(Instance.TaskList, Setting.Value.Reminder_ShowCompleted); reloading = false; }
private void IncompleteMenuItem_Click(object sender, EventArgs e) { if (SelectedItem.Tag == null) { return; } Reminder r = (Reminder)SelectedItem.Tag; r.Completed = false; ReminderHandler.UpdateReminder(r); }
private void CreateButton_Click(object sender, EventArgs e) { UpdateReminder(); if (CreateButton.Text == "Create") { ReminderHandler.AddReminder(_reminder); } else { ReminderHandler.UpdateReminder(_reminder); } this.Close(); }
public Reminders(ReminderHandler reminderHandler) { ReminderHandler = reminderHandler; }
private void InitializeHandlers(DiscordSocketClient c) { _commands = new CommandHandler(c); _reminder = new ReminderHandler(c); _mention = new MentionHandler(c); }