Esempio n. 1
0
        private void _taskTrayMenu_OnObserveStateChanged(object sender, TaskTrayMenu.ObserveStateChangedEventArgs e)
        {
            AppSettingData.GetInstance().Observered = e.Observerd;
            AppSettingData.GetInstance().Save();

            if (e.Observerd)
            {
                KeymappingHandler.Start();
            }
            else
            {
                KeymappingHandler.Stop();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// application startup event
        /// </summary>
        /// <param name="e"></param>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            ShutdownMode  = ShutdownMode.OnExplicitShutdown;
            _taskTrayMenu = new TaskTrayMenu(AppSettingData.GetInstance().ClickCount);
            _taskTrayMenu.SetObserveChecked(AppSettingData.GetInstance().Observered);
            _taskTrayMenu.OnObserveStateChanged += _taskTrayMenu_OnObserveStateChanged;
            _taskTrayMenu.OnClickCountChanged   += _taskTrayMenu_OnClickCountChanged;
            _taskTrayMenu.OnExitClicked         += _taskTrayMenu_OnExitClicked;

            KeymappingHandler.SetUp();
            KeymappingHandler.ClickCount = AppSettingData.GetInstance().ClickCount;
            if (AppSettingData.GetInstance().Observered)
            {
                KeymappingHandler.Start();
            }
        }
Esempio n. 3
0
 private void _taskTrayMenu_OnClickCountChanged(object sender, TaskTrayMenu.ClickCountChangedEventArgs e)
 {
     AppSettingData.GetInstance().ClickCount = e.ClickCount;
     AppSettingData.GetInstance().Save();
     KeymappingHandler.ClickCount = e.ClickCount;
 }