没有保存对话框的快速报告关闭设计器

fast-report close designer without save dialog

我正在开发一个使用快速报告的应用程序。 如果我修改了报告并关闭了设计器 window,系统会询问我是否要保存 "Untitled.frx"。如何防止出现此对话框?

提前致谢

AskSave 属性:

        var report = new Report();
        Config.DesignerSettings.DesignerLoaded += (object sender, EventArgs e) =>
        {
            report.Designer.AskSave = false;
        };
        report.Design();

我就是这样解决问题的。 DesignerSettings_DesignerClosed 方法是为了防止我稍后重新打开设计器时出现问题。 感谢 @Grzegorz Brzęczyszczykiewicz 使用 AskSave() 的提示。

    ...
    {
        Config.DesignerSettings.DesignerLoaded += DesignerSettings_DesignerLoaded;
        Config.DesignerSettings.DesignerClosed += DesignerSettings_DesignerClosed;
        Report.ReportData.Design(false);
    }


    private void DesignerSettings_DesignerClosed(object sender, EventArgs e) {
        Config.DesignerSettings.DesignerLoaded -= DesignerSettings_DesignerLoaded;
        Config.DesignerSettings.DesignerClosed -= DesignerSettings_DesignerClosed;
    }


    private void DesignerSettings_DesignerLoaded(object sender, EventArgs e) {
        Report.ReportData.Designer.AskSave = false;
    }