コード例 #1
0
        private void BuildGroupingTabs()
        {
            var aNode = _Nodes[0];

            if (aNode.Name == "DynamicSeries")
            {
                Text = Strings.PropertyDialog_BuildGroupingTabs_SeriesGrouping;
            }
            else if (aNode.Name == "DynamicCategories")
            {
                Text = Strings.PropertyDialog_BuildGroupingTabs_CategoryGrouping;
            }
            else
            {
                Text = Strings.PropertyDialog_BuildGroupingTabs_GroupingAndSorting;
            }

            var gc = new GroupingCtl(_Draw, aNode);

            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grouping, gc);

            var sc = new SortingCtl(_Draw, aNode);

            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, sc);

            // We have to create a grouping here but will need to kill it if no definition follows it
            var gNode = _Draw.GetCreateNamedChildNode(aNode, "Grouping");

            var fc = new FiltersCtl(_Draw, gNode);

            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
        }
コード例 #2
0
        private void BuildGroupingTabs()
        {
            XmlNode aNode = _Nodes[0];

            if (aNode.Name == "DynamicSeries")
            {
                this.Text = "系列分组";
            }
            else if (aNode.Name == "DynamicCategories")
            {
                this.Text = "栏目分组";
            }
            else
            {
                this.Text = "分组和排序";
            }

            GroupingCtl gc = new GroupingCtl(_Draw, aNode);

            AddTab("分组", gc);

            SortingCtl sc = new SortingCtl(_Draw, aNode);

            AddTab("排序", sc);

            // We have to create a grouping here but will need to kill it if no definition follows it
            XmlNode gNode = _Draw.GetCreateNamedChildNode(aNode, "Grouping");

            FiltersCtl fc = new FiltersCtl(_Draw, gNode);

            AddTab("条件", fc);

            return;
        }
