提交当前本机最新程序
This commit is contained in:
@@ -300,14 +300,18 @@ namespace Lskj.FastReportDesign
|
||||
{
|
||||
if (ERPInfo.Instance.IsUserManager || SystemInfo.Instance.PrintTemplate.Split(',').Contains(ERPInfo.Instance.UserName))
|
||||
{
|
||||
this.ReportObj.Prepare();
|
||||
this.ReportObj.Design(form);
|
||||
this.ReportObj.Designer.BorderStyle = BorderStyle.None;
|
||||
this.ReportObj.Designer.cmdPreview.CustomAction += OnCustomAction;
|
||||
form.ShowDialog();
|
||||
//this.ReportObj.Design(form);
|
||||
//this.ReportObj.Designer.cmdPreview.CustomAction += OnCustomAction;
|
||||
//form.ShowDialog();
|
||||
try
|
||||
{
|
||||
this.ReportObj.Prepare();
|
||||
this.ReportObj.Design(form);
|
||||
this.ReportObj.Designer.BorderStyle = BorderStyle.None;
|
||||
this.ReportObj.Designer.cmdPreview.CustomAction += OnCustomAction;
|
||||
form.ShowDialog();
|
||||
}
|
||||
finally
|
||||
{
|
||||
ReleaseDesignerResource();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -349,11 +353,53 @@ namespace Lskj.FastReportDesign
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
|
||||
//MessageUtil.Show(ex);
|
||||
this.ReportObj.Design();
|
||||
if (this.ReportObj != null)
|
||||
{
|
||||
this.ReportObj.Design();
|
||||
}
|
||||
WaitForm.HideForm();
|
||||
}
|
||||
}
|
||||
|
||||
private void ReleaseDesignerResource()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.ReportObj != null && this.ReportObj.Designer != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.ReportObj.Designer.StopAutoSave();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
this.ReportObj.Designer.cmdPreview.CustomAction -= OnCustomAction;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (form != null && !form.IsDisposed)
|
||||
{
|
||||
form.Dispose();
|
||||
}
|
||||
|
||||
if (this.ReportObj != null)
|
||||
{
|
||||
this.ReportObj.Dispose();
|
||||
this.ReportObj = null;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCustomAction(object sender, EventArgs e)
|
||||
{
|
||||
FastReport.Design.StandardDesigner.DesignerControl design = sender as FastReport.Design.StandardDesigner.DesignerControl;
|
||||
@@ -402,4 +448,4 @@ namespace Lskj.FastReportDesign
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user