Пример #1
0
        private void RestoreSettings(GameSpeakSettings source)
        {
            try
            {
                SpeakGameInstalled      = source.SpeakGameInstalled;
                SpeakGameLaunching      = source.SpeakGameLaunching;
                SpeakGameSelected       = source.SpeakGameSelected;
                SpeakGameUnInstalled    = source.SpeakGameUnInstalled;
                SpeakApplicationStopped = source.SpeakApplicationStopped;
                SpeakApplicationStarted = source.SpeakApplicationStarted;
                SpeakLibraryUpdated     = source.SpeakLibraryUpdated;


                SpeakGameSelectedText       = source.SpeakGameSelectedText;
                SpeakGameLaunchingText      = source.SpeakGameLaunchingText;
                SpeakGameInstalledText      = source.SpeakGameInstalledText;
                SpeakGameUnInstalledText    = source.SpeakGameUnInstalledText;
                SpeakApplicationStoppedText = source.SpeakApplicationStoppedText;
                SpeakApplicationStartedText = source.SpeakApplicationStartedText;
                SpeakLibraryUpdatedText     = source.SpeakLibraryUpdatedText;
            }
            catch (Exception E)
            {
                logger.Error(E, "RestoreSettings()");
                plugin.PlayniteApi.Dialogs.ShowErrorMessage(E.ToString(), Constants.AppName);
            }
        }
Пример #2
0
 public void BeginEdit()
 {
     // Code executed when settings view is opened and user starts editing values.
     try
     {
         EditDataSettings = new GameSpeakSettings(plugin);
     }
     catch (Exception E)
     {
         logger.Error(E, "BeginEdit()");
         plugin.PlayniteApi.Dialogs.ShowErrorMessage(E.ToString(), Constants.AppName);
     }
 }
Пример #3
0
        public GameSpeak(IPlayniteAPI api) : base(api)
        {
            try
            {
                Settings = new GameSpeakSettings(this);

                Speak = new System.Speech.Synthesis.SpeechSynthesizer();

                pluginFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

                Localization.SetPluginLanguage(pluginFolder, api.ApplicationSettings.Language);
            }
            catch (Exception E)
            {
                logger.Error(E, "GameSpeak()");
                PlayniteApi.Dialogs.ShowErrorMessage(E.ToString(), Constants.AppName);
            }
        }