Esempio n. 1
0
 public virtual void GetOleVerbs(DesignerVerbCollection rval)
 {
     System.Design.NativeMethods.IEnumOLEVERB e   = null;
     System.Design.NativeMethods.IOleObject   ocx = this.axHost.GetOcx() as System.Design.NativeMethods.IOleObject;
     if ((ocx == null) || System.Design.NativeMethods.Failed(ocx.EnumVerbs(out e)))
     {
         return;
     }
     if (e == null)
     {
         return;
     }
     int[] pceltFetched = new int[1];
     System.Design.NativeMethods.tagOLEVERB rgelt = new System.Design.NativeMethods.tagOLEVERB();
     this.foundEdit       = false;
     this.foundAbout      = false;
     this.foundProperties = false;
     while (true)
     {
         pceltFetched[0]    = 0;
         rgelt.lpszVerbName = null;
         int hr = e.Next(1, rgelt, pceltFetched);
         if ((hr == 1) || System.Design.NativeMethods.Failed(hr))
         {
             return;
         }
         if ((rgelt.grfAttribs & 2) != 0)
         {
             this.foundEdit       = this.foundEdit || (rgelt.lVerb == -4);
             this.foundAbout      = this.foundAbout || (rgelt.lVerb == 2);
             this.foundProperties = this.foundProperties || (rgelt.lVerb == 1);
             rval.Add(new HostVerb(new OleVerbData(rgelt), this.handler));
         }
     }
 }
 public virtual void GetOleVerbs(DesignerVerbCollection rval)
 {
     System.Design.NativeMethods.IEnumOLEVERB e = null;
     System.Design.NativeMethods.IOleObject ocx = this.axHost.GetOcx() as System.Design.NativeMethods.IOleObject;
     if ((ocx == null) || System.Design.NativeMethods.Failed(ocx.EnumVerbs(out e)))
     {
         return;
     }
     if (e == null)
     {
         return;
     }
     int[] pceltFetched = new int[1];
     System.Design.NativeMethods.tagOLEVERB rgelt = new System.Design.NativeMethods.tagOLEVERB();
     this.foundEdit = false;
     this.foundAbout = false;
     this.foundProperties = false;
     while (true)
     {
         pceltFetched[0] = 0;
         rgelt.lpszVerbName = null;
         int hr = e.Next(1, rgelt, pceltFetched);
         if ((hr == 1) || System.Design.NativeMethods.Failed(hr))
         {
             return;
         }
         if ((rgelt.grfAttribs & 2) != 0)
         {
             this.foundEdit = this.foundEdit || (rgelt.lVerb == -4);
             this.foundAbout = this.foundAbout || (rgelt.lVerb == 2);
             this.foundProperties = this.foundProperties || (rgelt.lVerb == 1);
             rval.Add(new HostVerb(new OleVerbData(rgelt), this.handler));
         }
     }
 }
Esempio n. 3
0
 internal OleVerbData(System.Design.NativeMethods.tagOLEVERB oleVerb) : base(System.Design.SR.GetString("AXVerbPrefix") + oleVerb.lpszVerbName, oleVerb.lVerb)
 {
     this.dirties = (oleVerb.grfAttribs & 1) == 0;
 }