コード例 #1
0
        public void SelectTemplate(string reference)
        {
            TemplateDefinition td = TemplateDefinition.Load();

            CurrentTemplateReference = reference;
            if (reference == "") // Root Node
            {
                //Hidden TabEdit and TemplateEdit when Load first time
                TemplateCtrl.Visible     = false;
                TemplateListCtrl.Visible = true;

                //Load data to TemplateList
                TemplateListCtrl.LoadData(td);
            }
            else
            {
                //Hidden TabEdit and TabList control when Edit Template
                TabListCtrl.Visible = false;
                TabCtrl.Visible     = false;

                //Show TemplateEdit but hidden TemplateList
                TemplateDefinition.Template t = td.GetTemplate(reference);
                TemplateListCtrl.Visible = false;
                TemplateCtrl.Visible     = true;
                TemplateCtrl.LoadData(reference);
            }
        }
コード例 #2
0
        public void FilterTemplateByType(string templateType)
        {
            TemplateDefinition td = TemplateDefinition.Load();

            CurrentTemplateType = templateType;
            if (templateType == "") // Don't filter
            {
                //Hidden TabEdit and TemplateEdit when Load first time
                TemplateCtrl.Visible     = false;
                TemplateListCtrl.Visible = true;

                //Load data to TemplateList
                TemplateListCtrl.LoadData(td);
            }
            else
            {
                //Hidden TabEdit and TemplateEdit when Load first time
                TemplateCtrl.Visible     = false;
                TemplateListCtrl.Visible = true;

                //Load data to TemplateList
                TemplateListCtrl.LoadData(td, templateType);
            }
        }