Esempio n. 1
0
        public FormTemplate(Template tmp)
        {
            this.tmp = (Template)tmp.Clone();
            InitializeComponent();

            txtName.Text = tmp.Name;
            txtFileNameFormat.Text = tmp.FileNameFormat;
            txtCode.Text = tmp.Code;
            txtCategory.Text = tmp.Category;
        }
Esempio n. 2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            Template tmp = new Template();
            tmp.Name = "New Template";
            tmp.Code = "Code...";

            FormTemplate form = new FormTemplate(tmp);
            if (form.ShowDialog() == DialogResult.OK)
            {
                gen.Templates.Add(form.Template);
                showCategories(form.Template.Category);
                save();
            }
        }