コード例 #1
0
ファイル: MainForm.cs プロジェクト: qcerasmus/OsDevKit
 private void fileToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     var f = new Editor();
     f.MdiParent = this;
     f.Show();
 }
コード例 #2
0
ファイル: ProjectView.cs プロジェクト: ARMmaster17/OsDevKit
        private void treeView1_DoubleClick(object sender, EventArgs e)
        {
            bool FoundMdiEditor = false;
            var sel = treeView1.SelectedNode.FullPath.Replace(Global.CurrentProjectFile.Name + "\\", "");

            if (!sel.Contains("."))
            {
                return;
            }
            foreach (var i in this.MdiParent.MdiChildren)
            {
                if (i is Editor)
                {
                    if ((i as Editor).FileName == sel)
                    {
                        i.BringToFront();
                        FoundMdiEditor = true;
                    }

                }
            }
            if (!FoundMdiEditor)
            {
                var f = new Editor();
                f.FileName = sel;
                f.MdiParent = this.MdiParent;
                f.Show();
            }
        }