public object AddCommandBar(string name,
                             vsCommandBarType type, object parent, int position) {
     if (position == AddCommandBarToEnd && parent != null) {
         object controls = parent.GetType().InvokeMember("Controls",
                                                         BindingFlags.GetProperty, null, parent,
                                                         new object[] {});
         position = (int) controls.GetType().InvokeMember("Count",
                                                          BindingFlags.GetProperty, null, controls,
                                                          new object[] {});
         position = position + 1;
     }
     parent = parent == null ? Type.Missing : parent;
     object objPosition = parent == null ? Type.Missing : position;
     return commandsType.InvokeMember("AddCommandBar",
                                      BindingFlags.InvokeMethod, null, commands,
                                      new object[] {
                                                       name, type,
                                                       parent, objPosition
                                                   });
 }
        public object AddCommandBar(string name,
                                    vsCommandBarType type, object parent, int position)
        {
            if (position == AddCommandBarToEnd && parent != null)
            {
                object controls = parent.GetType().InvokeMember("Controls",
                                                                BindingFlags.GetProperty, null, parent,
                                                                new object[] {});
                position = (int)controls.GetType().InvokeMember("Count",
                                                                BindingFlags.GetProperty, null, controls,
                                                                new object[] {});
                position = position + 1;
            }
            parent = parent == null ? Type.Missing : parent;
            object objPosition = parent == null ? Type.Missing : position;

            return(commandsType.InvokeMember("AddCommandBar",
                                             BindingFlags.InvokeMethod, null, commands,
                                             new object[] {
                name, type,
                parent, objPosition
            }));
        }
 public void AddCommandBar(string pszCmdBarName, vsCommandBarType dwType, object pCmdBarParent, uint dwIndex, out object ppCmdBar)
 {
     ppCmdBar = null;
 }
 object Commands.AddCommandBar(string Name, vsCommandBarType Type, object CommandBarParent, int Position)
 {
     throw new NotImplementedException();
 }
Example #5
0
 public void AddCommandBar(string pszCmdBarName, vsCommandBarType dwType, object pCmdBarParent, uint dwIndex, out object ppCmdBar) {
     ppCmdBar = null;
 }
Example #6
0
 public dynamic AddCommandBar(string Name, vsCommandBarType Type, [IDispatchConstant] object CommandBarParent, int Position = 1)
 {
     throw new NotImplementedException();
 }
 object Commands.AddCommandBar(string Name, vsCommandBarType Type, object CommandBarParent, int Position)
 {
     throw new NotImplementedException();
 }
Example #8
0
		public dynamic AddCommandBar(string Name, vsCommandBarType Type, [IDispatchConstant]object CommandBarParent, int Position = 1) { throw new NotImplementedException(); }