Ejemplo n.º 1
0
        private void fileToolStripMenuItem_DropDownOpening(object sender, EventArgs e)
        {
            List <string> recentFileList = ManagerMRU.GetMruList();

            toolStripMenuItemRecentFiles.DropDownItems.Clear();

            foreach (string file in recentFileList)
            {
                ToolStripMenuItem fileMenu = new ToolStripMenuItem(file);
                toolStripMenuItemRecentFiles.DropDownItems.Add(fileMenu);
                fileMenu.Click += new System.EventHandler(this.OpenRecentFile_Click);;
            }
        }
Ejemplo n.º 2
0
        private void OpenLocalFile(string fileName)
        {
            FormFileStreamParser fileStreamParserForm = new FormFileStreamParser();

            fileStreamParserForm.MdiParent   = this;
            fileStreamParserForm.WindowState = FormWindowState.Maximized;
            //Set the stream file to the parser.
            fileStreamParserForm.SetStreamFile(fileName);
            fileStreamParserForm.Show();

            //Save into the MRU.
            ManagerMRU.AddMruItem(fileName);
        }