private void tlbNew_Click(object sender, EventArgs e) { using (var frm = new frmTemplateEditor()) { if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { TemplateAct(); } } }
private void tlbEdit_Click(object sender, EventArgs e) { if (StaticUnity.TemplateProvider == null || StaticUnity.Template == null) { MessageBoxHelper.ShowInformation("当前没有选择模板。"); } using (var frm = new frmTemplateEditor { Template = StaticUnity.Template }) { if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { TemplateAct(); Reload(); } } }