public RibbonCommandCapsule(string name, string text, System.Drawing.Image image, string hint, IRibbonObject parent) : base(parent as RibbonCommandCapsule != null ? String.Format("{0}.{1}", (parent as RibbonCommandCapsule).Command.Name, name) : name, text, image, hint) //TBD figure out how to interrupt this { this.parent = parent; parent.Children.Add(this); this.Initialize(); }
public void RecurseGetXml(IRibbonObject iRibbonObject, XmlWriter xmlWriter) { iRibbonObject.WriteStartElement(xmlWriter); foreach (IRibbonObject child in iRibbonObject.Children) { RecurseGetXml(child, xmlWriter); } iRibbonObject.WriteEndElement(xmlWriter); }
public IEnumerable <RibbonCommandCapsule> RecurseGetCapsules(IRibbonObject iRibbonObject) { foreach (RibbonCommandCapsule child in iRibbonObject.Children) { yield return(child); foreach (RibbonCommandCapsule capsule in RecurseGetCapsules(child)) { yield return(capsule); } } }
public RibbonTextBoxCapsule(string name, string text, string hint, IRibbonObject parent, int width) : base(name, text, hint, parent, width) { RibbonRoot root; IRibbonObject test = this; while (true) { test = test.Parent; if (test is RibbonRoot) { root = test as RibbonRoot; break; } } Command.TextChanged += delegate { foreach (RibbonCommandCapsule capsule in root.GetCapsules()) { capsule.Update(); } }; }
public IEnumerable<RibbonCommandCapsule> RecurseGetCapsules(IRibbonObject iRibbonObject) { foreach (RibbonCommandCapsule child in iRibbonObject.Children) { yield return child; foreach (RibbonCommandCapsule capsule in RecurseGetCapsules(child)) yield return capsule; } }
public RibbonLabelCapsule(string name, string text, string hint, IRibbonObject parent, int width) : base(name, text, hint, parent, width) { this.Justification = LabelJustification.far; }
public NamedRibbonObject(string type, string id, IRibbonObject parent) { Type = type; this.id = id; parent.Children.Add(this); }
public RibbonCommandCapsule(string name, string text, System.Drawing.Image image, string hint, IRibbonObject parent) : base(parent as RibbonCommandCapsule != null ? String.Format("{0}.{1}", (parent as RibbonCommandCapsule).Command.Name, name) : name, text, image, hint) { //TBD figure out how to interrupt this this.parent = parent; parent.Children.Add(this); this.Initialize(); }
public RibbonCollectionCapsule(string name, string text, IRibbonObject parent, LayoutOrientation layoutOrientation) : base(name, text, null, null, parent) { this.layoutOrientation = layoutOrientation; }
// Dictionary<string, RibbonCommandRadio> radios = new Dictionary<string, RibbonCommandRadio>(); public RibbonTabCapsule(string name, string text, IRibbonObject parent) : base(name, text, null, null, parent) { }
public RibbonTextCapsule(string name, string text, string hint, IRibbonObject parent, int width) : base(name, text, null, hint, parent) { this.width = width; }
public RibbonCheckBoxCapsule(string name, string text, System.Drawing.Image image, string hint, IRibbonObject parent, bool isChecked) : base(name, text, image, hint, parent) { Command.IsChecked = isChecked; }
public void RecurseGetXml(IRibbonObject iRibbonObject, XmlWriter xmlWriter) { iRibbonObject.WriteStartElement(xmlWriter); foreach (IRibbonObject child in iRibbonObject.Children) RecurseGetXml(child, xmlWriter); iRibbonObject.WriteEndElement(xmlWriter); }