Ejemplo n.º 1
0
        void btnAddTemplate_Click(object sender, System.EventArgs e)
        {
            SettingDialog settingDialog = new SettingDialog();
            string        name          = InputDialog.GetInputValue("New Template");

            if (name != null)
            {
                TemplateGroup group = new TemplateGroup();
                group.Name = name;

                DataGate.Project.Templates.Add(group);
                SettingDialog.Display(group, this);
                BindCombox();
                if (SettingDialog.CurrentGroup != null)
                {
                    ddlTemplate.SelectedItem = SettingDialog.CurrentGroup;
                    CurrentTemplateGroup     = SettingDialog.CurrentGroup;
                }
                else
                {
                    ddlTemplate.SelectedItem = group;
                    CurrentTemplateGroup     = group;
                }
            }
        }
Ejemplo n.º 2
0
        void btnMoreDetail_Click(object sender, System.EventArgs e)
        {
            TemplateGroup group = this.ddlTemplate.SelectedItem as TemplateGroup;

            if (group != null)
            {
                SettingDialog settingDialog = new SettingDialog();
                settingDialog.HaveParmeter = true;
                SettingDialog.Display(group, this);
                BindCombox();
                if (SettingDialog.CurrentGroup != null)
                {
                    ddlTemplate.SelectedItem = SettingDialog.CurrentGroup;
                    CurrentTemplateGroup     = SettingDialog.CurrentGroup;
                    InitDefaultItem(SettingDialog.CurrentGroup);
                }
                else
                {
                    ddlTemplate.SelectedItem = group;
                    CurrentTemplateGroup     = group;
                    InitDefaultItem(group);
                }
            }
        }