Beispiel #1
0
 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();
 }
Beispiel #2
0
        public void RecurseGetXml(IRibbonObject iRibbonObject, XmlWriter xmlWriter)
        {
            iRibbonObject.WriteStartElement(xmlWriter);

            foreach (IRibbonObject child in iRibbonObject.Children)
            {
                RecurseGetXml(child, xmlWriter);
            }

            iRibbonObject.WriteEndElement(xmlWriter);
        }
Beispiel #3
0
        public IEnumerable <RibbonCommandCapsule> RecurseGetCapsules(IRibbonObject iRibbonObject)
        {
            foreach (RibbonCommandCapsule child in iRibbonObject.Children)
            {
                yield return(child);

                foreach (RibbonCommandCapsule capsule in RecurseGetCapsules(child))
                {
                    yield return(capsule);
                }
            }
        }
Beispiel #4
0
        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;
 }
Beispiel #10
0
        //    Dictionary<string, RibbonCommandRadio> radios = new Dictionary<string, RibbonCommandRadio>();

        public RibbonTabCapsule(string name, string text, IRibbonObject parent)
            : base(name, text, null, null, parent)
        {
        }
        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();
                }
            };
        }
Beispiel #12
0
 public RibbonLabelCapsule(string name, string text, string hint, IRibbonObject parent, int width)
     : base(name, text, hint, parent, width)
 {
     this.Justification = LabelJustification.far;
 }
Beispiel #13
0
 public RibbonTextCapsule(string name, string text, string hint, IRibbonObject parent, int width)
     : base(name, text, null, hint, parent)
 {
     this.width = width;
 }
Beispiel #14
0
 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;
 }
Beispiel #15
0
 public RibbonCollectionCapsule(string name, string text, IRibbonObject parent, LayoutOrientation layoutOrientation)
     : base(name, text, null, null, parent)
 {
     this.layoutOrientation = layoutOrientation;
 }
        public void RecurseGetXml(IRibbonObject iRibbonObject, XmlWriter xmlWriter)
        {
            iRibbonObject.WriteStartElement(xmlWriter);

            foreach (IRibbonObject child in iRibbonObject.Children)
                RecurseGetXml(child, xmlWriter);

            iRibbonObject.WriteEndElement(xmlWriter);
        }
 //    Dictionary<string, RibbonCommandRadio> radios = new Dictionary<string, RibbonCommandRadio>();
 public RibbonTabCapsule(string name, string text, IRibbonObject parent)
     : base(name, text, null, null, parent)
 {
 }
Beispiel #18
0
 public NamedRibbonObject(string type, string id, IRibbonObject parent)
 {
     Type    = type;
     this.id = id;
     parent.Children.Add(this);
 }
 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;
 }