コード例 #3
0
        private void BuildReportItemTabs()
        {
            XmlNode aNode = _Nodes[0];

            // Determine if all nodes are the same type
            string type = aNode.Name;

            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                {
                    type = t;
                }
            }

            foreach (XmlNode pNode in this._Nodes)
            {
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                    {
                        t = pNode.Name;
                    }
                }
                if (t != type)
                {
                    type = "";                  // Not all nodes have the same type
                }
            }

            EnsureStyle();      // Make sure we have Style nodes for all the report items

            if (_Nodes.Count > 1)
            {
                this.Text = "Group Selection Properties";
            }
            else
            {
                string name = _Draw.GetElementAttribute(aNode, "Name", "");
                this.Text = string.Format("{0} {1} Properties", type.Replace("fyi:", ""), name);
            }

            // Create all the tabs
            if (type == "Textbox")
            {
                StyleTextCtl stc = new StyleTextCtl(_Draw, this._Nodes);
                AddTab("Text", stc);
            }
            else if (type == "List")
            {
                ListCtl lc = new ListCtl(_Draw, this._Nodes);
                AddTab("List", lc);
                if (_Nodes.Count == 1)
                {
                    XmlNode    l  = _Nodes[0];
                    FiltersCtl fc = new FiltersCtl(_Draw, l);
                    AddTab("Filters", fc);
                    SortingCtl srtc = new SortingCtl(_Draw, l);
                    AddTab("Sorting", srtc);
                }
            }
            else if (type == "Chart")
            {
                ChartCtl cc = new ChartCtl(_Draw, this._Nodes);
                AddTab("Chart", cc);

                // 05122007 AJM & GJL Create a new StaticSeriesCtl tab
                StaticSeriesCtl ssc = new StaticSeriesCtl(_Draw, this._Nodes);
                if (ssc.ShowMe)
                {
                    //If the chart has static series, then show the StaticSeriesCtl GJL
                    AddTab("Static Series", ssc);
                }


                if (_Nodes.Count == 1)
                {
                    FiltersCtl fc = new FiltersCtl(_Draw, _Nodes[0]);
                    AddTab("Filters", fc);
                }
            }
            else if (type == "Image")
            {
                ImageCtl imgc = new ImageCtl(_Draw, this._Nodes);
                AddTab("Image", imgc);
            }
            else if (type == "Table")
            {
                XmlNode  table = _Nodes[0];
                TableCtl tc    = new TableCtl(_Draw, this._Nodes);
                AddTab("Table", tc);
                FiltersCtl fc = new FiltersCtl(_Draw, table);
                AddTab("Filters", fc);
                XmlNode details = _Draw.GetNamedChildNode(table, "Details");
                if (details != null)
                {       // if no details then we don't need details sorting
                    GroupingCtl grpc = new GroupingCtl(_Draw, details);
                    AddTab("Grouping", grpc);
                    SortingCtl srtc = new SortingCtl(_Draw, details);
                    AddTab("Sorting", srtc);
                }
                if (_TableColumn != null)
                {
                    TableColumnCtl tcc = new TableColumnCtl(_Draw, _TableColumn);
                    AddTab("Table Column", tcc);
                }
                if (_TableRow != null)
                {
                    TableRowCtl trc = new TableRowCtl(_Draw, _TableRow);
                    AddTab("Table Row", trc);
                }
            }
            else if (type == "fyi:Grid")
            {
                GridCtl gc = new GridCtl(_Draw, this._Nodes);
                AddTab("Grid", gc);
            }
            else if (type == "Matrix")
            {
                XmlNode   matrix = _Nodes[0];
                MatrixCtl mc     = new MatrixCtl(_Draw, this._Nodes);
                AddTab("Matrix", mc);
                FiltersCtl fc = new FiltersCtl(_Draw, matrix);
                AddTab("Filters", fc);
            }
            else if (type == "Subreport" && _Nodes.Count == 1)
            {
                XmlNode      subreport = _Nodes[0];
                SubreportCtl src       = new SubreportCtl(_Draw, subreport);
                AddTab("Subreport", src);
            }
            else if (aNode.Name == "CustomReportItem")
            {
                XmlNode             cri  = _Nodes[0];
                CustomReportItemCtl cric = new CustomReportItemCtl(_Draw, _Nodes);
                AddTab(type, cric);
            }

            // Position tab
            PositionCtl pc = new PositionCtl(_Draw, this._Nodes);

            AddTab("Name/Position", pc);

            // Border tab
            StyleBorderCtl bc = new StyleBorderCtl(_Draw, null, this._Nodes);

            AddTab("Border", bc);

            if (!(type == "Line" || type == "Subreport"))
            {
                // Style tab
                StyleCtl sc = new StyleCtl(_Draw, this._Nodes);
                AddTab("Style", sc);

                // Interactivity tab
                InteractivityCtl ic = new InteractivityCtl(_Draw, this._Nodes);
                AddTab("Interactivity", ic);
            }
        }
