Exemplo n.º 1
0
 void LoadConfig()
 {
     if (BaseFileString == null)
     {
         readBaseConfig();
     }
     if (Config == null)
     {
         if (!LoadSavedConfig())
         {
             Config = new DoxygenConfig();
         }
     }
     if (EditorPrefs.HasKey(UnityProjectID + "DoxyFileExists"))
     {
         DoxyFileExists = EditorPrefs.GetBool(UnityProjectID + "DoxyFileExists");
     }
     if (EditorPrefs.HasKey(UnityProjectID + "DocsGenerated"))
     {
         DocsGenerated = EditorPrefs.GetBool(UnityProjectID + "DocsGenerated");
     }
     if (EditorPrefs.HasKey(UnityProjectID + "DoxyTheme"))
     {
         SelectedTheme = EditorPrefs.GetInt(UnityProjectID + "DoxyTheme");
     }
     if (EditorPrefs.HasKey("DoxyEXE"))
     {
         Config.PathtoDoxygen = EditorPrefs.GetString("DoxyEXE");
     }
 }
Exemplo n.º 2
0
 void SaveConfigtoEditor(DoxygenConfig config)
 {
     EditorPrefs.SetString(UnityProjectID + "DoxyProjectName", config.Project);
     EditorPrefs.SetString(UnityProjectID + "DoxyProjectNumber", config.Version);
     EditorPrefs.SetString(UnityProjectID + "DoxyProjectBrief", config.Synopsis);
     EditorPrefs.SetString(UnityProjectID + "DoxyProjectFolder", config.ScriptsDirectory);
     EditorPrefs.SetString(UnityProjectID + "DoxyProjectOutput", config.DocDirectory);
     EditorPrefs.SetString("DoxyEXE", config.PathtoDoxygen);
     EditorPrefs.SetInt(UnityProjectID + "DoxyTheme", SelectedTheme);
 }
Exemplo n.º 3
0
 bool LoadSavedConfig()
 {
     if (EditorPrefs.HasKey(UnityProjectID + "DoxyProjectName"))
     {
         Config                  = new DoxygenConfig();
         Config.Project          = EditorPrefs.GetString(UnityProjectID + "DoxyProjectName");
         Config.Version          = EditorPrefs.GetString(UnityProjectID + "DoxyProjectNumber");
         Config.Synopsis         = EditorPrefs.GetString(UnityProjectID + "DoxyProjectBrief");
         Config.DocDirectory     = EditorPrefs.GetString(UnityProjectID + "DoxyProjectOutput");
         Config.ScriptsDirectory = EditorPrefs.GetString(UnityProjectID + "DoxyProjectFolder");
         return(true);
     }
     return(false);
 }
Exemplo n.º 4
0
        internal void MakeNewDoxyFile(DoxygenConfig config)
        {
            SaveConfigtoEditor(config);
            CreateProgressString   = "Creating Output Folder";
            DoxyfileCreateProgress = 0.1f;
            System.IO.Directory.CreateDirectory(config.DocDirectory);

            DoxyfileCreateProgress = 0.1f;
            string newfile = BaseFileString.Replace("PROJECT_NAME           =", "PROJECT_NAME           = " + "\"" + config.Project + "\"");

            DoxyfileCreateProgress = 0.2f;
            newfile = newfile.Replace("PROJECT_NUMBER         =", "PROJECT_NUMBER         = " + config.Version);
            DoxyfileCreateProgress = 0.3f;
            newfile = newfile.Replace("PROJECT_BRIEF          =", "PROJECT_BRIEF          = " + "\"" + config.Synopsis + "\"");
            DoxyfileCreateProgress = 0.4f;
            newfile = newfile.Replace("OUTPUT_DIRECTORY       =", "OUTPUT_DIRECTORY       = " + "\"" + config.DocDirectory + "\"");
            DoxyfileCreateProgress = 0.5f;
            newfile = newfile.Replace("INPUT                  =", "INPUT                  = " + "\"" + config.ScriptsDirectory + "\"");
            DoxyfileCreateProgress = 0.6f;

            switch (SelectedTheme)
            {
            case 0:
                newfile = newfile.Replace("GENERATE_TREEVIEW      = NO", "GENERATE_TREEVIEW      = YES");
                break;

            case 1:
                newfile = newfile.Replace("SEARCHENGINE           = YES", "SEARCHENGINE           = NO");
                newfile = newfile.Replace("CLASS_DIAGRAMS         = YES", "CLASS_DIAGRAMS         = NO");
                break;
            }
            newfile = newfile.Replace("HIDE_SCOPE_NAMES       = NO", "HIDE_SCOPE_NAMES       = YES");

            CreateProgressString = "New Options Set";

            StringBuilder sb = new StringBuilder();

            sb.Append(newfile);
            StreamWriter NewDoxyfile = new StreamWriter(config.DocDirectory + @"\Doxyfile");

            NewDoxyfile.Write(sb.ToString());
            NewDoxyfile.Close();
            DoxyfileCreateProgress = 1.0f;
            CreateProgressString   = "New Doxyfile Created!";
            DoxyFileExists         = true;
            EditorPrefs.SetBool(UnityProjectID + "DoxyFileExists", DoxyFileExists);
        }
