You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.3 KiB
50 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace ReportLibrary
|
|
{
|
|
public partial class TemplateDesignForm : Form
|
|
{
|
|
private FastReport.Report _report;
|
|
private string _filePath;
|
|
public FastReport.Report Report
|
|
{
|
|
get { return this.designerControl1.Report; }
|
|
set { this.designerControl1.Report = value; }
|
|
}
|
|
|
|
|
|
public void FillReport(FastReport.Report report)
|
|
{
|
|
Report = report;
|
|
designerControl1.RefreshLayout();
|
|
}
|
|
|
|
public TemplateDesignForm(FastReport.Report report, string filepath)
|
|
{
|
|
InitializeComponent();
|
|
_report = report;
|
|
_filePath = filepath;
|
|
}
|
|
|
|
private void TemplateDesignForm_Load(object sender, EventArgs e)
|
|
{
|
|
WindowState = FormWindowState.Maximized;
|
|
Report = _report;
|
|
designerControl1.RefreshLayout();
|
|
}
|
|
|
|
private void TemplateDesignForm_FormClosed(object sender, FormClosedEventArgs e)
|
|
{
|
|
Report.Save(_filePath);
|
|
this.Dispose(true);//表示真要释放资源
|
|
}
|
|
}
|
|
}
|