コード例 #4
0
        private void BuildReportItemTabs()
        {
            XmlNode aNode = _Nodes[0];

            // Determine if all nodes are the same type
            string type = aNode.Name;

            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                {
                    type = t;
                }
            }

            foreach (XmlNode pNode in this._Nodes)
            {
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                    {
                        t = pNode.Name;
                    }
                }
                if (t != type)
                {
                    type = "";                  // Not all nodes have the same type
                }
            }

            EnsureStyle();      // Make sure we have Style nodes for all the report items

            if (_Nodes.Count > 1)
            {
                Text = Strings.PropertyDialog_BuildReportItemTabs_GroupSelectionProperties;
            }
            else
            {
                var name = _Draw.GetElementAttribute(aNode, "Name", "");
                Text = string.Format("{0} {1} " + Strings.PropertyDialog_BuildReportItemTabs_Properties, type.Replace("fyi:", ""), name);
            }

            // Create all the tabs
            switch (type)
            {
            case "Textbox":
                var stc = new StyleTextCtl(_Draw, _Nodes, this);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Text, stc);
                break;

            case "List":
                var lc = new ListCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_List, lc);

                if (_Nodes.Count == 1)
                {
                    var l  = _Nodes[0];
                    var fc = new FiltersCtl(_Draw, l);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
                    var srtc = new SortingCtl(_Draw, l);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
                }
                break;

            case "Chart":
                var cc = new ChartCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Chart, cc);

                // 05122007 AJM & GJL Create a new StaticSeriesCtl tab
                var ssc = new StaticSeriesCtl(_Draw, _Nodes);

                if (ssc.ShowMe)
                {
                    //If the chart has static series, then show the StaticSeriesCtl GJL
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_StaticSeries, ssc);
                }

                if (_Nodes.Count == 1)
                {
                    var fc = new FiltersCtl(_Draw, _Nodes[0]);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
                }
                break;

            case "Image":
                var imgc = new ImageCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Image, imgc);
                break;

            case "Table":
                var table = _Nodes[0];
                var tc    = new TableCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Table, tc);
                var fct = new FiltersCtl(_Draw, table);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fct);
                var details = _Draw.GetNamedChildNode(table, "Details");

                if (details != null)
                {
                    // if no details then we don't need details sorting
                    var grpc = new GroupingCtl(_Draw, details);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grouping, grpc);
                    var srtc = new SortingCtl(_Draw, details);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
                }

                if (_TableColumn != null)
                {
                    var tcc = new TableColumnCtl(_Draw, _TableColumn);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableColumn, tcc);
                }

                if (_TableRow != null)
                {
                    var trc = new TableRowCtl(_Draw, _TableRow);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableRow, trc);
                }
                break;

            case "fyi:Grid":
                var gc = new GridCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grid, gc);
                break;

            case "Matrix":
                var matrix = _Nodes[0];
                var mc     = new MatrixCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Matrix, mc);
                var fcm = new FiltersCtl(_Draw, matrix);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fcm);
                break;

            case "Subreport":
                if (_Nodes.Count == 1)
                {
                    var subreport = _Nodes[0];
                    var src       = new SubreportCtl(_Draw, subreport);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Subreport, src);
                }
                break;

            default:
                if (aNode.Name == "CustomReportItem")
                {
                    var cric = new CustomReportItemCtl(_Draw, _Nodes);
                    AddTab(type, cric);
                }
                break;
            }

            // Position tab
            var pc = new PositionCtl(_Draw, this._Nodes);

            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Name_Position, pc);

            // Border tab
            var bc = new StyleBorderCtl(_Draw, null, this._Nodes);

            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Border, bc);

            if (!(type == "Line" || type == "Subreport"))
            {
                // Style tab
                var sc = new StyleCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Style, sc);

                // Interactivity tab
                var ic = new InteractivityCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Interactivity, ic);
            }
        }
