Exemplo n.º 1
0
        public void AddSchedule(HMessage packet, int interval, int cycles, SKoreHotkey.KeyCombination hotkey, bool autoStart)
        {
            ListViewItem item = AddFocusedItem(packet,
                                               packet.Destination, interval, cycles, hotkey?.ToString() ?? "", "Stopped");

            var schedule = new HSchedule(packet, interval, cycles);

            schedule.ScheduleTick   += OnScheduleTick;
            schedule.Hotkey          = new SKoreHotkey(hotkey);
            schedule.ScheduleHotkey += OnScheduleHotkey;

            _items.Add(schedule, item);

            item.Tag     = schedule;
            item.Checked = autoStart;
        }
Exemplo n.º 2
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            e.SuppressKeyPress = true;

            this.Value = new SKoreHotkey.KeyCombination(e.Modifiers, e.KeyCode);
        }