예제 #1
0
        public void UpdateFolderHistory(string _sPath)
        {
            string sFolderHistory = global::FSWatch.Properties.Settings.Default.FoldersHistory;

            string[] asFolders = sFolderHistory.Split(new char[] { ';' });

            // abort if already exists
            foreach (string sFolder in asFolders)
            {
                if (sFolder == _sPath)
                {
                    return;
                }
            }

            if (asFolders.Length < (int)DEFAULT.MAX_FOLDER_HISTORY)
            { // uppend to the end
                if (string.IsNullOrEmpty(sFolderHistory))
                {
                    sFolderHistory = _sPath;
                }
                else
                {
                    sFolderHistory = sFolderHistory + ";" + _sPath;
                }
            }
            else
            { // add new, remove oldest
                int iFirstDelimiter = sFolderHistory.IndexOf(';');
                sFolderHistory = sFolderHistory.Substring(iFirstDelimiter + 1) + ";" + _sPath;
            }

            DEBUG.TRACE("- sFolderHistory = {0}", sFolderHistory);
            global::FSWatch.Properties.Settings.Default["FoldersHistory"] = sFolderHistory;
            PopulateFolderHistory(sFolderHistory);
        }
예제 #2
0
 void tab_MouseHover(object sender, EventArgs e)
 {
     DEBUG.TRACE("- MouseHover - {{{0}}}", sender.ToString());
 }