コード例 #5
0
        internal SingleCtlDialog(DesignCtl dc, DesignXmlDraw dxDraw, List<XmlNode> sNodes,
            SingleCtlTypeEnum type, string[] names)
        {
            this._Type = type;
            this._DesignCtl = dc;
            this._Draw = dxDraw;
            this._Nodes = sNodes;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //   Add the control for the selected ReportItems
            //     We could have forced the user to create this (and maybe should have)
            //     instead of using an enum.
            UserControl uc = null;
            string title = null;
            switch (type)
            {
                case SingleCtlTypeEnum.InteractivityCtl:
                    title = " - Interactivty";
                    uc = new InteractivityCtl(dxDraw, sNodes);
                    break;
                case SingleCtlTypeEnum.VisibilityCtl:
                    title = " - Visibility";
                    uc = new VisibilityCtl(dxDraw, sNodes);
                    break;
                case SingleCtlTypeEnum.BorderCtl:
                    title = " - Borders";
                    uc = new StyleBorderCtl(dxDraw, names, sNodes);
                    break;
                case SingleCtlTypeEnum.FontCtl:
                    title = " - Font";
                    uc = new FontCtl(dxDraw, names, sNodes);
                    break;
                case SingleCtlTypeEnum.BackgroundCtl:
                    title = " - Background";
                    uc = new BackgroundCtl(dxDraw, names, sNodes);
                    break;
                case SingleCtlTypeEnum.ImageCtl:
                    title = " - Image";
                    uc = new ImageCtl(dxDraw, sNodes);
                    break;
                case SingleCtlTypeEnum.SubreportCtl:
                    title = " - Subreport";
                    uc = new SubreportCtl(dxDraw, sNodes[0]);
                    break;
                case SingleCtlTypeEnum.FiltersCtl:
                    title = " - Filter";
                    uc = new FiltersCtl(dxDraw, sNodes[0]);
                    break;
                case SingleCtlTypeEnum.SortingCtl:
                    title = " - Sorting";
                    uc = new SortingCtl(dxDraw, sNodes[0]);
                    break;
                case SingleCtlTypeEnum.GroupingCtl:
                    title = " - Grouping";
                    uc = new GroupingCtl(dxDraw, sNodes[0]);
                    break;
                case SingleCtlTypeEnum.ReportParameterCtl:
                    title = " - Report Parameters";
                    uc = new ReportParameterCtl(dxDraw);
                    break;
                case SingleCtlTypeEnum.ReportCodeCtl:
                    title = " - Code";
                    uc = new CodeCtl(dxDraw);
                    break;
                case SingleCtlTypeEnum.ReportModulesClassesCtl:
                    title = " - Modules and Classes";
                    uc = new ModulesClassesCtl(dxDraw);
                    break;
            }
            _Ctl = uc as IProperty;
            if (title != null)
                this.Text = this.Text + title;

            if (uc == null)
                return;
            int h = uc.Height;
            int w = uc.Width;
            uc.Top = 0;
            uc.Left = 0;
            uc.Dock = DockStyle.Fill;
            uc.Parent = this.pMain;
            this.Height = h + (this.Height - pMain.Height);
            this.Width = w + (this.Width - pMain.Width);
            this.ResumeLayout(true);
        }
