protected override IList <Control> GeneratePropertyItems(SceneElement targetElement, ReferenceStep targetProperty) { List <Control> list = new List <Control>(); list.Add((Control)this.CreateMenuItem(StringTable.EditExistingStyleCommandName, "EditExistingStyleCommand", (ICommand) new EditExistingStyleTemplateCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); list.Add((Control)this.CreateMenuItem(StringTable.EditClonedStyleCommandName, "EditClonedStyleCommand", (ICommand) new EditCopyOfStyleCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); list.Add((Control)this.CreateMenuItem(StringTable.EditEmptyStyleCommandName, "EditEmptyStyleCommand", (ICommand) new EditNewStyleCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); Separator separator = new Separator(); list.Add((Control)separator); ResourceListCommand resourceListCommand = new ResourceListCommand(this.ViewModel, (IPropertyId)targetProperty); list.Add((Control)resourceListCommand.CreateSingleInstance()); return((IList <Control>)list); }
protected override IList <Control> GeneratePropertyItems(SceneElement targetElement, ReferenceStep targetProperty) { List <Control> list = new List <Control>(); if (PlatformTypes.FrameworkTemplate.IsAssignableFrom((ITypeId)targetProperty.PropertyType)) { list.Add((Control)this.CreateMenuItem(StringTable.EditExistingTemplateCommandName, "EditExistingTemplateCommand", (ICommand) new EditExistingStyleTemplateCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); list.Add((Control)this.CreateMenuItem(StringTable.EditClonedStyleCommandName, "EditClonedTemplateCommand", (ICommand) new EditCopyOfTemplateCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); list.Add((Control)this.CreateMenuItem(StringTable.EditEmptyStyleCommandName, "EditEmptyTemplateCommand", (ICommand) new EditNewTemplateCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); } else if (PlatformTypes.Style.IsAssignableFrom((ITypeId)targetProperty.PropertyType)) { list.Add((Control)this.CreateMenuItem(StringTable.EditExistingTemplateCommandName, "EditExistingTemplateCommand", (ICommand) new EditExistingStyleTemplateCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty, true))); list.Add((Control)this.CreateMenuItem(StringTable.EditClonedStyleCommandName, "EditClonedTemplateCommand", (ICommand) new EditCopyOfStyleWithTemplateCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); list.Add((Control)this.CreateMenuItem(StringTable.EditEmptyStyleCommandName, "EditEmptyTemplateCommand", (ICommand) new EditNewStyleWithTemplateCommand(this.viewHost, this.ViewModel, (IPropertyId)targetProperty))); } Separator separator = new Separator(); list.Add((Control)separator); ResourceListCommand resourceListCommand = new ResourceListCommand(this.ViewModel, (IPropertyId)targetProperty); list.Add((Control)resourceListCommand.CreateSingleInstance()); return((IList <Control>)list); }
public SetToResourceCommand(ResourceListCommand parentCommand, LocalResourceModel resourceModel) { this.parentCommand = parentCommand; this.resourceModel = resourceModel; }