private void AddMixin(PresentationAspect aspect) { PresentationMixin mixin = new PresentationMixin(aspect); mixin.TypeName = "[New Mixin]"; aspect.Mixins.Add(mixin); RefreshAll(); }
public MixinNode(PresentationMixin mixin) : base(mixin.TypeName) { this.mixin = mixin; this.ImageIndex = 5; this.SelectedImageIndex = 5; }
private void removeMixinToolStripMenuItem_Click(object sender, EventArgs e) { PresentationMixin mixin = selected as PresentationMixin; if (mixin != null) { RemoveMixin(mixin); } }
private static void SerializeMixin(PresentationMixin mixin, XmlDocument xmlDoc, XmlNode aspectNode) { XmlNode mixinNode = xmlDoc.CreateElement("mixin"); XmlAttribute typeAttrib = xmlDoc.CreateAttribute("type"); typeAttrib.Value = mixin.TypeName; mixinNode.Attributes.Append(typeAttrib); aspectNode.AppendChild(mixinNode); }
private void SelectObject(object obj) { PresentationAspect aspect = obj as PresentationAspect; if (aspect != null) { propertyGrid.SelectedObject = new AspectProperties(aspect); ShowAspectTypes(aspect); } PresentationAspectTarget aspectTarget = obj as PresentationAspectTarget; if (aspectTarget != null) { propertyGrid.SelectedObject = new AspectTargetProperties(aspectTarget); } PresentationMixin mixin = obj as PresentationMixin; if (mixin != null) { propertyGrid.SelectedObject = new MixinProperties(mixin); } PresentationPointcut pointcut = obj as PresentationPointcut; if (pointcut != null) { propertyGrid.SelectedObject = new PointcutProperties(pointcut); ShowPointcutMethods(pointcut); } PresentationPointcutTarget pointcutTarget = obj as PresentationPointcutTarget; if (pointcutTarget != null) { propertyGrid.SelectedObject = new PointcutTargetProperties(pointcutTarget); } PresentationInterceptor interceptor = obj as PresentationInterceptor; if (interceptor != null) { propertyGrid.SelectedObject = new InterceptorProperties(interceptor); ShowInterceptorMethods(interceptor); } Type type = obj as Type; if (type != null) { propertyGrid.SelectedObject = new TypeProperties(type); } }
private void RemoveMixin(PresentationMixin mixin) { mixin.Aspect.Mixins.Remove(mixin); RefreshAll(); }
public MixinProperties(PresentationMixin mixin) { this.mixin = mixin; }