コード例 #1
0
        private void Newfiles()
        {
            FormDoc formDoc = new FormDoc();

            formDoc.MdiParent   = this;
            formDoc.Text        = "文档" + _Num;
            formDoc.WindowState = FormWindowState.Maximized;
            formDoc.Show();
            formDoc.Activate();
            _Num++;
        }//新建文件原函数
コード例 #2
0
 /// <summary>
 /// 新建按钮
 /// </summary>
 private void NewDoc()
 {
     if (_Num <= 10)
     {
         FormDoc formDoc = new FormDoc
         {
             MdiParent   = this,
             Text        = "Doc" + _Num,
             WindowState = FormWindowState.Maximized
         };
         formDoc.Show();
         formDoc.Activate();
         _Num++;
     }
 }