Exemple #1
0
        public void LoadGOSetup(GOSetup loadedGOSetup)
        {
            if (loadedGOSetup == null)
            {
                Output.OutputToConsole("No GO Setup settings found");
                return;
            }

            if (loadedGOSetup.goPath == null)
            {
                try
                {
                    goPath = Environment.GetEnvironmentVariable("GOROOT", EnvironmentVariableTarget.Machine);
                }
                catch (Exception ex)
                {
                    Output.OutputToConsole("Error! " + ex.Message);
                }
            }

            goPath         = loadedGOSetup.goPath;
            githubUsername = loadedGOSetup.githubUsername;

            SettingsClass.Instance.setupSettings = this;
        }
Exemple #2
0
        public void LoadSettings()
        {
            if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Settings\IDESettings.dat"))
            {
                FileStream      fs     = new FileStream(AppDomain.CurrentDomain.BaseDirectory + @"\Settings\IDESettings.dat", FileMode.Open, FileAccess.Read);
                BinaryFormatter bf     = new BinaryFormatter();
                SettingsClass   loaded = (SettingsClass)bf.Deserialize(fs);

                setupSettings = loaded.setupSettings;
                setupSettings.LoadGOSetup(loaded.setupSettings);

                codeSettings = loaded.codeSettings;
                codeSettings.LoadEditorSettings(loaded.codeSettings);

                fs.Close();
            }
            else
            {
                SaveSettings();
            }
        }
Exemple #3
0
 public SettingsClass()
 {
     setupSettings = new GOSetup();
     codeSettings  = new CodeEditorSettings();
 }