Beispiel #1
0
        }  //  static public void OnLogMessage( string )

        //
        //  static public void OnMRUListItem( MRU.MRUItem )
        //
        //  Our MRU management class accepts OnMRUListItem as a callback function, informing the user of the
        //  MRU item that was selected.  An object of type MRU.MRUItem is passed as the only argument.  If the
        //  associated Profile cannot be opened it will be removed from the MRU list.
        //

        static public void OnMRUListItem(MRU.MRUItem item)
        {
            if (!LoadProfile(( string )item.ItemData))
            {
                ProfileMRU.Remove(item.ItemText);
            }
        }  //  static public void OnMRUListItem( MRU.MRUItem )
Beispiel #2
0
        public static string[] Load(FrmScripter frmScp, MRU mru, string path)
        {
            if (!File.Exists(path))
            {
                UtilSys.MessageBox("File '" + path + "' does not exist.");
                mru.Remove(path);
                mru.Save();
                return(null);
            }

            frmScp.Output("Loading file: " + path);

            string[] buffer = UtilIO.ReadFile2Array(path);

            mru.Add(path);
            mru.Save();

            return(buffer);
        }