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); }
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(); }