Example #1
0
 public override void Execute()
 {
     if (new AlertDialog("Are you sure you want to reset to defaults?", "Yes", "Cancel").Show() == 0)
     {
         AppUserPreferences.Instance.ResetToDefaults();
         UI.SceneView.SceneUserPreferences.Instance.ResetToDefaults();
         UI.Timeline.TimelineUserPreferences.Instance.ResetToDefaults();
         Core.CoreUserPreferences.Instance.ResetToDefaults();
         HotkeyRegistry.ResetToDefaults();
         AppUserPreferences.Instance.ToolbarModel = AppUserPreferences.DefaultToolbarModel();
         new AlertDialog("Some actions will take place after Tangerine restart", "Ok").Show();
     }
 }
Example #2
0
 /// <summary>
 /// Sets up member variables.
 /// </summary>
 public TTSEngine()
 {
     speechSynthesizer = new SpeechSynthesizer();
     hotkeyRegistry    = new HotkeyRegistry();
     inputSimulator    = new InputSimulator();
     settingsRepo      = new SettingsRepo();
     speechSynthesizer.SetOutputToDefaultAudioDevice();
     if (!settingsRepo.SettingsExists())
     {
         string[] installedVoices = GetInstalledVoices();
         if (installedVoices.Length == 0)
         {
             throw new DependentPlatformMissingException("No installed voices found.");
         }
         settingsRepo.Create(new SettingsFile(new Hotkey(ModifierKey.CTRL, Keys.Space), installedVoices[0], true, new List <VoiceBindingEntity>()));
     }
     ReloadSettings();
 }