private void SetColor(ComboBox cbColor) { ColorDialog cd = new ColorDialog(); cd.AnyColor = true; cd.FullOpen = true; cd.CustomColors = ReportDesigner.GetCustomColors(); cd.Color = DesignerUtility.ColorFromHtml(cbColor.Text, System.Drawing.Color.Empty); try { if (cd.ShowDialog() != DialogResult.OK) { return; } ReportDesigner.SetCustomColors(cd.CustomColors); cbColor.Text = ColorTranslator.ToHtml(cd.Color); } finally { cd.Dispose(); } return; }
public void Init(ReportDesigner mainForm) { MainForm = mainForm; Model.InitReferences(); Model.InitEditor(); ModelGrid.SelectedObject = Model; ElementGrid.SelectedObject = null; SelectedButton = null; initTreeView(); elementTreeView.MouseUp += elementTreeView_MouseUp; ElementsToPanels(); restrictionsPanel.Init(this); aggregateRestrictionsPanel.Init(this); initNoSQL(); RestrictionGrid.SelectedObject = null; resizeControls(); //adjust description height PropertyGridHelper.ResizeDescriptionArea(ModelGrid, 3); }
private void bColor_Click(object sender, System.EventArgs e) { using (ColorDialog cd = new ColorDialog()) { cd.AnyColor = true; cd.FullOpen = true; cd.CustomColors = ReportDesigner.GetCustomColors(); if (cd.ShowDialog() != DialogResult.OK) { return; } ReportDesigner.SetCustomColors(cd.CustomColors); if (sender == this.bEndColor) { cbEndColor.Text = ColorTranslator.ToHtml(cd.Color); } else if (sender == this.bBackColor) { cbBackColor.Text = ColorTranslator.ToHtml(cd.Color); } } return; }
private void OnAdd_Click(object sender, System.Windows.RoutedEventArgs e) { try { if (this.selectedReportType == ReportTypeEnum.ReportContent && !this.reportCategoryId.HasValue) { throw new ApplicationException("Invalid report category selected"); } ReportDesigner designer = new ReportDesigner(new ReportMasterModel { ReportTypeEnum = (int)this.selectedReportType, PaperKindEnum = (int)PaperKind.A4, PageOrientationEnum = (int)PageOrientationEnum.Portrait, PageMarginTop = 100, PageMarginBottom = 100, PageMarginLeft = 100, PageMarginRight = 100, ProjectName = General.ProjectModel.ModelName, CategoryId = this.reportCategoryId }); ControlDialog.WindowsShowIsClosing += this.WindowsShow_IsClosing; ControlDialog.Show($"New {this.selectedReportType.GetDescriptionAttribute()}", designer, "Save", windowState: WindowState.Maximized); } catch (Exception err) { MessageBox.Show(err.InnerExceptionMessage()); } }
private void WindowsShow_IsClosing(object sender, UserControlBase control, CancelEventArgs e) { try { if (control.GetType() != typeof(ReportDesigner)) { return; } ReportDesigner userControl = control.To <ReportDesigner>(); ControlDialog.WindowsShowIsClosing -= this.WindowsShow_IsClosing; if (userControl.ReportMaster.MasterReport_Id <= 0) { // User did not save the report return; } this.HeadersAndFooters = this.HeadersAndFooters.Add(userControl.ReportMaster); } catch (Exception err) { MessageBox.Show(err.InnerExceptionMessage()); } }
private void bColor_Click(object sender, System.EventArgs e) { ColorDialog cd = new ColorDialog(); cd.AnyColor = true; cd.FullOpen = true; cd.CustomColors = ReportDesigner.GetCustomColors(); cd.Color = DesignerUtility.ColorFromHtml(cbColor.Text, System.Drawing.Color.Black); try { if (cd.ShowDialog() != DialogResult.OK) { return; } ReportDesigner.SetCustomColors(cd.CustomColors); if (sender == this.bColor) { cbColor.Text = ColorTranslator.ToHtml(cd.Color); } } finally { cd.Dispose(); } return; }
public void Init(ReportDesigner mainForm) { MainForm = mainForm; Model.InitReferences(); Model.InitEditor(); ModelGrid.SelectedObject = Model; ElementGrid.SelectedObject = null; SelectedButton = null; initTreeView(); ElementsToPanels(); restrictionsPanel.Init(this); aggregateRestrictionsPanel.Init(this); RestrictionGrid.SelectedObject = null; _LINQwarningDone = false; resizeControls(); if (Model.IsLINQ && Model.LINQSubTables.Count == 0 && Model.LINQSubModels.Count == 0) { UpdateLINQModel(); } //adjust description height PropertyGridHelper.ResizeDescriptionArea(ModelGrid, 3); }
public MainWindow() { InitializeComponent(); var icon = BitmapFrame.Create(AssemblyHelper.GetResourceUri(GetType().Assembly, "progress.png")); ReportDesigner.RegisterControl <XRProgressBar>(() => new DefaultXRControlDiagramItem(), icon); }
private void bClose_Click(object sender, EventArgs e) { ReportDesigner rd = this.Parent as ReportDesigner; if (rd == null) { return; } rd.ShowProperties(false); }
internal DialogValidateRdl(ReportDesigner designer) { _RdlDesigner = designer; // // Required for Windows Form Designer support // InitializeComponent(); return; }
public DialogToolOptions(ReportDesigner rdl) { _RdlDesigner = rdl; // // Required for Windows Form Designer support // InitializeComponent(); Init(); return; }
public static void ShowDesigner(IGridViewFactory <ColumnWrapper, RowBaseWrapper> owner) { XtraReport report = new XtraReport(); ReportGenerationExtensions <ColumnWrapper, RowBaseWrapper> .Generate(report, owner); var reportDesigner = new ReportDesigner(); reportDesigner.Loaded += (s, e) => { reportDesigner.OpenDocument(report); }; reportDesigner.ShowWindow(owner as FrameworkElement); }
void AddParameter(object sender, EventArgs e) { string description = String.Format(DesignSR.Trans_Add, typeof(MyParameter).Name); DesignerTransaction transaction = designerHost.CreateTransaction(description); MyParameter parameter = new MyParameter(); try { PropertyDescriptor property = DevExpress.XtraReports.Native.XRAccessor.GetPropertyDescriptor(report, XRComponentPropertyNames.Parameters); changeServ.OnComponentChanging(report, property); ReportDesigner.AddToContainer(designerHost, parameter); report.Parameters.Add(parameter); changeServ.OnComponentChanged(report, property, null, null); } finally { transaction.Commit(); } selectionServ.SetSelectedComponents(new object[] { parameter }); }
private void OnEdit_Click(object sender, System.Windows.RoutedEventArgs e) { if (this.SelectedHeaderAndFooter == null) { MessageBox.Show("Please select a Report Object"); return; } try { ReportDesigner designer = new ReportDesigner(this.SelectedHeaderAndFooter); ControlDialog.Show($"Edit {this.selectedReportType.GetDescriptionAttribute()}", designer, "Save", windowState: WindowState.Maximized); } catch (Exception err) { MessageBox.Show(err.InnerExceptionMessage()); } }
public void Init(ReportDesigner mainForm) { MainForm = mainForm; Model.InitReferences(); Model.InitEditor(); ModelGrid.SelectedObject = Model; ElementGrid.SelectedObject = null; SelectedButton = null; initTreeView(); elementTreeView.MouseUp += elementTreeView_MouseUp; ElementsToPanels(); restrictionsPanel.Init(this); aggregateRestrictionsPanel.Init(this); initNoSQL(); RestrictionGrid.SelectedObject = null; resizeControls(); }
public void Init(ReportDesigner mainForm) { MainForm = mainForm; templateComboBox.SelectedIndexChanged -= templateComboBox_SelectedIndexChanged; templateComboBox.DataSource = null; templateComboBox.Items.Clear(); //templateComboBox.DataSource = MainForm.Report.Templates; templateComboBox.DisplayMember = "Name"; templateComboBox.Refresh(); // templateComboBox.SelectedItem = MainForm.Report.Templates.FirstOrDefault(i => i.Name == View.ViewName); templateComboBox.SelectedIndexChanged += templateComboBox_SelectedIndexChanged; modelComboBox.SelectedIndexChanged -= modelComboBox_SelectedIndexChanged; modelComboBox.DataSource = null; modelComboBox.Items.Clear(); modelComboBox.DataSource = MainForm.Report.Models; modelComboBox.DisplayMember = "NameEx"; modelComboBox.Refresh(); modelComboBox.SelectedItem = MainForm.Report.Models.FirstOrDefault(i => i.GUID == View.ModelGUID); ; modelComboBox.SelectedIndexChanged += modelComboBox_SelectedIndexChanged; UpdateControls(); }
public void Init(ReportDesigner mainForm) { MainForm = mainForm; templateComboBox.SelectedIndexChanged -= templateComboBox_SelectedIndexChanged; templateComboBox.DataSource = null; templateComboBox.Items.Clear(); //templateComboBox.DataSource = MainForm.Report.Templates; templateComboBox.DisplayMember = "Name"; templateComboBox.Refresh(); // templateComboBox.SelectedItem = MainForm.Report.Templates.FirstOrDefault(i => i.Name == View.ViewName); templateComboBox.SelectedIndexChanged += templateComboBox_SelectedIndexChanged; modelComboBox.SelectedIndexChanged -= modelComboBox_SelectedIndexChanged; modelComboBox.DataSource = null; modelComboBox.Items.Clear(); modelComboBox.DataSource = MainForm.Report.Models; modelComboBox.DisplayMember = "NameEx"; modelComboBox.Refresh(); modelComboBox.SelectedItem = MainForm.Report.Models.FirstOrDefault(i => i.GUID == View.ModelGUID);; modelComboBox.SelectedIndexChanged += modelComboBox_SelectedIndexChanged; UpdateControls(); }
static void ShowGrid(ReportDesigner designer) { Tracker.Set(designer.ActiveDocument.XRObject, x => x.DrawGrid, !designer.ActiveDocument.XRObject.DrawGrid); }
public CustomizedRibbonCommands(ReportDesigner designer) { this._designer = designer; }