private void lvMetaColumnSpecs_DoubleClick(object sender, EventArgs e) { MetaColumnListViewItem lviMetaColumnSpec; MetaColumnSpec metaColumnSpec; if (this.lvMetaColumnSpecs.SelectedItems.Count != 1) { return; } lviMetaColumnSpec = this.lvMetaColumnSpecs.SelectedItems[0] as MetaColumnListViewItem; if ((object)lviMetaColumnSpec == null) { return; } metaColumnSpec = (MetaColumnSpec)lviMetaColumnSpec.Tag; using (PropertyForm frmProperty = new PropertyForm(metaColumnSpec)) { //frmProperty.PropertyUpdate += new EventHandler(this.f_PropertyUpdate); frmProperty.ShowDialog(this.ParentForm); //frmProperty.PropertyUpdate -= new EventHandler(this.f_PropertyUpdate); this.lvMetaColumnSpecs.SelectedItems[0].SubItems[0].Text = metaColumnSpec.ColumnName.SafeToString(); this.lvMetaColumnSpecs.SelectedItems[0].SubItems[1].Text = metaColumnSpec.IsColumnNullable.SafeToString(); this.lvMetaColumnSpecs.SelectedItems[0].SubItems[2].Text = metaColumnSpec.ObfuscationStrategyAqtn.SafeToString(); this.lvMetaColumnSpecs.SelectedItems[0].SubItems[3].Text = metaColumnSpec.DictionaryRef.SafeToString(); this.lvMetaColumnSpecs.SelectedItems[0].SubItems[4].Text = metaColumnSpec.ExtentValue.SafeToString(); } }
private void lvDictionarySpecs_DoubleClick(object sender, EventArgs e) { DictionaryListViewItem lviDictionarySpec; DictionarySpec dictionarySpec; if (this.lvDictionarySpecs.SelectedItems.Count != 1) { return; } lviDictionarySpec = this.lvDictionarySpecs.SelectedItems[0] as DictionaryListViewItem; if ((object)lviDictionarySpec == null) { return; } dictionarySpec = (DictionarySpec)lviDictionarySpec.Tag; using (PropertyForm frmProperty = new PropertyForm(dictionarySpec)) { //frmProperty.PropertyUpdate += new EventHandler(this.f_PropertyUpdate); frmProperty.ShowDialog(this.ParentForm); //frmProperty.PropertyUpdate -= new EventHandler(this.f_PropertyUpdate); this.lvDictionarySpecs.SelectedItems[0].SubItems[0].Text = dictionarySpec.DictionaryId.SafeToString(); this.lvDictionarySpecs.SelectedItems[0].SubItems[1].Text = dictionarySpec.PreloadEnabled.SafeToString(); this.lvDictionarySpecs.SelectedItems[0].SubItems[2].Text = dictionarySpec.RecordCount.SafeToString(); //this.lvDictionarySpecs.SelectedItems[0].SubItems[3].Text = null; } }
private void lvFieldSpecs_DoubleClick(object sender, EventArgs e) { HeaderSpecListViewItem lviHeaderSpec; HeaderSpec headerSpec; if (this.lvFieldSpecs.SelectedItems.Count != 1) { return; } lviHeaderSpec = this.lvFieldSpecs.SelectedItems[0] as HeaderSpecListViewItem; if ((object)lviHeaderSpec == null) { return; } headerSpec = (HeaderSpec)lviHeaderSpec.Tag; using (PropertyForm frmProperty = new PropertyForm(headerSpec)) { //frmProperty.PropertyUpdate += new EventHandler(this.f_PropertyUpdate); frmProperty.ShowDialog(this.ParentForm); //frmProperty.PropertyUpdate -= new EventHandler(this.f_PropertyUpdate); this.lvFieldSpecs.SelectedItems[0].SubItems[0].Text = headerSpec.HeaderName.SafeToString(); this.lvFieldSpecs.SelectedItems[0].SubItems[1].Text = headerSpec.FieldType.SafeToString(); } }
private void ctxMnuSpecificProps_Click(object sender, EventArgs e) { SketchShape shapeUnderCursor; if ((object)this.Sketch == null) { return; } // hit test sketch shapeUnderCursor = this.Sketch.GetShapeAtPoint(this.pnlCanvas.PointToClient(new Point(Cursor.Position.X, Cursor.Position.Y))); if ((object)shapeUnderCursor != null) { this.CurrentShape = shapeUnderCursor; this.pnlCanvas.Refresh(); using (PropertyForm frmProperty = new PropertyForm(shapeUnderCursor)) { frmProperty.PropertyUpdate += new EventHandler(this.f_PropertyUpdate); frmProperty.ShowDialog(this.ParentForm); frmProperty.PropertyUpdate -= new EventHandler(this.f_PropertyUpdate); } } }
private static string CreateImageText() { string rtnVal = string.Empty; PropertyForm pf = new PropertyForm(); ImageDefinition id = new ImageDefinition(); if (pf.ShowDialog(id) == DialogResult.OK) { if ((string.IsNullOrEmpty(id.Display)) && (!string.IsNullOrEmpty(id.ImageUrl))) { id.Display = id.ImageUrl; } if (string.IsNullOrEmpty(id.ImageUrl)) { return(string.Empty); } if (!string.IsNullOrEmpty(id.Tooltip)) { id.ImageUrl = string.Format("{0} \"{1}\"", id.ImageUrl, id.Tooltip); } rtnVal = $"![{id.Display}]({id.ImageUrl})"; } return(rtnVal); }
private static string CreateLinkText() { string rtnVal = string.Empty; PropertyForm pf = new PropertyForm(); LinkDefinition ld = new LinkDefinition(); if (pf.ShowDialog(ld) == DialogResult.OK) { if ((string.IsNullOrEmpty(ld.Display)) && (!string.IsNullOrEmpty(ld.LinkText))) { ld.Display = ld.LinkText; } if (string.IsNullOrEmpty(ld.LinkText)) { return(string.Empty); } if (!string.IsNullOrEmpty(ld.Tooltip)) { ld.LinkText = string.Format("{0} \"{1}\"", ld.LinkText, ld.Tooltip); } //rtnVal = string.Format("[{0}]({1})", ld.Display, ld.LinkText); rtnVal = $"[{ld.Display}]({ld.LinkText})"; } return(rtnVal); }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { PropertyForm form = new PropertyForm(grid.Model.Properties); form.ShowDialog(); grid.Model.Refresh(); } }
private void C_FilterList_DoubleClick(object sender, System.EventArgs e) { if (this.C_FilterList.SelectedNode == null) { return; } if (this.cmbAttribute.SelectedIndex > 0) { Webb.Utilities.MessageBoxEx.ShowError("Can not edit advantage filters!"); return; } SectionFilter scFilter = this.C_FilterList.SelectedNode.Tag as SectionFilter; if (scFilter == null) { return; } SectionFilter editFilter = new SectionFilter(); editFilter.Apply(scFilter); PropertyForm _PropertyForm = new PropertyForm(); string strOldName = editFilter.FilterName; string oldinnerFilterName = editFilter.Filter.Name; _PropertyForm.BindProperty(editFilter); if (_PropertyForm.ShowDialog(this) == DialogResult.OK) { if (strOldName != editFilter.FilterName) { bool exist = this.Contains(editFilter.FilterName); if (exist) { Webb.Utilities.MessageBoxEx.ShowError("FilterName'" + editFilter.FilterName + "' has been exist in thes filters!"); return; } else { this.UpdateScFilters(strOldName, editFilter); } } else { this.UpdateScFilters(strOldName, editFilter); } } }
private void btnCircle_Click(object sender, EventArgs e) { var circle = new Circle(0, 0, 10); var form = new PropertyForm(circle); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(circle); }
private void btnLayer_Click(object sender, EventArgs e) { var layer = new Layer($"NoName{this.Document.Action.NewLayerIndex++}"); var form = new PropertyForm(layer); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(layer); }
private void btnSpiral_Click(object sender, EventArgs e) { var spiral = new Spiral(2, 10, 10, true); var form = new PropertyForm(spiral); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(spiral); }
private void btnTimer_Click(object sender, EventArgs e) { var timer = new SpiralLab.Sirius.Timer(); var form = new PropertyForm(timer); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(timer); }
private void mnuMOTFWait_Click(object sender, EventArgs e) { var motf = new MotfWait(); var form = new PropertyForm(motf); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(motf); }
private void mnuOTFExtStartDelay_Click(object sender, EventArgs e) { var motf = new MotfExternalStartDelay(); var form = new PropertyForm(motf); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(motf); }
private void btnBarcode1D_Click(object sender, EventArgs e) { var bcd = new Barcode1D("123456789"); var form = new PropertyForm(bcd); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(bcd); }
private void mnuQRCode_Click(object sender, EventArgs e) { var text = new BarcodeQR("SIRIUS"); var form = new PropertyForm(text); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(text); }
private void btnRectangle_Click(object sender, EventArgs e) { var rectangle = new SpiralLab.Sirius.Rectangle(0, 0, 10, 10); var form = new PropertyForm(rectangle); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(rectangle); }
private void btnTrepan_Click(object sender, EventArgs e) { var trepan = new Trepan(0, 0, 10, 2); var form = new PropertyForm(trepan); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(trepan); }
private void btnArc_Click(object sender, EventArgs e) { var arc = new Arc(0, 0, 10, 0, 90); var form = new PropertyForm(arc); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(arc); }
private void serialToolStripMenuItem1_Click(object sender, EventArgs e) { var text = new TextSerial(); var form = new PropertyForm(text); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(text); }
private void btnSiriusArcText_Click(object sender, EventArgs e) { var text = new SiriusTextArc("HELLO"); var form = new PropertyForm(text); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(text); }
private void btnEllipse_Click(object sender, EventArgs e) { var ellipse = new Ellipse(0, 0, 10, 6, 0, 360, 0); var form = new PropertyForm(ellipse); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(ellipse); }
private void mnuPen_Click(object sender, EventArgs e) { IPen pen = new PenDefault(); var form = new PropertyForm(pen); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(pen); }
private void btnPoint_Click(object sender, EventArgs e) { var point = new SpiralLab.Sirius.Point(0, 0); var form = new PropertyForm(point); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(point); }
private void btnRaster_Click(object sender, EventArgs e) { var raster = new Raster(); var form = new PropertyForm(raster); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(raster); }
private void canvas_double_click(object sender, EventArgs e) { if (selectedFigure != null && !(selectedFigure.figure is Facade)) { PropertyForm frm = new PropertyForm(selectedFigure.figure); if (frm.ShowDialog() == DialogResult.OK) { selectedFigure.figure.width = frm.width; selectedFigure.figure.height = frm.height; UpdateGraphics(); } } }
public static string CreateLanguageText() { string rtnVal = string.Empty; PropertyForm pf = new PropertyForm(); CodeDefinition cd = new CodeDefinition(); if (pf.ShowDialog(cd) == DialogResult.OK) { rtnVal = $"```{cd.Language}\n"; } return(rtnVal); }
private static string CreateDefinitionText() { string rtnVal = string.Empty; PropertyForm pf = new PropertyForm(); DefinitionDefinition dd = new DefinitionDefinition(); if (pf.ShowDialog(dd) == DialogResult.OK) { //rtnVal = string.Format("<dt>{0}</dt>\n<dd>{1}</dd>\n", dd.Term, dd.Meaning); rtnVal = $"<dt>{dd.Term}</dt>\n<dd>{dd.Meaning}</dd>\n"; } return(rtnVal); }
private void btnDocumentInfo_Click(object sender, EventArgs e) { var form = new PropertyForm(this.Document); form.PropertyGrid.PropertyValueChanged += Document_PropertyValueChanged; try { if (DialogResult.OK != form.ShowDialog(this)) { return; } } finally { form.PropertyGrid.PropertyValueChanged -= Document_PropertyValueChanged; } }
private void btnLWPolyline_Click(object sender, EventArgs e) { var poly = new LwPolyline(); poly.Add(new LwPolyLineVertex(55.3005f, 125.1903f, 0)); poly.Add(new LwPolyLineVertex(80.5351f, 161.2085f, 0)); poly.Add(new LwPolyLineVertex(129.8027f, 148.6021f, -1.3108f)); poly.Add(new LwPolyLineVertex(107.5722f, 109.5824f, 0.8155f)); poly.Add(new LwPolyLineVertex(77.5310f, 89.7724f, 0)); poly.IsClosed = true; var form = new PropertyForm(poly); if (DialogResult.OK != form.ShowDialog(this)) { return; } this.Document.Action.ActEntityAdd(poly); }
private void pnlCanvas_DoubleClick(object sender, EventArgs e) { SketchShape shapeUnderCursor; if ((object)this.Sketch == null) return; if ((object)this.CurrentShapeTypeName == null) { // hit test sketch shapeUnderCursor = this.Sketch.GetShapeAtPoint(this.pnlCanvas.PointToClient(new Point(Cursor.Position.X, Cursor.Position.Y))); if ((object)shapeUnderCursor != null) { this.CurrentShape = shapeUnderCursor; this.pnlCanvas.Refresh(); using (PropertyForm frmProperty = new PropertyForm(shapeUnderCursor)) { frmProperty.PropertyUpdate += new EventHandler(this.f_PropertyUpdate); frmProperty.ShowDialog(this.ParentForm); frmProperty.PropertyUpdate -= new EventHandler(this.f_PropertyUpdate); } } } }