コード例 #1
0
        /// <summary>
        /// Load all settings into static memory
        /// Create files if not already existing
        /// </summary>
        static public void Load()
        {
            Program.MakeSurePathExists(SettingsManagement.AppDataPath);

            recentFilePath = Program.CleanFilePath(AppDataPath + "recent.txt");
            settingsFilePath = Program.CleanFilePath(AppDataPath + "settings.ini");
            scintSettingFilePath = Program.CleanFilePath(AppDataPath + "scintconfig.xml");

            iniFile = new IniFile(settingsFilePath);

            if (File.Exists(recentFilePath) == false)
            {
                WriteBlankFile(recentFilePath);
            }
            if (LoadRecentList() == false)
            {
                MessageBox.Show("Error Loading Recent Projects");
                WriteBlankFile(recentFilePath);
            }

            scint = new Scintilla();

            if (File.Exists(scintSettingFilePath) == false)
            {
                SaveDefaultScintSettings();
            }
            if (LoadScintSettings() == false)
            {
                MessageBox.Show("Error Loading Editor Settings");
            }
            LoadAutocompleteOnce();

            LoadFavFolder();

            GetArduinoPaths();

            string buildOutput = iniFile.Read("Editor", "BuildMessageBehaviour");

            if (string.IsNullOrEmpty(buildOutput))
                buildOutput = "top";

            buildOutput = buildOutput.ToLowerInvariant().Trim();

            if (string.IsNullOrEmpty(buildOutput))
                buildOutput = "top";

            ProjectBuilder.ReverseOutput = buildOutput.Contains("bottom");
        }