コード例 #6
0
        private void BuildReportItemTabs()
        {
            XmlNode aNode = _Nodes[0];

            // Determine if all nodes are the same type
            string type = aNode.Name;
            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                    type = t;
            }

            foreach (XmlNode pNode in this._Nodes)
            {
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                        t = pNode.Name;
                }
                if (t != type)
                    type = "";			// Not all nodes have the same type
            }

            EnsureStyle();	// Make sure we have Style nodes for all the report items

            if (_Nodes.Count > 1)
                Text = Strings.PropertyDialog_BuildReportItemTabs_GroupSelectionProperties;
            else
            {
                var name = _Draw.GetElementAttribute(aNode, "Name", "");
                Text = string.Format("{0} {1} " + Strings.PropertyDialog_BuildReportItemTabs_Properties, type.Replace("fyi:", ""), name);
            }

            // Create all the tabs
	        switch (type)
	        {
		        case "Textbox":
			        var stc = new StyleTextCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Text, stc);
			        break;

		        case "List":
			        var lc = new ListCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_List, lc);

			        if (_Nodes.Count == 1)
			        {
				        var l = _Nodes[0];
				        var fc = new FiltersCtl(_Draw, l);
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
				        var srtc = new SortingCtl(_Draw, l);
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
			        }
			        break;

		        case "Chart":
			        var cc = new ChartCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Chart, cc);

			        // 05122007 AJM & GJL Create a new StaticSeriesCtl tab
			        var ssc = new StaticSeriesCtl(_Draw, _Nodes);

			        if (ssc.ShowMe)
			        {
				        //If the chart has static series, then show the StaticSeriesCtl GJL
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_StaticSeries, ssc);
			        }

			        if (_Nodes.Count == 1)
			        {
				        var fc = new FiltersCtl(_Draw, _Nodes[0]);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
			        }
			        break;

		        case "Image":
			        var imgc = new ImageCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Image, imgc);
			        break;

				case "Table":
					var table = _Nodes[0];
					var tc = new TableCtl(_Draw, _Nodes);
					AddTab(Strings.PropertyDialog_BuildReportItemTabs_Table, tc);
				    var fct = new FiltersCtl(_Draw, table);
					AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fct);
			        var details = _Draw.GetNamedChildNode(table, "Details");

					if (details != null)
					{
						// if no details then we don't need details sorting
						var grpc = new GroupingCtl(_Draw, details);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grouping, grpc);
						var srtc = new SortingCtl(_Draw, details);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
					}

					if (_TableColumn != null)
					{
						var tcc = new TableColumnCtl(_Draw, _TableColumn);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableColumn, tcc);
					}

					if (_TableRow != null)
					{
						var trc = new TableRowCtl(_Draw, _TableRow);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableRow, trc);
					}
					break;

		        case "fyi:Grid":
			        var gc = new GridCtl(_Draw, this._Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grid, gc);
			        break;

		        case "Matrix":
			        var matrix = _Nodes[0];
			        var mc = new MatrixCtl(_Draw, this._Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Matrix, mc);
			        var fcm = new FiltersCtl(_Draw, matrix);
					AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fcm);
			        break;

		        case "Subreport":
			        if (_Nodes.Count == 1)
			        {
				        var subreport = _Nodes[0];
				        var src = new SubreportCtl(_Draw, subreport);
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Subreport, src);
			        }
			        break;

				default:
			        if (aNode.Name == "CustomReportItem")
			        {
				        var cric = new CustomReportItemCtl(_Draw, _Nodes);
				        AddTab(type, cric);
			        }
			        break;
	        }

	        // Position tab
            var pc = new PositionCtl(_Draw, this._Nodes);
            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Name_Position, pc);

            // Border tab
            var bc = new StyleBorderCtl(_Draw, null, this._Nodes);
            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Border, bc);

            if (!(type == "Line" || type == "Subreport"))
            {
                // Style tab
                var sc = new StyleCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Style, sc);

                // Interactivity tab
                var ic = new InteractivityCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Interactivity, ic);
            }
        }
コード例 #7
0
        private void BuildGroupingTabs()
        {
            var aNode = _Nodes[0];

            if (aNode.Name == "DynamicSeries")
            {
                Text = Strings.PropertyDialog_BuildGroupingTabs_SeriesGrouping;
            }
            else if (aNode.Name == "DynamicCategories")
            {
                Text = Strings.PropertyDialog_BuildGroupingTabs_CategoryGrouping;
            }
            else
            {
                Text = Strings.PropertyDialog_BuildGroupingTabs_GroupingAndSorting;
            }

            var gc = new GroupingCtl(_Draw, aNode);
            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grouping, gc);

            var sc = new SortingCtl(_Draw, aNode);
			AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, sc);

            // We have to create a grouping here but will need to kill it if no definition follows it
            var gNode = _Draw.GetCreateNamedChildNode(aNode, "Grouping");

            var fc = new FiltersCtl(_Draw, gNode);
			AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
        }
