Exemplo n.º 1
0
 public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped)
 {
     if (mbs == ButtonState.DOWN && inComponent && !amClipped && IComponent_Util.AmITopZOrder(this, location))
     {
         deltaLoc = controlled.controller.MouseScreenLocation;
         controlled.window.CaptureMouse = true;
         movin = true;
     }
     if (mbs == ButtonState.UP && movin)
     {
         movin = false;
     }
 }
Exemplo n.º 2
0
            public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped)
            {
                base.MouseUpDown(location, mb, mbs, inComponent, amClipped);
                bool topz = IComponent_Util.AmITopZOrder(this, location);

                if (inComponent && !amClipped && topz && mbs == ButtonState.DOWN)
                {
                    (background as USolidBrush).color = new Color(.8f);
                }
                else
                {
                    (background as USolidBrush).color = new Color(.7f);
                }
            }
Exemplo n.º 3
0
 public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped)
 {
     base.MouseUpDown(location, mb, mbs, inComponent, amClipped);
     if (inComponent && !amClipped && IComponent_Util.AmITopZOrder(this, location) && mbs == ButtonState.DOWN)
     {
         downed = true;
         var sloc = location;
         downedOrigin = orientation == Orientation.v ? sloc.Y : sloc.X;
         topOriginal  = orientation == Orientation.v ? Location.Y : Location.X;
         (trackBrush as USolidBrush).color = new Color(0.8f);
     }
     else
     {
         downed = false;
         (trackBrush as USolidBrush).color = new Color(0.6f);
     }
 }
Exemplo n.º 4
0
 public virtual void MouseMove(Point location, bool inComponent, bool amClipped)
 {
     if (inComponent && !amClipped)
     {
         var tzo = IComponent_Util.AmITopZOrder(this, location);
         if (tzo)
         {
             var tlc = IComponent_Util.GetTopLevelComponent(this);
             if (tlc is NoForm)
             {
                 var nf = (tlc as NoForm);
                 if (nf.window.Cursor != Cursor)
                 {
                     nf.window.Cursor = Cursor;
                 }
             }
         }
     }
 }
Exemplo n.º 5
0
            public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped)
            {
                base.MouseUpDown(location, mb, mbs, inComponent, amClipped);
                bool tzo = IComponent_Util.AmITopZOrder(this, location);

                if (!downed && (!inComponent || amClipped || !tzo))
                {
                    return;
                }
                if (mbs == ButtonState.DOWN)
                {
                    scrollTimer.Change(0, cycle);
                    (butBrsh as USolidBrush).color = new Color(.6f, .5f, .7f, .5f);
                    downed = true;
                }
                else if (downed)
                {
                    scrollTimer.Change(System.Threading.Timeout.Infinite, cycle);
                    (butBrsh as USolidBrush).color = new Color(.8f, .4f, .6f, .4f);
                    downed = false;
                }
            }