void createForm() { Childform form = new Childform(); form.MdiParent = this; form.Show(); }
private void lights_Click(object sender, EventArgs e) { Childform frm = this.ActiveMdiChild as Childform; if (frm == null) { return; } VectorDraw.Professional.Dialogs.frmLightManager.Show(frm.vdScrollableControl1.BaseControl.ActiveDocument); }
private void imageDefinitions_Click(object sender, EventArgs e) { Childform frm = this.ActiveMdiChild as Childform; if (frm == null) { return; } VectorDraw.Professional.Dialogs.FrmImageDefs.Show(frm.vdScrollableControl1.BaseControl.ActiveDocument); }
private void print_Click(object sender, EventArgs e) { Childform frm = this.ActiveMdiChild as Childform; if (frm == null) { return; } frm.vdScrollableControl1.BaseControl.ActiveDocument.ActiveLayOut.Printer.InitializePreviewFormProperties(true, true, false, false); frm.vdScrollableControl1.BaseControl.ActiveDocument.ActiveLayOut.Printer.DialogPreview(); }
private void osnapsToolStripMenuItem_Click(object sender, EventArgs e) { Childform frm = this.ActiveMdiChild as Childform; if (frm == null) { return; } VectorDraw.Professional.vdObjects.vdDocument doc = frm.vdScrollableControl1.BaseControl.ActiveDocument; VectorDraw.Professional.Dialogs.OSnapDialog.Show(doc, doc.ActionControl); }
void CommandExecute(string commandname, bool isDefaultImplemented, ref bool success) { if (string.Compare(commandname, "open", true) == 0) { success = true; createForm(); Childform form = this.ActiveMdiChild as Childform; VectorDraw.Professional.vdObjects.vdDocument doc = form.vdScrollableControl1.BaseControl.ActiveDocument; object ret = doc.GetOpenFileNameDlg(0, "", 0); if (ret == null) { form.Close(); return; } string fname = (string)ret; bool successopen = doc.Open(fname); if (!successopen) { System.Windows.Forms.MessageBox.Show("Error openning " + fname); form.Close(); return; } doc.Redraw(false); } else if (string.Compare(commandname, "new", true) == 0) { createForm(); success = true; } else if (string.Compare(commandname, "pan", true) == 0) { Childform frm = this.ActiveMdiChild as Childform; if (frm == null) { return; } frm.vdScrollableControl1.BaseControl.ActiveDocument.CommandAction.Pan(); } }