void evaluator_OnBeforeCompile(object sender, EventArgs e)
        {
            server.CreateNewDocument();
            SnapDocument document = server.Document;

            document.BeginUpdate();
            codeEditor.BeforeCompile();
            document.Unit = DevExpress.Office.DocumentUnit.Document;
        }
Exemple #2
0
        void InitializeStyles()
        {
            SnapDocument document = snapControl1.Document;

            document.BeginUpdate();

            TableStyle employee = document.TableStyles.CreateNew();

            employee.Name = employeeStyleName;
            employee.CellBackgroundColor = Color.PaleGreen;
            document.TableStyles.Add(employee);

            TableStyle customer = document.TableStyles.CreateNew();

            customer.Name = customerStyleName;
            customer.CellBackgroundColor = Color.Plum;
            document.TableStyles.Add(customer);

            document.TableStyles["List1"].CellBackgroundColor = Color.White;
            document.TableStyles["List2"].CellBackgroundColor = Color.LightYellow;
            document.EndUpdate();
        }
        public static void ShowSnapReportPreviewForm(this GridControl currentGridControl)
        {
            RibbonForm  SnapReportForm;
            SnapControl SnapReport;

            using (WaitDialogForm dlg = new WaitDialogForm("Please wait", "Document processing...")) {
                SnapReport     = new SnapControl();
                SnapReport.Tag = currentGridControl.DataSource;

                SnapReportForm = SnapReport.CreateReportPreviewForm();

                SnapReport.DocumentLoaded += SnapReport_DocumentLoaded;
                SnapReport.CreateNewDocument();

                AssignDataSourceToSnapControl(SnapReport);
                SnapDocument document = SnapReport.Document;
                document.BeginUpdate();
                GenerateSnapReportForGridControlContent(currentGridControl.LevelTree, document);
                document.Fields.Update();
                document.EndUpdate();
            }
            SnapReportForm.ShowDialog(currentGridControl.FindForm());
        }