Example #1
0
 protected EditorPane()
 {
     toolClsid        = Guid.Empty;
     bitmapIndex      = -1;
     bitmapResourceID = -1;
     toolBarLocation  = VSTWT_LOCATION.VSTWT_TOP;
 }
Example #2
0
 protected EditorPane([NotNull] System.IServiceProvider provider) : base(provider)
 {
     toolClsid        = Guid.Empty;
     bitmapIndex      = -1;
     bitmapResourceID = -1;
     toolBarLocation  = VSTWT_LOCATION.VSTWT_TOP;
 }
Example #3
0
 /// <include file='doc\ToolWindowPane.uex' path='docs/doc[@for="ToolWindowPane.ToolWindowPane"]/*' />
 /// <summary>
 /// Constructor
 /// </summary>
 protected ToolWindowPane(IServiceProvider provider)
     : base(provider)
 {
     toolClsid        = Guid.Empty;
     bitmapIndex      = -1;
     bitmapResourceID = -1;
     toolBarLocation  = VSTWT_LOCATION.VSTWT_TOP;
 }
Example #4
0
 /// <summary>
 /// Creates a new tool window pane with a null parent service provider
 /// </summary>
 public ToolWindowPane()
     : base()
 {
     toolClsid        = Guid.Empty;
     bitmapIndex      = -1;
     bitmapResourceID = -1;
     toolBarLocation  = VSTWT_LOCATION.VSTWT_TOP;
 }
 /// <include file='doc\ToolWindowPane.uex' path='docs/doc[@for="ToolWindowPane.ToolWindowPane"]/*' />
 /// <summary>
 /// Constructor
 /// </summary>
 protected ToolWindowPane(IServiceProvider provider)
     : base(provider)
 {
     toolClsid = Guid.Empty;
     bitmapIndex = -1;
     bitmapResourceID = -1;
     toolBarLocation = VSTWT_LOCATION.VSTWT_TOP;
 }
 /// <summary>
 /// Creates a new tool window pane with a null parent service provider
 /// </summary>
 public ToolWindowPane()
     : base()
 {
     toolClsid = Guid.Empty;
     bitmapIndex = -1;
     bitmapResourceID = -1;
     toolBarLocation = VSTWT_LOCATION.VSTWT_TOP;
 }
        private void PrivateInit(IServiceProvider sp, Control contained, IOleCommandTarget parentTarget)
        {
            provider = sp;

            commandTargetCookie = 0;
            if (null == parentTarget)
            {
                commandService = new OleMenuCommandService(sp);
            }
            else
            {
                commandService = new OleMenuCommandService(sp, parentTarget);
            }
            if (null != sp)
            {
                // Now we have to register the IOleCommandTarget implemented by the OleCommandService
                // as a priority command target, so it will be called by the shell.
                RegisterCommandTarget();
            }

            // Set the defaults for the toolbar (empty toolbar placed at the top)
            toolbarRect.left = 0;
            toolbarRect.top = 0;
            toolbarRect.right = 0;
            toolbarRect.bottom = 0;
            toolbarCommandId = null;
            toolbarLocation = VSTWT_LOCATION.VSTWT_TOP;

            if (null == contained)
            {
                containedForm = null;
            }
            else
            {
                controlSize = contained.ClientSize;
                containedForm = new WindowPaneAdapter(this, contained);
                this.Site = contained.Site;
                Form innerForm = contained as Form;
                if (null != innerForm)
                {
                    // If the contained control is a form, then copy some
                    // of its property to this one.
                    this.AcceptButton = innerForm.AcceptButton;
                    this.AccessibleDefaultActionDescription = innerForm.AccessibleDefaultActionDescription;
                    this.AccessibleDescription = innerForm.AccessibleDescription;
                    this.AccessibleName = innerForm.AccessibleName;
                    this.AccessibleRole = innerForm.AccessibleRole;
                    this.AllowDrop = innerForm.AllowDrop;
                    this.AllowTransparency = innerForm.AllowTransparency;
                    this.AutoScaleDimensions = innerForm.AutoScaleDimensions;
                    this.AutoScaleMode = innerForm.AutoScaleMode;
                    this.AutoScroll = innerForm.AutoScroll;
                    this.AutoScrollMargin = innerForm.AutoScrollMargin;
                    this.AutoScrollMinSize = innerForm.AutoScrollMinSize;
                    this.AutoScrollPosition = innerForm.AutoScrollPosition;
                    this.BindingContext = innerForm.BindingContext;
                    this.Bounds = innerForm.Bounds;
                    this.CancelButton = innerForm.CancelButton;
                    this.ContextMenu = innerForm.ContextMenu;
                    this.ControlBox = innerForm.ControlBox;
                    this.Cursor = innerForm.Cursor;
                    this.DesktopBounds = innerForm.DesktopBounds;
                    this.DesktopLocation = innerForm.DesktopLocation;
                    this.Font = innerForm.Font;
                    this.FormBorderStyle = innerForm.FormBorderStyle;
                    this.Icon = innerForm.Icon;
                    this.IsAccessible = innerForm.IsAccessible;
                    this.MaximizeBox = innerForm.MaximizeBox;
                    this.MaximumSize = innerForm.MaximumSize;
                    this.Menu = innerForm.Menu;
                    this.MinimizeBox = innerForm.MinimizeBox;
                    this.MinimumSize = innerForm.MinimumSize;
                    this.Opacity = innerForm.Opacity;
                    this.Region = innerForm.Region;
                    this.RightToLeft = innerForm.RightToLeft;
                    this.ShowInTaskbar = innerForm.ShowInTaskbar;
                    this.SizeGripStyle = innerForm.SizeGripStyle;
                    this.StartPosition = innerForm.StartPosition;
                    this.Text = innerForm.Text;
                    this.TopLevel = innerForm.TopLevel;
                    this.TopMost = innerForm.TopMost;
                    this.TransparencyKey = innerForm.TransparencyKey;
                }
            }
            // At the end of the copy we have to set the properties that we want
            // to enforse (right now only the HelpButton on the command bar).
            this.HelpButton = true;

            // Set the callbacks for the events that this default implementation will handle.
            this.Load += new EventHandler(FormLoad);
            this.Closing += new System.ComponentModel.CancelEventHandler(OnClosing);
        }
        private void PrivateInit(IServiceProvider sp, Control contained, IOleCommandTarget parentTarget)
        {
            provider = sp;

            commandTargetCookie = 0;
            if (null == parentTarget)
            {
                commandService = new OleMenuCommandService(sp);
            }
            else
            {
                commandService = new OleMenuCommandService(sp, parentTarget);
            }
            if (null != sp)
            {
                // Now we have to register the IOleCommandTarget implemented by the OleCommandService
                // as a priority command target, so it will be called by the shell.
                RegisterCommandTarget();
            }

            // Set the defaults for the toolbar (empty toolbar placed at the top)
            toolbarRect.left   = 0;
            toolbarRect.top    = 0;
            toolbarRect.right  = 0;
            toolbarRect.bottom = 0;
            toolbarCommandId   = null;
            toolbarLocation    = VSTWT_LOCATION.VSTWT_TOP;

            if (null == contained)
            {
                containedForm = null;
            }
            else
            {
                controlSize   = contained.ClientSize;
                containedForm = new WindowPaneAdapter(this, contained);
                this.Site     = contained.Site;
                Form innerForm = contained as Form;
                if (null != innerForm)
                {
                    // If the contained control is a form, then copy some
                    // of its property to this one.
                    this.AcceptButton = innerForm.AcceptButton;
                    this.AccessibleDefaultActionDescription = innerForm.AccessibleDefaultActionDescription;
                    this.AccessibleDescription = innerForm.AccessibleDescription;
                    this.AccessibleName        = innerForm.AccessibleName;
                    this.AccessibleRole        = innerForm.AccessibleRole;
                    this.AllowDrop             = innerForm.AllowDrop;
                    this.AllowTransparency     = innerForm.AllowTransparency;
                    this.AutoScaleDimensions   = innerForm.AutoScaleDimensions;
                    this.AutoScaleMode         = innerForm.AutoScaleMode;
                    this.AutoScroll            = innerForm.AutoScroll;
                    this.AutoScrollMargin      = innerForm.AutoScrollMargin;
                    this.AutoScrollMinSize     = innerForm.AutoScrollMinSize;
                    this.AutoScrollPosition    = innerForm.AutoScrollPosition;
                    this.BindingContext        = innerForm.BindingContext;
                    this.Bounds          = innerForm.Bounds;
                    this.CancelButton    = innerForm.CancelButton;
                    this.ContextMenu     = innerForm.ContextMenu;
                    this.ControlBox      = innerForm.ControlBox;
                    this.Cursor          = innerForm.Cursor;
                    this.DesktopBounds   = innerForm.DesktopBounds;
                    this.DesktopLocation = innerForm.DesktopLocation;
                    this.Font            = innerForm.Font;
                    this.FormBorderStyle = innerForm.FormBorderStyle;
                    this.Icon            = innerForm.Icon;
                    this.IsAccessible    = innerForm.IsAccessible;
                    this.MaximizeBox     = innerForm.MaximizeBox;
                    this.MaximumSize     = innerForm.MaximumSize;
                    this.Menu            = innerForm.Menu;
                    this.MinimizeBox     = innerForm.MinimizeBox;
                    this.MinimumSize     = innerForm.MinimumSize;
                    this.Opacity         = innerForm.Opacity;
                    this.Region          = innerForm.Region;
                    this.RightToLeft     = innerForm.RightToLeft;
                    this.ShowInTaskbar   = innerForm.ShowInTaskbar;
                    this.SizeGripStyle   = innerForm.SizeGripStyle;
                    this.StartPosition   = innerForm.StartPosition;
                    this.Text            = innerForm.Text;
                    this.TopLevel        = innerForm.TopLevel;
                    this.TopMost         = innerForm.TopMost;
                    this.TransparencyKey = innerForm.TransparencyKey;
                }
            }
            // At the end of the copy we have to set the properties that we want
            // to enforse (right now only the HelpButton on the command bar).
            this.HelpButton = true;

            // Set the callbacks for the events that this default implementation will handle.
            this.Load    += new EventHandler(FormLoad);
            this.Closing += new System.ComponentModel.CancelEventHandler(OnClosing);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Attribute" /> class.
 /// </summary>
 public ToolWindowToolbarAttribute(Type commandSet, int commandId)
 {
     CommandSet = commandSet;
     CommandId  = commandId;
     Location   = VSTWT_LOCATION.VSTWT_TOP;
 }
Example #10
0
 public int AddToolbar3(VSTWT_LOCATION dwLoc, ref Guid pguid, uint dwId, IDropTarget pDropTarget, IOleCommandTarget pCommandTarget)
 {
     return(VSConstants.S_OK);
 }
Example #11
0
 public int AddToolbar(VSTWT_LOCATION dwLoc, ref Guid pguid, uint dwId)
 {
     return(VSConstants.S_OK);
 }
 public int AddToolbar3(VSTWT_LOCATION dwLoc, ref Guid pguid, uint dwId, IDropTarget pDropTarget, IOleCommandTarget pCommandTarget) {
     return VSConstants.S_OK;
 }
 public int AddToolbar(VSTWT_LOCATION dwLoc, ref Guid pguid, uint dwId) {
     return VSConstants.S_OK;
 }