Exemplo n.º 5
0
 void SaveConfigtoEditor(DoxygenConfig config)
 {
     EditorPrefs.SetString(UnityProjectID+"DoxyProjectName",config.Project);
     EditorPrefs.SetString(UnityProjectID+"DoxyProjectNumber",config.Version);
     EditorPrefs.SetString(UnityProjectID+"DoxyProjectBrief",config.Synopsis);
     EditorPrefs.SetString(UnityProjectID+"DoxyProjectFolder",config.ScriptsDirectory);
     EditorPrefs.SetString(UnityProjectID+"DoxyProjectOutput",config.DocDirectory);
     EditorPrefs.SetString("DoxyEXE", config.PathtoDoxygen);
     EditorPrefs.SetInt(UnityProjectID+"DoxyTheme", SelectedTheme);
 }
Exemplo n.º 6
0
 bool LoadSavedConfig()
 {
     if( EditorPrefs.HasKey (UnityProjectID+"DoxyProjectName"))
     {
         Config = new DoxygenConfig();
         Config.Project = EditorPrefs.GetString(UnityProjectID+"DoxyProjectName");
         Config.Version = EditorPrefs.GetString(UnityProjectID+"DoxyProjectNumber");
         Config.Synopsis = EditorPrefs.GetString(UnityProjectID+"DoxyProjectBrief");
         Config.DocDirectory = EditorPrefs.GetString(UnityProjectID+"DoxyProjectOutput");
         Config.ScriptsDirectory = EditorPrefs.GetString(UnityProjectID+"DoxyProjectFolder");
         return true;
     }
     return false;
 }
Exemplo n.º 7
0
 void LoadConfig()
 {
     if(BaseFileString == null)
         readBaseConfig();
     if(Config == null)
     {
         if(!LoadSavedConfig())
             Config = new DoxygenConfig();
     }
     if(EditorPrefs.HasKey(UnityProjectID+"DoxyFileExists"))
         DoxyFileExists = EditorPrefs.GetBool(UnityProjectID+"DoxyFileExists");
     if(EditorPrefs.HasKey(UnityProjectID+"DocsGenerated"))
         DocsGenerated = EditorPrefs.GetBool(UnityProjectID+"DocsGenerated");
     if(EditorPrefs.HasKey(UnityProjectID+"DoxyTheme"))
         SelectedTheme = EditorPrefs.GetInt(UnityProjectID+"DoxyTheme");
     if(EditorPrefs.HasKey("DoxyEXE"))
         Config.PathtoDoxygen = EditorPrefs.GetString("DoxyEXE");
 }
Exemplo n.º 8
0
        internal void MakeNewDoxyFile(DoxygenConfig config)
        {
            SaveConfigtoEditor(config);
            CreateProgressString = "Creating Output Folder";
            DoxyfileCreateProgress = 0.1f;
            System.IO.Directory.CreateDirectory(config.DocDirectory);

            DoxyfileCreateProgress = 0.1f;
            string newfile = BaseFileString.Replace("PROJECT_NAME           =", "PROJECT_NAME           = "+"\""+config.Project+"\"");
            DoxyfileCreateProgress = 0.2f;
            newfile = newfile.Replace("PROJECT_NUMBER         =", "PROJECT_NUMBER         = "+config.Version);
            DoxyfileCreateProgress = 0.3f;
            newfile = newfile.Replace("PROJECT_BRIEF          =", "PROJECT_BRIEF          = "+"\""+config.Synopsis+"\"");
            DoxyfileCreateProgress = 0.4f;
            newfile = newfile.Replace("OUTPUT_DIRECTORY       =", "OUTPUT_DIRECTORY       = "+"\""+config.DocDirectory+"\"");
            DoxyfileCreateProgress = 0.5f;
            newfile = newfile.Replace("INPUT                  =", "INPUT                  = "+"\""+config.ScriptsDirectory+"\"");
            DoxyfileCreateProgress = 0.6f;

            switch(SelectedTheme)
            {
                case 0:
                    newfile = newfile.Replace("GENERATE_TREEVIEW      = NO", "GENERATE_TREEVIEW      = YES");
                break;
                case 1:
                    newfile = newfile.Replace("SEARCHENGINE           = YES", "SEARCHENGINE           = NO");
                    newfile = newfile.Replace("CLASS_DIAGRAMS         = YES", "CLASS_DIAGRAMS         = NO");
                break;
            }
            newfile = newfile.Replace("HIDE_SCOPE_NAMES       = NO", "HIDE_SCOPE_NAMES       = YES");

            CreateProgressString = "New Options Set";

            StringBuilder sb = new StringBuilder();
            sb.Append(newfile);
            StreamWriter NewDoxyfile = new StreamWriter(config.DocDirectory + @"\Doxyfile");

            NewDoxyfile.Write(sb.ToString());
            NewDoxyfile.Close();
            DoxyfileCreateProgress = 1.0f;
            CreateProgressString = "New Doxyfile Created!";
            DoxyFileExists = true;
            EditorPrefs.SetBool(UnityProjectID+"DoxyFileExists",DoxyFileExists);
        }