private void bExpr_Click(object sender, EventArgs e) { GridItem gi = this.pgProps.SelectedGridItem; XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, gi.Value.ToString(), sNode, false); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { // There's probably a better way without reflection but this works fine. string nm = gi.Label; object sel = pgProps.SelectedObject; Type t = sel.GetType(); PropertyInfo pi = t.GetProperty(nm); MethodInfo mi = pi.GetSetMethod(); object[] oa = new object[1]; oa[0] = ee.Expression; mi.Invoke(sel, oa); gi.Select(); } } finally { ee.Dispose(); } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; switch (b.Tag as string) { case "bookmark": c = tbBookmark; break; case "bookmarklink": c = tbBookmarkLink; break; case "hyperlink": c = tbHyperlink; break; case "visibility": c = tbHidden; break; } if (c == null) { return; } XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; if ((string)(b.Tag) == "bookmark") { fBookmark = true; } else { fAction = true; } } } finally { ee.Dispose(); } return; }
private void bValueExpr_Click(object sender, System.EventArgs e) { if (dgSorting.CurrentCell == null) { dgSorting.Rows.Add("", true); } DataGridViewCell dgc = dgSorting.CurrentCell; int cc = dgc.ColumnIndex; // >>>>>>>>>> // the only column that should be edited is the first one ( "Sort expression" ) if (cc != 0) { dgc = dgSorting.CurrentCell = dgSorting.CurrentRow.Cells[0]; } // <<<<<<<<<< string cv = dgc.Value as string; using (DialogExprEditor ee = new DialogExprEditor(_Draw, cv, _SortingParent, false)) { DialogResult dlgr = ee.ShowDialog(); if (dlgr == DialogResult.OK) { dgc.Value = ee.Expression; } } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; switch (b.Tag as string) { case "visibility": c = tbHidden; break; } if (c == null) { return; } using (DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, _TableColumn)) { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; } } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; bool bColor = false; switch (b.Tag as string) { case "min": c = this.tbMin; break; case "max": c = this.tbMax; break; case "majorinterval": c = this.tbMajorInterval; break; case "minorinterval": c = this.tbMinorInterval; break; } if (c == null) { return; } XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; } } finally { ee.Dispose(); } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; switch (b.Tag as string) { case "external": c = tbValueExternal; break; case "embedded": c = cbValueEmbedded; break; case "mime": c = cbMIMEType; break; case "database": c = cbValueDatabase; break; } if (c == null) { return; } XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; } } finally { ee.Dispose(); } return; }
private void bDataLabelExpr_Click(object sender, EventArgs e) { DialogExprEditor ee = new DialogExprEditor(_Draw, cbDataLabel.Text, _ReportItems[0], false); try { if (ee.ShowDialog() == DialogResult.OK) { cbDataLabel.Text = ee.Expression; } } finally { ee.Dispose(); } return; }
private void functionBox(TextBox txt) { DialogExprEditor ee = new DialogExprEditor(_Draw, txt.Text, _ReportItems[0], false); try { if (ee.ShowDialog() == DialogResult.OK) { txt.Text = ee.Expression; } } finally { ee.Dispose(); } return; }
private void bExprConnect_Click(object sender, System.EventArgs e) { DialogExprEditor ee = new DialogExprEditor(_Draw, this.tbConnection.Text, null, false); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { tbConnection.Text = ee.Expression; } } finally { ee.Dispose(); } }
private void bValueExpr_Click(object sender, System.EventArgs e) { if (dgFilters.CurrentCell == null) { dgFilters.Rows.Add("", "Equal", ""); } DataGridViewCell dgc = dgFilters.CurrentCell; int cc = dgc.ColumnIndex; string cv = dgc.Value as string; if (cc == 1) { // This is the FilterOperator DialogFilterOperator fo = new DialogFilterOperator(cv); try { DialogResult dlgr = fo.ShowDialog(); if (dlgr == DialogResult.OK) { dgc.Value = fo.Operator; } } finally { fo.Dispose(); } } else { DialogExprEditor ee = new DialogExprEditor(_Draw, cv, _FilterParent, false); try { DialogResult dlgr = ee.ShowDialog(); if (dlgr == DialogResult.OK) { dgc.Value = ee.Expression; } } finally { ee.Dispose(); } } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; switch (b.Tag as string) { case "label": c = this.cbLabelExpr; break; case "parent": c = this.cbParentExpr; break; } if (c == null) { return; } DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, _GroupingParent, false); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; } } finally { ee.Dispose(); } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; switch (b.Tag as string) { case "visibility": c = tbHidden; break; } if (c == null) return; using (DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, _TableRow)) { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; return; } }
private void bExpr_Click(object sender, EventArgs e) { GridItem gi = this.pgProps.SelectedGridItem; XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, gi.Value.ToString(), sNode, false); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { // There's probably a better way without reflection but this works fine. string nm = gi.Label; object sel = pgProps.SelectedObject; Type t = sel.GetType(); PropertyInfo pi = t.GetProperty(nm); MethodInfo mi = pi.GetSetMethod(); object[] oa = new object[1]; oa[0] = ee.Expression; mi.Invoke(sel, oa); gi.Select(); } } finally { ee.Dispose(); } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; bool bColor=false; switch (b.Tag as string) { case "bcolor": c = cbBackColor; bColor = true; break; case "bgradient": c = cbGradient; break; case "bendcolor": c = cbEndColor; bColor = true; break; case "database": c = cbValueDatabase; break; case "embedded": c = cbValueEmbedded; break; case "external": c = tbValueExternal; break; case "repeat": c = cbRepeat; break; case "mime": c = cbMIMEType; break; } if (c == null) return; XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor); DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; return; }
private void bDataExpr_Click(object sender, System.EventArgs e) { Button bs = sender as Button; if (bs == null) { return; } Control ctl = null; switch (bs.Tag as string) { case "d1": ctl = cbChartData; break; case "d2": ctl = cbChartData2; break; case "d3": ctl = cbChartData3; break; //AJM GJL 14082008 case "d4": ctl = cbVector; fVector = true; break; case "d5": ctl = cbChartType; fChartType = true; break; case "d6": ctl = cbPalette; fPalette = true; break; case "d7": ctl = cbSubType; fSubtype = true; break; default: return; } DialogExprEditor ee = new DialogExprEditor(_Draw, ctl.Text, _ReportItems[0], false); try { DialogResult dlgr = ee.ShowDialog(); if (dlgr == DialogResult.OK) { ctl.Text = ee.Expression; fChartData = true; } } finally { ee.Dispose(); } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; bool bColor = false; switch (b.Tag as string) { case "bcolor": c = cbBackColor; bColor = true; break; case "bgradient": c = cbGradient; break; case "bendcolor": c = cbEndColor; bColor = true; break; case "database": c = cbValueDatabase; break; case "embedded": c = cbValueEmbedded; break; case "external": c = tbValueExternal; break; case "repeat": c = cbRepeat; break; case "mime": c = cbMIMEType; break; } if (c == null) { return; } XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor); DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; } return; }
private void bDataLabelExpr_Click(object sender, EventArgs e) { DialogExprEditor ee = new DialogExprEditor(_Draw, cbDataLabel.Text,_ReportItems[0] , false); try { if (ee.ShowDialog() == DialogResult.OK) { cbDataLabel.Text = ee.Expression; } } finally { ee.Dispose(); } return; }
private void bValueExpr_Click(object sender, System.EventArgs e) { int cr = dgGroup.CurrentRowIndex; if (cr < 0) { // No rows yet; create one string[] rowValues = new string[1]; rowValues[0] = null; _DataTable.Rows.Add(rowValues); cr = 0; } DataGridCell dgc = dgGroup.CurrentCell; int cc = dgc.ColumnNumber; DataRow dr = _DataTable.Rows[cr]; string cv = dr[cc] as string; DialogExprEditor ee = new DialogExprEditor(_Draw, cv, _GroupingParent, false); try { DialogResult dlgr = ee.ShowDialog(); if (dlgr == DialogResult.OK) dr[cc] = ee.Expression; } finally { ee.Dispose(); } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; bool bColor = false; switch (b.Tag as string) { case "pleft": c = tbPadLeft; break; case "pright": c = tbPadRight; break; case "ptop": c = tbPadTop; break; case "pbottom": c = tbPadBottom; break; case "bcolor": c = cbBackColor; bColor = true; break; case "bgradient": c = cbGradient; break; case "bendcolor": c = cbEndColor; bColor = true; break; } if (c == null) { return; } XmlNode sNode = _ReportItems[0]; using (DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor)) { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; } } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; switch (b.Tag as string) { case "bookmark": c = tbBookmark; break; case "bookmarklink": c = tbBookmarkLink; break; case "hyperlink": c = tbHyperlink; break; case "visibility": c = tbHidden; break; } if (c == null) return; XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; if ((string)(b.Tag) == "bookmark") fBookmark = true; else fAction = true; } } finally { ee.Dispose(); } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; bool bColor=false; switch (b.Tag as string) { case "min": c = this.tbMin; break; case "max": c = this.tbMax; break; case "majorinterval": c = this.tbMajorInterval; break; case "minorinterval": c = this.tbMinorInterval; break; } if (c == null) return; XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; } finally { ee.Dispose(); } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) { return; } Control c = null; bool bColor = false; switch (b.Tag as string) { case "value": c = cbValue; break; case "family": c = cbFontFamily; break; case "style": c = cbFontStyle; break; case "color": c = cbColor; bColor = true; break; case "size": c = cbFontSize; break; case "weight": c = cbFontWeight; break; case "decoration": c = cbTextDecoration; break; case "halign": c = cbHorzAlign; break; case "valign": c = cbVerticalAlign; break; case "direction": c = cbDirection; break; case "writing": c = cbWritingMode; break; case "format": c = cbFormat; break; } if (c == null) { return; } XmlNode sNode = _ReportItems[0]; using (DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor)) { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) { c.Text = ee.Expression; } } return; }
private void bValueExpr_Click(object sender, System.EventArgs e) { if (dgSorting.CurrentCell == null) dgSorting.Rows.Add("",true); DataGridViewCell dgc = dgSorting.CurrentCell; int cc = dgc.ColumnIndex; // >>>>>>>>>> // the only column that should be edited is the first one ( "Sort expression" ) if (cc != 0) dgc = dgSorting.CurrentCell = dgSorting.CurrentRow.Cells[0]; // <<<<<<<<<< string cv = dgc.Value as string; using (DialogExprEditor ee = new DialogExprEditor(_Draw, cv, _SortingParent, false)) { DialogResult dlgr = ee.ShowDialog(); if (dlgr == DialogResult.OK) dgc.Value = ee.Expression; } }
void fxExpr_Click(object sender, EventArgs e) { MDIChild mc = this.ActiveMdiChild as MDIChild; if (mc == null || mc.DesignTab != "design" || mc.DrawCtl.SelectedCount != 1 || mc.Editor == null) return; XmlNode tn = mc.DrawCtl.SelectedList[0]; using (DialogExprEditor de = new DialogExprEditor(mc.DrawCtl, ctlEditTextbox.Text, tn)) { // Display the UI editor dialog if (de.ShowDialog(this) == DialogResult.OK) { ctlEditTextbox.Text = de.Expression; mc.Editor.SetSelectedText(de.Expression); SetProperties(mc); } } }
private void bValueExpr_Click(object sender, System.EventArgs e) { if (dgFilters.CurrentCell == null) dgFilters.Rows.Add("", "Equal", ""); DataGridViewCell dgc = dgFilters.CurrentCell; int cc = dgc.ColumnIndex; string cv = dgc.Value as string; if (cc == 1) { // This is the FilterOperator DialogFilterOperator fo = new DialogFilterOperator(cv); try { DialogResult dlgr = fo.ShowDialog(); if (dlgr == DialogResult.OK) dgc.Value = fo.Operator; } finally { fo.Dispose(); } } else { DialogExprEditor ee = new DialogExprEditor(_Draw, cv, _FilterParent, false); try { DialogResult dlgr = ee.ShowDialog(); if (dlgr == DialogResult.OK) dgc.Value = ee.Expression; } finally { ee.Dispose(); } } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; switch (b.Tag as string) { case "external": c = tbValueExternal; break; case "embedded": c = cbValueEmbedded; break; case "mime": c = cbMIMEType; break; case "database": c = cbValueDatabase; break; } if (c == null) return; XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; } finally { ee.Dispose(); } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; bool bColor=false; switch (b.Tag as string) { case "sd": c = cbStyleDefault; break; case "cd": c = cbColorDefault; bColor = true; break; case "wd": c = tbWidthDefault; break; case "sl": c = cbStyleLeft; break; case "cl": c = cbColorLeft; bColor = true; break; case "wl": c = tbWidthLeft; break; case "sr": c = cbStyleRight; break; case "cr": c = cbColorRight; bColor = true; break; case "wr": c = tbWidthRight; break; case "st": c = cbStyleTop; break; case "ct": c = cbColorTop; bColor = true; break; case "wt": c = tbWidthTop; break; case "sb": c = cbStyleBottom; break; case "cb": c = cbColorBottom; bColor = true; break; case "wb": c = tbWidthBottom; break; } if (c == null) return; XmlNode sNode = _ReportItems[0]; using (DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor)) { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; } return; }
private void bDataExpr_Click(object sender, System.EventArgs e) { Button bs = sender as Button; if (bs == null) return; Control ctl = null; switch (bs.Tag as string) { case "d1": ctl = cbChartData; break; case "d2": ctl = cbChartData2; break; case "d3": ctl = cbChartData3; break; //AJM GJL 14082008 case "d4": ctl = cbVector; fVector = true; break; case "d5": ctl = cbChartType; fChartType = true; break; case "d6": ctl = cbPalette; fPalette = true; break; case "d7": ctl = cbSubType; fSubtype = true; break; default: return; } DialogExprEditor ee = new DialogExprEditor(_Draw, ctl.Text, _ReportItems[0], false); try { DialogResult dlgr = ee.ShowDialog(); if (dlgr == DialogResult.OK) { ctl.Text = ee.Expression; fChartData = true; } } finally { ee.Dispose(); } }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; bool bColor=false; switch (b.Tag as string) { case "pleft": c = tbPadLeft; break; case "pright": c = tbPadRight; break; case "ptop": c = tbPadTop; break; case "pbottom": c = tbPadBottom; break; case "bcolor": c = cbBackColor; bColor = true; break; case "bgradient": c = cbGradient; break; case "bendcolor": c = cbEndColor; bColor = true; break; } if (c == null) return; XmlNode sNode = _ReportItems[0]; using (DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor)) { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; bool bColor=false; switch (b.Tag as string) { case "family": c = cbFontFamily; break; case "style": c = cbFontStyle; break; case "color": c = cbColor; bColor = true; break; case "size": c = cbFontSize; break; case "weight": c = cbFontWeight; break; case "decoration": c = cbTextDecoration; break; case "halign": c = cbHorzAlign; break; case "valign": c = cbVerticalAlign; break; case "direction": c = cbDirection; break; case "writing": c = cbWritingMode; break; case "format": c = cbFormat; break; } if (c == null) return; XmlNode sNode = _ReportItems[0]; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, sNode, bColor); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; } finally { ee.Dispose(); } return; }
private void bExpr_Click(object sender, System.EventArgs e) { Button b = sender as Button; if (b == null) return; Control c = null; switch (b.Tag as string) { case "label": c = this.cbLabelExpr; break; case "parent": c = this.cbParentExpr; break; } if (c == null) return; DialogExprEditor ee = new DialogExprEditor(_Draw, c.Text, _GroupingParent, false); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) c.Text = ee.Expression; } finally { ee.Dispose(); } return; }
private void functionBox(TextBox txt) { DialogExprEditor ee = new DialogExprEditor(_Draw, txt.Text,_ReportItems[0] , false); try { if (ee.ShowDialog() == DialogResult.OK) { txt.Text = ee.Expression; } } finally { ee.Dispose(); } return; }
private void bExprConnect_Click(object sender, System.EventArgs e) { DialogExprEditor ee = new DialogExprEditor(_Draw, this.tbConnection.Text, null, false); try { DialogResult dr = ee.ShowDialog(); if (dr == DialogResult.OK) tbConnection.Text = ee.Expression; } finally { ee.Dispose(); } }