Esempio n. 1
0
 private void KeyboardChooser_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         var selectedIndex = (sender as ComboBox).SelectedIndex;
         ChangeKeyboard(selectedIndex);
     }
     catch (Exception ex)
     {
         ExceptionShower.Do(ex, this);
     }
 }
Esempio n. 2
0
 private void Closeing(object sender, CancelEventArgs e)
 {
     try
     {
         configurationRepository.BackupOldAndStoreNewUserState(state);
         listener.Closing();
     }
     catch (Exception ex)
     {
         ExceptionShower.Do(ex);
     }
 }
Esempio n. 3
0
 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);
         }
     }
 }