예제 #1
0
        public App()
        {
            DocumentStoreContainer.Initialize();

            StateManager = new StateManager(DocumentStoreContainer.DocumentStore, TimerState.NotWorking);

            var configuration = DocumentStoreContainer.DocumentStore.LoadConfiguration();
            if (configuration == null)
            {
                configuration = new Configuration
                {
                    ShortcutKey = Keys.Enter,
                    ShortcutModifierKeys = ModifierKeys.Control
                };
                DocumentStoreContainer.DocumentStore.SaveOrUpdateConfiguration(configuration);
            }
            RegisterKeyboardShortcuts(configuration);
        }
예제 #2
0
        public App()
        {
            var useEmbeddedMode = Convert.ToBoolean(ConfigurationManager.AppSettings.Get("UseEmbeddedMode"));

            DocumentStoreContainer.Initialize(useEmbeddedMode);

            StateManager = new StateManager(DocumentStoreContainer.DocumentStore, TimerState.NotWorking);

            var configuration = DocumentStoreContainer.DocumentStore.LoadConfiguration();
            if (configuration == null)
            {
                configuration = new Configuration
                {
                    ShortcutKey = Keys.Enter,
                    ShortcutModifierKeys = ModifierKeys.Control
                };
                DocumentStoreContainer.DocumentStore.SaveOrUpdateConfiguration(configuration);
            }
            RegisterKeyboardShortcuts(configuration);
            RegisterScreenLockHandlers();
        }