Пример #1
0
        /// <summary>
        /// 保存模板
        /// </summary>
        public void SaveTemplate(out string message)
        {
            message = string.Empty;
            frmAddTemplate addTemplate = new frmAddTemplate();

            if (addTemplate.ShowDialog() == DialogResult.Yes)
            {
                string templateName = addTemplate.TemplateName;

                message = string.Empty;
                clsConfigAssist config = new clsConfigAssist();
                config.AddTemplate(templateName, this.m_lstBoardItems, out message);
            }
        }
Пример #2
0
        private void m_cmdSaveTemplate_Click(object sender, EventArgs e)
        {
            frmAddTemplate addTemplate = new frmAddTemplate();

            if (addTemplate.ShowDialog() == DialogResult.Yes)
            {
                string templateName = addTemplate.TemplateName;

                string          message = string.Empty;
                clsConfigAssist config  = new clsConfigAssist();
                config.AddTemplate(templateName, this.m_lstBoard, out message);
                if (!string.IsNullOrEmpty(message))
                {
                    MessageBox.Show(message);
                    return;
                }
            }
        }