public virtual void Set(string key, object val) { if (val.GetType() == typeof(Template)) { manager.AddTemplate((Template)val); } else { manager.SetValue(key, val); } }
private void OnSaveTemplate() { if (TemplateManager.AddTemplate(Rule.Style, out StyleTemplate template)) { Editor.NodeMarkupPanel.EditTemplate(template); } }
private void OnSaveTemplate() { if (TemplateManager.AddTemplate(EditObject.Style, out StyleTemplate template)) { NodeMarkupPanel.EditTemplate(template); } }
public void Process() { //Create Templates //Create Layouts //Create Items //Any other configuration data var textTemplate = TemplateManager.AddTemplate("Text Only", IDs.Types.BaseModule, Ids.TemplateBase, IDs.Types.OnlyText.Type); var fieldSectionDataSection = ItemManager.AddItem("Data", Ids.Editor.Type.System.Types.FieldSectionTemplate, IDs.Types.OnlyText.Type, CreekWorm.Kernel.Items.ItemType.Item | CreekWorm.Kernel.Items.ItemType.System, IDs.Types.OnlyText.DataSection); TemplateField nameField = TemplateField.New("Name", Ids.Editor.Type.System.Fields.TextField, IDs.Types.OnlyText.NameField); TemplateManager.AddTemplateField(nameField, fieldSectionDataSection.Id); var listTemplate = TemplateManager.AddTemplate("SimpleList", IDs.Types.BaseModule, Ids.TemplateBase, IDs.Types.OnlyText.Type); var dataSection = ItemManager.AddItem("Data", Ids.Editor.Type.System.Types.FieldSectionTemplate, IDs.Types.OnlyText.Type, CreekWorm.Kernel.Items.ItemType.Item | CreekWorm.Kernel.Items.ItemType.System, IDs.Types.OnlyText.DataSection); TemplateField titleField = TemplateField.New("Title", Ids.Editor.Type.System.Fields.TextField, IDs.Types.OnlyText.NameField); TemplateManager.AddTemplateField(nameField, dataSection.Id); }
private void addButton_Click(object sender, EventArgs e) { newTemplateIdentity = TemplateManager.AddTemplate(this, templateObjectList, newTemplateIdentity); TemplateManager.LoadTemplate(this, templateObjectList); CheckNodeCount(); }