Beispiel #1
0
        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, 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)
                {
                    //changed from forum, User: Aulofee http://www.fyireporting.com/forum/viewtopic.php?t=884
                    // 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.PropertyDescriptor.SetValue(sel, ee.Expression);
                    gi.Select();
                }
            }
            finally
            {
                ee.Dispose();
            }
        }
Beispiel #3
0
        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;
        }
Beispiel #4
0
        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 "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;
        }
Beispiel #6
0
        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;
        }
Beispiel #7
0
        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 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)
        {
            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();
                }
            }
        }
Beispiel #10
0
        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 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();
            }
        }
Beispiel #12
0
        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;
        }