private void KeyboardChooser_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { try { var selectedIndex = (sender as ComboBox).SelectedIndex; ChangeKeyboard(selectedIndex); } catch (Exception ex) { ExceptionShower.Do(ex, this); } }
private void Closeing(object sender, CancelEventArgs e) { try { configurationRepository.BackupOldAndStoreNewUserState(state); listener.Closing(); } catch (Exception ex) { ExceptionShower.Do(ex); } }
public void BackupOldState() { if (File.Exists(GetStatePath())) { try { var backupPath = Path.Combine(Path.GetTempPath(), "KeyboordUsage." + Guid.NewGuid() + ".bak"); File.Move(GetStatePath(), backupPath); } catch (Exception e) { ExceptionShower.Do(e, null); } } }