public void NewFile() { ViewForm newForm = new ViewForm(); newForm.MdiParent = this; siren.MainForm.myNbOfChildren = siren.MainForm.myNbOfChildren + 1; string str = System.String.Format(newForm.Text + " {0}: �r���[ {1}", siren.MainForm.myNbOfChildren, 1); newForm.Text = str; newForm.Show(); newForm.InitViewer(); newForm.InitV3D(); this.miView.Visible=true; this.Cursor=System.Windows.Forms.Cursors.Default; this.toolStripMain.Enabled = true; }
private void menuItem4_Click(object sender, System.EventArgs e) { siren.ViewForm curForm = (siren.ViewForm)this.ActiveMdiChild; siren.ViewForm newViewer = new ViewForm(); newViewer.MdiParent = this; newViewer.Show(); newViewer.InitViewer(); newViewer.SetContext(curForm.Viewer); newViewer.Viewer.CreateNewView(newViewer.Handle); { string title = curForm.Text; System.Text.StringBuilder bld= new System.Text.StringBuilder(title); char c = bld[title.Length - 1]; string s=c.ToString(); int NbOfViewer = newViewer.Viewer.CharToInt(s); NbOfViewer++; bld.Remove(title.Length - 1, 1); bld.Append(NbOfViewer); newViewer.Text = bld.ToString(); } }