Exemple #1
0
        public NiCommandBar(Guid id, NiCommandBarKind kind, int priority)
            : base(id, priority)
        {
            Kind = kind;

            var collection = new NiList <INiCommandBarGroup>();

            collection.CollectionChanged += (s, e) => OnItemsChanged(e);

            Controls = collection;
        }
Exemple #2
0
        public NiCommandBar(Guid id, NiCommandBarKind kind, int priority)
            : base(id, priority)
        {
            Kind = kind;

            var collection = new NiList<INiCommandBarGroup>();

            collection.CollectionChanged += (s, e) => OnItemsChanged(e);

            Controls = collection;
        }
Exemple #3
0
        public HResult CreateCommandBar(Guid id, NiCommandBarKind kind, int priority, out INiCommandBar commandBar)
        {
            commandBar = null;

            try
            {
                commandBar = new NiCommandBar(id, kind, priority);

                _objects[id] = commandBar;

                return HResult.OK;
            }
            catch (Exception ex)
            {
                return ErrorUtil.GetHResult(ex);
            }
        }
        public HResult CreateCommandBar(Guid id, NiCommandBarKind kind, int priority, out INiCommandBar commandBar)
        {
            commandBar = null;

            try
            {
                commandBar = new NiCommandBar(id, kind, priority);

                _objects[id] = commandBar;

                return(HResult.OK);
            }
            catch (Exception ex)
            {
                return(ErrorUtil.GetHResult(ex));
            }
        }