public void Initialize([NotNull] TemplateFieldSorter templateFieldSorter, [NotNull] TemplateFieldSorter.TemplateFields templateFields, [NotNull] string sectionName, int sectionSortOrder, [NotNull] string sectionId)
        {
            Assert.ArgumentNotNull(templateFieldSorter, nameof(templateFieldSorter));
            Assert.ArgumentNotNull(templateFields, nameof(templateFields));
            Assert.ArgumentNotNull(sectionName, nameof(sectionName));
            Assert.ArgumentNotNull(sectionId, nameof(sectionId));

            TemplateFieldSorter   = templateFieldSorter;
            TemplateFields        = templateFields;
            SectionSortOrder.Text = sectionSortOrder.ToString();
            SectionName.Text      = sectionName;
            SectionId             = sectionId;
        }
Exemplo n.º 2
0
        public void Initialize([NotNull] TemplateFieldSorter templateFieldSorter, [NotNull] TemplateFieldSorter.TemplateFields template, bool isCloseButtonVisible)
        {
            Assert.ArgumentNotNull(templateFieldSorter, nameof(templateFieldSorter));
            Assert.ArgumentNotNull(template, nameof(template));

            TemplateFields = template;

            ItemName.Text          = template.Name;
            Icon.Source            = template.Icon.GetSource();
            TemplateFieldSorter    = templateFieldSorter;
            CloseButton.Visibility = isCloseButtonVisible ? Visibility.Visible : Visibility.Collapsed;

            // this.ItemId.Text = template.TemplateUri.ItemId.ToString();
            template.TemplateUri.Site.DataService.ExecuteAsync("Links.GetTemplateInstances", RenderInstances, template.TemplateUri.DatabaseName.ToString(), template.TemplateUri.ItemId.ToString());
        }