コード例 #8
0
		private void BuildReportItemTabs()
		{
			XmlNode aNode = _Nodes[0];

			// Determine if all nodes are the same type
			string type = aNode.Name;
            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                    type = t;
            }

			foreach (XmlNode pNode in this._Nodes)
			{
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                        t = pNode.Name;
                }
                if (t != type)
					type = "";			// Not all nodes have the same type
			}

			EnsureStyle();	// Make sure we have Style nodes for all the report items

			if (_Nodes.Count > 1)
				this.Text = "Group Selection Properties";
			else
			{
				string name = _Draw.GetElementAttribute(aNode, "Name", "");
				this.Text = string.Format("{0} {1} Properties", type, name);
			}

			// Create all the tabs
			if (type == "Textbox")
			{
				StyleTextCtl stc = new StyleTextCtl(_Draw, this._Nodes);
				AddTab("Text", stc);
			}
			else if (type == "List")
			{
				ListCtl lc = new ListCtl(_Draw, this._Nodes);
				AddTab("List", lc);
				if (_Nodes.Count == 1)
				{
					XmlNode l = _Nodes[0];
					FiltersCtl fc = new FiltersCtl(_Draw, l);
					AddTab("Filters", fc);
					SortingCtl srtc = new SortingCtl(_Draw, l);
					AddTab("Sorting", srtc);
				}
			}
			else if (type == "Chart")
			{
				ChartCtl cc = new ChartCtl(_Draw, this._Nodes);
				AddTab("Chart", cc);
				if (_Nodes.Count == 1)
				{
					FiltersCtl fc = new FiltersCtl(_Draw, _Nodes[0]);
					AddTab("Filters", fc);
				}
			}
			else if (type == "Image")
			{
				ImageCtl imgc = new ImageCtl(_Draw, this._Nodes);
				AddTab("Image", imgc);
			}
			else if (type == "Table")
			{
				XmlNode table = _Nodes[0];
				TableCtl tc = new TableCtl(_Draw, this._Nodes);
				AddTab("Table", tc);
				FiltersCtl fc = new FiltersCtl(_Draw, table);
				AddTab("Filters", fc);
				XmlNode details = _Draw.GetNamedChildNode(table, "Details");
				if (details != null)
				{	// if no details then we don't need details sorting
					GroupingCtl grpc = new GroupingCtl(_Draw, details);
					AddTab("Grouping", grpc);
					SortingCtl srtc = new SortingCtl(_Draw, details);
					AddTab("Sorting", srtc);
				}
				if (_TableColumn != null)
				{
					TableColumnCtl tcc = new TableColumnCtl(_Draw, _TableColumn);
					AddTab("Table Column", tcc);
				}
				if (_TableRow != null)
				{
					TableRowCtl trc = new TableRowCtl(_Draw, _TableRow);
					AddTab("Table Row", trc);
				}
			}
			else if (type == "Matrix")
			{
				XmlNode matrix = _Nodes[0];
				MatrixCtl mc = new MatrixCtl(_Draw, this._Nodes);
				AddTab("Matrix", mc);
				FiltersCtl fc = new FiltersCtl(_Draw, matrix);
				AddTab("Filters", fc);
			}
			else if (type == "Subreport" && _Nodes.Count == 1)
			{
				XmlNode subreport = _Nodes[0];
				SubreportCtl src = new SubreportCtl(_Draw, subreport);
				AddTab("Subreport", src);
			}
            else if (aNode.Name == "CustomReportItem")
            {
                XmlNode cri = _Nodes[0];
                CustomReportItemCtl cric = new CustomReportItemCtl(_Draw, _Nodes);
                AddTab(type, cric);
            }

			// Position tab
			PositionCtl pc = new PositionCtl(_Draw, this._Nodes);
			AddTab("Name/Position", pc);

			// Border tab
			StyleBorderCtl bc = new StyleBorderCtl(_Draw, this._Nodes);
			AddTab("Border", bc);

			if (! (type == "Line" || type == "Subreport"))
			{
				// Style tab
				StyleCtl sc = new StyleCtl(_Draw, this._Nodes);
				AddTab("Style", sc);

				// Interactivity tab
				InteractivityCtl ic = new InteractivityCtl(_Draw, this._Nodes);
				AddTab("Interactivity", ic);
			}
		}
