Beispiel #1
0
 public void OpenDocument(Document doc)
 {
     foreach (var form in this.MdiChildren)
     {
         if (form.Tag == doc)
         {
             this.ActivateMdiChild(form);
             return;
         }
     }
     DocumentForm childForm = new DocumentForm(doc);
     childForm.MdiParent = this;
     childForm.Show(this.dockPanel);
 }
        public void btnDocument_Click(object sender, EventArgs e)
        {
            DocumentForm d = new DocumentForm();

            lbMainName.Text = btnDocument.Text;
            //ColorChecker
            pnTool.Controls.Clear();
            d.Owner      = this;
            d.TopLevel   = false;
            d.AutoScroll = true;
            pnTool.Controls.Add(d);
            d.Show();
            DetectButton(7);
        }
Beispiel #3
0
        private void OpenDocumentWhileMainWinClosed(List <string> filePathList)
        {
            int listLength = filePathList.Count;
            int x          = 20 * (listLength - 1);
            int y          = 20 * (listLength - 1);

            for (int i = 0; i < listLength; i++)
            {
                documentform          = new DocumentForm(filePathList[i]);
                documentform.TopLevel = false;
                documentform.SetDesktopLocation(x, y);
                //documentform.Dock = DockStyle.Fill;
                //documentform.FormBorderStyle = FormBorderStyle.None;
                this.Controls.Add(documentform);
                documentform.Show();
                x -= 20;
                y -= 20;
            }
        }