提交当前本机最新程序
This commit is contained in:
@@ -124,12 +124,19 @@ namespace Lskj.Control.Model
|
||||
form.IsMdiContainer = true;
|
||||
form.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
|
||||
design.ReportObj.Prepare();
|
||||
design.ReportObj.Design(form);
|
||||
design.ReportObj.Designer.BorderStyle = BorderStyle.None;
|
||||
design.ReportObj.Designer.cmdPreview.CustomAction += OnCustomAction;
|
||||
try
|
||||
{
|
||||
design.ReportObj.Prepare();
|
||||
design.ReportObj.Design(form);
|
||||
design.ReportObj.Designer.BorderStyle = BorderStyle.None;
|
||||
design.ReportObj.Designer.cmdPreview.CustomAction += OnCustomAction;
|
||||
|
||||
form.ShowDialog();
|
||||
form.ShowDialog();
|
||||
}
|
||||
finally
|
||||
{
|
||||
ReleaseFastReportDesignerResource(design);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -156,13 +163,50 @@ namespace Lskj.Control.Model
|
||||
//MessageUtil.Show(ex);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
design.ReportObj.Design();
|
||||
if (design != null && design.ReportObj != null)
|
||||
{
|
||||
design.ReportObj.Design();
|
||||
}
|
||||
WaitForm.HideForm();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void ReleaseFastReportDesignerResource(FrmFastReportDesign design)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (design != null && design.ReportObj != null && design.ReportObj.Designer != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
design.ReportObj.Designer.StopAutoSave();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
design.ReportObj.Designer.cmdPreview.CustomAction -= OnCustomAction;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (design != null && design.ReportObj != null)
|
||||
{
|
||||
design.ReportObj.Dispose();
|
||||
design.ReportObj = null;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnCustomAction(object sender, EventArgs e)
|
||||
{
|
||||
FastReport.Design.StandardDesigner.DesignerControl design = sender as FastReport.Design.StandardDesigner.DesignerControl;
|
||||
|
||||
Reference in New Issue
Block a user