コード例 #9
0
		private void BuildGroupingTabs()
		{
			XmlNode aNode = _Nodes[0];
			if (aNode.Name == "DynamicSeries")
			{
				this.Text = "Series Grouping";
			}
			else if (aNode.Name == "DynamicCategories")
			{
				this.Text = "Category Grouping";
			}
			else
			{
				this.Text = "Grouping and Sorting";
			}

			GroupingCtl gc = new GroupingCtl(_Draw, aNode);
			AddTab("Grouping", gc);

			SortingCtl sc = new SortingCtl(_Draw, aNode);
			AddTab("Sorting", sc);

			// We have to create a grouping here but will need to kill it if no definition follows it
			XmlNode gNode = _Draw.GetCreateNamedChildNode(aNode, "Grouping");   

			FiltersCtl fc = new FiltersCtl(_Draw, gNode);
			AddTab("Filters", fc);
			return;
		}
コード例 #10
0
        internal SingleCtlDialog(DesignCtl dc, DesignXmlDraw dxDraw, List <XmlNode> sNodes,
                                 SingleCtlTypeEnum type, string[] names)
        {
            this._Type      = type;
            this._DesignCtl = dc;
            this._Draw      = dxDraw;
            this._Nodes     = sNodes;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //   Add the control for the selected ReportItems
            //     We could have forced the user to create this (and maybe should have)
            //     instead of using an enum.
            UserControl uc    = null;
            string      title = null;

            switch (type)
            {
            case SingleCtlTypeEnum.InteractivityCtl:
                title = " - Interactivty";
                uc    = new InteractivityCtl(dxDraw, sNodes);
                break;

            case SingleCtlTypeEnum.VisibilityCtl:
                title = " - Visibility";
                uc    = new VisibilityCtl(dxDraw, sNodes);
                break;

            case SingleCtlTypeEnum.BorderCtl:
                title = " - Borders";
                uc    = new StyleBorderCtl(dxDraw, names, sNodes);
                break;

            case SingleCtlTypeEnum.FontCtl:
                title = " - Font";
                uc    = new FontCtl(dxDraw, names, sNodes);
                break;

            case SingleCtlTypeEnum.BackgroundCtl:
                title = " - Background";
                uc    = new BackgroundCtl(dxDraw, names, sNodes);
                break;

            case SingleCtlTypeEnum.ImageCtl:
                title = " - Image";
                uc    = new ImageCtl(dxDraw, sNodes);
                break;

            case SingleCtlTypeEnum.SubreportCtl:
                title = " - Subreport";
                uc    = new SubreportCtl(dxDraw, sNodes[0]);
                break;

            case SingleCtlTypeEnum.FiltersCtl:
                title = " - Filter";
                uc    = new FiltersCtl(dxDraw, sNodes[0]);
                break;

            case SingleCtlTypeEnum.SortingCtl:
                title = " - Sorting";
                uc    = new SortingCtl(dxDraw, sNodes[0]);
                break;

            case SingleCtlTypeEnum.GroupingCtl:
                title = " - Grouping";
                uc    = new GroupingCtl(dxDraw, sNodes[0]);
                break;

            case SingleCtlTypeEnum.ReportParameterCtl:
                title = " - Report Parameters";
                uc    = new ReportParameterCtl(dxDraw);
                break;

            case SingleCtlTypeEnum.ReportCodeCtl:
                title = " - Code";
                uc    = new CodeCtl(dxDraw);
                break;

            case SingleCtlTypeEnum.ReportModulesClassesCtl:
                title = " - Modules and Classes";
                uc    = new ModulesClassesCtl(dxDraw);
                break;
            }
            _Ctl = uc as IProperty;
            if (title != null)
            {
                this.Text = this.Text + title;
            }

            if (uc == null)
            {
                return;
            }
            int h = uc.Height;
            int w = uc.Width;

            uc.Top      = 0;
            uc.Left     = 0;
            uc.Dock     = DockStyle.Fill;
            uc.Parent   = this.pMain;
            this.Height = h + (this.Height - pMain.Height);
            this.Width  = w + (this.Width - pMain.Width);
            this.ResumeLayout(true);
        }