Example #1
0
        public static void RememberFile(string FileName)
        {
            string[] recents = new string[RememberFileCount];

            for (int i = 0; i < RememberFileCount; i++)
            {
                recents[i] = AppUtils.ReadSectionSettingString(sMRUFiles, i.ToString());
            }

            int pos = RememberFileCount - 1;

            for (int i = 0; i < RememberFileCount; i++)
            {
                if ((recents[i] != null) && recents[i].Equals(FileName))
                {
                    pos = i;
                }
            }

            AppUtils.WriteSectionSettingString(sMRUFiles, "0", FileName);
            for (int i = 1; i <= pos; i++)
            {
                if (recents[i - 1] != null)
                {
                    AppUtils.WriteSectionSettingString(sMRUFiles, i.ToString(), recents[i - 1]);
                }
            }
        }
Example #2
0
        public static string[] LastFiles()
        {
            int i, c;

            for (c = 0; c < RememberFileCount; c++)
            {
                string s = AppUtils.ReadSectionSettingString(sMRUFiles, c.ToString());
                if ((s == null) || s.Equals(""))
                {
                    break;
                }
            }

            string[] r = new string[c];

            for (i = 0; i < c; i++)
            {
                r[i] = AppUtils.ReadSectionSettingString(sMRUFiles, i.ToString());
            }

            return(r);
        }
Example #3
0
 public static string LastFile()
 {
     return(AppUtils.ReadSectionSettingString(sMRUFiles, "0"));
 }
Example #4
0
 public static string LastDirectory()
 {
     return(AppUtils.ReadSectionSettingString(sMRUFiles, "path"));
 }
Example #5
0
 public static string ReadString(string name, string default_value = "")
 {
     return(AppUtils.ReadSectionSettingString(sSettings, name, default_value));
 }