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); }
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); }