コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: ModelPanel.cs プロジェクト: cty901/Seal-Report
        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);
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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());
            }
        }
コード例 #5
0
        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());
            }
        }
コード例 #6
0
ファイル: FontCtl.cs プロジェクト: suryapratap/reportingcloud
        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;
        }
コード例 #7
0
        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);
        }
コード例 #8
0
        public MainWindow()
        {
            InitializeComponent();

            var icon = BitmapFrame.Create(AssemblyHelper.GetResourceUri(GetType().Assembly, "progress.png"));

            ReportDesigner.RegisterControl <XRProgressBar>(() => new DefaultXRControlDiagramItem(), icon);
        }
コード例 #9
0
        private void bClose_Click(object sender, EventArgs e)
        {
            ReportDesigner rd = this.Parent as ReportDesigner;

            if (rd == null)
            {
                return;
            }
            rd.ShowProperties(false);
        }
コード例 #10
0
		internal DialogValidateRdl(ReportDesigner designer)
		{
			_RdlDesigner = designer;
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			return;
		}
コード例 #11
0
        public DialogToolOptions(ReportDesigner rdl)
        {
            _RdlDesigner = rdl;
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            Init();
            return;
        }
コード例 #12
0
        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 });
        }
コード例 #14
0
        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());
            }
        }
コード例 #15
0
ファイル: ModelPanel.cs プロジェクト: cnark/Seal-Report
        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();
        }
コード例 #16
0
ファイル: ViewPanel.cs プロジェクト: cnark/Seal-Report
        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();
        }
コード例 #17
0
        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();
        }
コード例 #18
0
 static void ShowGrid(ReportDesigner designer)
 {
     Tracker.Set(designer.ActiveDocument.XRObject, x => x.DrawGrid, !designer.ActiveDocument.XRObject.DrawGrid);
 }
コード例 #19
0
 public CustomizedRibbonCommands(ReportDesigner designer)
 {
     this._designer = designer;
 }