public bool CanClose() { ActivePageDesigner.PageDeactivated(); if (Designer.AskSave && !SaveCurrentFile()) { ActivePageDesigner.PageActivated(); return(false); } return(true); }
internal void SetModified(object sender, string action, string objName) { FModified = true; FReport.ScriptText = Script; FUndoRedo.AddUndo(action, objName); FUndoRedo.ClearRedo(); bool resetSelection = action == "Delete" ? true : false; ActivePageDesigner.FillObjects(resetSelection); InitPages(ActivePageIndex); }
public void Preview() { ActivePageDesigner.CancelPaste(); int i = ActivePageIndex; Report.ScriptText = Script; Designer.MessagesWindow.ClearMessages(); UndoRedo.AddUndo("Preview", "Report"); Designer.Lock(); bool saveProgress = Config.ReportSettings.ShowProgress; Config.ReportSettings.ShowProgress = true; ParameterCollection saveParams = new ParameterCollection(null); saveParams.Assign(Report.Parameters); try { if (Report.Prepare()) { Config.DesignerSettings.OnCustomPreviewReport(Report, EventArgs.Empty); } } #if !DEBUG catch (Exception e) { if (!(e is CompilerException)) { using (ExceptionForm form = new ExceptionForm(e)) { form.ShowDialog(); } } else { Designer.MessagesWindow.Show(); } } #endif finally { Config.ReportSettings.ShowProgress = saveProgress; Image previewPicture = null; if (Report.ReportInfo.SavePreviewPicture) { previewPicture = Report.ReportInfo.Picture; Report.ReportInfo.Picture = null; } UndoRedo.GetUndo(1); UndoRedo.ClearRedo(); if (Report.ReportInfo.SavePreviewPicture) { Report.ReportInfo.Picture = previewPicture; } Report.Parameters.Assign(saveParams); InitPages(i); Designer.Unlock(); } }
internal void ReportDeactivated() { ActivePageDesigner.PageDeactivated(); }
internal void ReportActivated() { ActivePageDesigner.FillObjects(true); ActivePageDesigner.PageActivated(); UpdateCaption(); }