You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
using DQ.Construction.NewLook.DataTemplate;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DQ.Construction.NewLook.DataManager
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// FrmDataTemplateEditor
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class FrmDataTemplateEditor : DevExpress.XtraEditors.XtraForm
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly string filepath;
|
|
|
|
|
|
private DateTemplateMatch config;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Initializes a new instance of the <see cref="FrmDataTemplateEditor"/> class.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filepath">doc</param>
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|