private void HideWindow() { Hide(); if (_settings.FirstStart) { _settings.FirstStart = false; _settings.Save(); _taskBarIcon.ShowBalloonTip("Window Manager", "Window Manager is still opened.\nDouble click on the icon to open it.", BalloonIcon.Info); } }
private void ResetSettings() { try { _settings = WindowManagerSettings.Load(); } catch (Exception) { _settings = WindowManagerSettings.GetDefault(); _settings.Save(); } _settingsGrid.DataContext = _settings; if (_hotKeyManager != null) { _hotKeyManager.Dispose(); _hotKeyManager = null; } WindowManagerSettings s = _settings.Clone(); _hotKeyManager = new HotKeyManager(s); if (_hotKeyManager.Errors.Any()) { MessageBox.Show(_hotKeyManager.Errors.Aggregate((buff, a) => buff + "\n" + a), "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void DefaultSettingsClick(object sender, RoutedEventArgs e) { var firstStart = _settings.FirstStart; _settings = WindowManagerSettings.GetDefault(); _settings.FirstStart = firstStart; _settings.Save(); ResetSettings(); }