using DQ.Construction.NewLook.DataTemplate; using System; using System.Windows.Forms; namespace DQ.Construction.NewLook.DataManager { /// /// FrmDataTemplateEditor /// public partial class FrmDataTemplateEditor : DevExpress.XtraEditors.XtraForm { private readonly string filepath; private DateTemplateMatch config; /// /// Initializes a new instance of the class. /// /// doc public FrmDataTemplateEditor(string filepath) { this.InitializeComponent(); this.filepath = filepath; this.config = DateTemplateMatchManager.LoadForm(this.filepath); this.gridMain.DataSource = this.config.Items; } private void btnCancel_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; } private void btnOK_Click(object sender, EventArgs e) { DateTemplateMatchManager.SaveTo(this.filepath, this.config); this.DialogResult = DialogResult.OK; } } }