コード例 #1
0
ファイル: MdiMainForm.cs プロジェクト: banderson/Wave-Manager
        protected void OpenExistingFile(WaveFile file)
        {
            // only open file if it's not already open
            MdiForm match = (MdiForm)MdiChildren.FirstOrDefault(f => ((MdiForm)f).Wave == file);
            if (match != null)
            {
                match.Activate();
                return;
            }

            MdiForm graphForm = new MdiForm(file);
            graphForm.MdiParent = this;
            graphForm.Show();

            //_menuWindow.

            // start tracking the current directory
            var directory = Path.GetDirectoryName(file.filePath);
            WaveManagerBusiness.WaveManager.AddDirectory(directory);

            // redraw the file list in the left panel
            WaveManagerBusiness.WaveManager.FireRepaintFileList();
        }
コード例 #2
0
ファイル: MdiMainForm.cs プロジェクト: banderson/Wave-Manager
 private void OnNewGraphClick(object sender, EventArgs e)
 {
     MdiForm graphForm = new MdiForm();
     graphForm.MdiParent = this;
     graphForm.Wave = new WaveFile();
     graphForm.Show();
 }