public Popup(ApplicationContext ctx) { _ctx = ctx; _entries = new TimeEntryCollection(); InitializeComponent(); cbInterval.Text = Settings.Default.BugInterval + (Settings.Default.BugInterval == 1 ? " minute" : " minutes"); SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); GlobalHotkeyWrapper.RegisterHotKey(this, Keys.Z | Keys.Alt); }
private void Popup_FormClosing(object sender, FormClosingEventArgs e) { notificationIcon.Visible = false; GlobalHotkeyWrapper.UnregisterHotKey(this); }