Пример #1
0
 private void AddProperties(ExpectedType expectedType, string alias, string name)
 {
     expectedType.Properties = new List<ExpectedProperty>();
     expectedType.Properties.Add(new ExpectedProperty()
     {
         Name = name + " Textstring Root",
         Alias = alias + "TextstringRoot",
         DataType = new ExpectedDataType()
         {
             DataTypeName = "Textstring",
             DbType = DataTypeDatabaseType.Nvarchar,
             PropertyEditorAlias = "Umbraco.Textbox"
         },
         Description = "",
         Mandatory = false,
         SortOrder = 0,
         Regex = ""
     });
     expectedType.Properties.Add(new ExpectedProperty()
     {
         Name = name + " True False Root",
         Alias = alias + "TrueFalseRoot",
         DataType = new ExpectedDataType()
         {
             DataTypeName = "True/false",
             DbType = DataTypeDatabaseType.Integer,
             PropertyEditorAlias = "Umbraco.TrueFalse"
         },
         Description = "",
         Mandatory = false,
         SortOrder = 0,
         Regex = ""
     });
     expectedType.Properties.Add(new ExpectedProperty()
     {
         Name = name + " Numeric Root",
         Alias = alias + "NumericRoot",
         DataType = new ExpectedDataType()
         {
             DataTypeName = "Numeric",
             DbType = DataTypeDatabaseType.Integer,
             PropertyEditorAlias = "Umbraco.Integer"
         },
         Description = "",
         Mandatory = false,
         SortOrder = 0,
         Regex = ""
     });
 }
Пример #2
0
        private void AddTab(ExpectedType expectedType, string alias, string name)
        {
            expectedType.Tabs = new List<ExpectedTab>();
            expectedType.Tabs.Add(new ExpectedTab()
            {
                Name = name + " Tab",
                SortOrder = 0
            });
            expectedType.Tabs.Last().Properties = new List<ExpectedProperty>();

            expectedType.Tabs.Last().Properties.Add(CommonTabProperty(name));

            expectedType.Tabs.Last().Properties.Add(new ExpectedProperty()
            {
                Alias = alias + "RichtextEditorTab_" + name.Replace(" ", "_") + "_Tab",
                Name = name + " Richtext Editor Tab",
                Description = "",
                DataType = new ExpectedDataType()
                {
                    DataTypeName = "Richtext editor",
                    DbType = DataTypeDatabaseType.Ntext,
                    PropertyEditorAlias = "Umbraco.TinyMCEv3"
                },
                Mandatory = false,
                SortOrder = 0,
                Regex = ""
            });
            expectedType.Tabs.Last().Properties.Add(new ExpectedProperty()
            {
                Alias = alias + "DatePickerTab_" + name.Replace(" ", "_") + "_Tab",
                Name = name + " Date Picker Tab",
                Description = "",
                DataType = new ExpectedDataType()
                {
                    DataTypeName = "Date Picker",
                    DbType = DataTypeDatabaseType.Date,
                    PropertyEditorAlias = "Umbraco.Date"
                },
                Mandatory = false,
                SortOrder = 0,
                Regex = ""
            });
        }