예제 #1
0
 //滚动时,设置下拉列表不可见
 private void dataGridView1_Scroll(object sender, ScrollEventArgs e)
 {
     this.cmb_Temp.Visible   = false;
     this.newAnnoCmb.Visible = false;
 }
예제 #2
0
 protected virtual void Target_Scroll(object sender, ScrollEventArgs e)
 {
     NeedRepaint();
 }
 private void hScrollBarYSpeedMultiplier_Scroll(object sender, ScrollEventArgs e)
 {
     Globals.ySpeedMultiplier = Convert.ToDouble(hScrollBarYSpeedMultiplier.Value / 100.0);
 }
예제 #4
0
 protected virtual void OnScroll(ScrollEventArgs args)
 {
     if (this.Scroll != null)
     {
         this.Scroll(this, args);
     }
 }
예제 #5
0
파일: Actor.cs 프로젝트: jaquadro/MonoGdx
 protected virtual void OnScroll(ScrollEventArgs e)
 {
 }
예제 #6
0
 private void DataGridViewEx_Scroll(object sender, ScrollEventArgs e)
 {
     if (e.ScrollOrientation == ScrollOrientation.HorizontalScroll)// && e.Type == ScrollEventType.EndScroll)
         {
             timer1.Enabled = false; timer1.Enabled = true;
         }
 }
예제 #7
0
    private void Form1_Scroll(object sender, ScrollEventArgs e)
    {
        Console.WriteLine("Scroll");

    }
예제 #8
0
        private void HandleKeyDownEvent(object sender, KeyEventArgs e)
        {
            if (!(e.Source is View.WorldRenderXna))
            {
                return;
            }

            try
            {
                ScrollEventArgs scrollValue = null;

                var command = World.ShortcutKeys.Get(e.Key, e.KeyboardDevice.Modifiers);
                if (command == null)
                {
                    return;
                }

                switch (command)
                {
                case "copy":
                    if (_vm.CopyCommand.CanExecute(null))
                    {
                        _vm.CopyCommand.Execute(null);
                    }
                    break;

                case "paste":
                    if (_vm.PasteCommand.CanExecute(null))
                    {
                        _vm.PasteCommand.Execute(null);
                    }
                    break;

                case "undo":
                    _vm.UndoCommand.Execute(null);
                    break;

                case "redo":
                    _vm.RedoCommand.Execute(null);
                    break;

                case "selectall":
                    if (_vm.CurrentWorld != null)
                    {
                        _vm.Selection.IsActive = true;
                        _vm.Selection.SetRectangle(new Vector2Int32(0, 0),
                                                   new Vector2Int32(_vm.CurrentWorld.TilesWide - 1, _vm.CurrentWorld.TilesHigh - 1));
                    }
                    break;

                case "selectnone":
                    if (_vm.CurrentWorld != null)
                    {
                        _vm.Selection.IsActive = false;
                    }
                    break;

                case "open":
                    if (_vm.OpenCommand.CanExecute(null))
                    {
                        _vm.OpenCommand.Execute(null);
                    }
                    break;

                case "save":
                    if (_vm.SaveCommand.CanExecute(null))
                    {
                        _vm.SaveCommand.Execute(null);
                    }
                    break;

                case "saveas":
                    if (_vm.SaveAsCommand.CanExecute(null))
                    {
                        _vm.SaveAsCommand.Execute(null);
                    }
                    break;

                case "saveasversion":
                    if (_vm.SaveAsVersionCommand.CanExecute(null))
                    {
                        _vm.SaveAsVersionCommand.Execute(null);
                    }
                    break;

                case "deleteselection":
                    if (_vm.DeleteCommand.CanExecute(null))
                    {
                        _vm.DeleteCommand.Execute(null);
                    }
                    break;

                case "resettool":
                    if (_vm.ActiveTool != null)
                    {
                        if (_vm.ActiveTool.Name == "Paste")
                        {
                            SetActiveTool("Arrow");
                        }
                        else
                        {
                            _vm.Selection.IsActive = false;
                        }
                    }
                    break;

                case "scrollup":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Up, 10);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "scrollupfast":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Up, 50);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "scrollright":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Right, 10);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "scrollrightfast":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Right, 50);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "scrolldown":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Down, 10);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "scrolldownfast":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Down, 50);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "scrollleft":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Left, 10);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "scrollleftfast":
                    scrollValue = new ScrollEventArgs(ScrollDirection.Left, 50);
                    if (_vm.RequestScrollCommand.CanExecute(scrollValue))
                    {
                        _vm.RequestScrollCommand.Execute(scrollValue);
                    }
                    e.Handled = true;
                    break;

                case "pan":
                    if (_vm.RequestPanCommand.CanExecute(true))
                    {
                        _vm.RequestPanCommand.Execute(true);
                    }
                    break;

                case "zoomin":
                    if (_vm.RequestZoomCommand.CanExecute(true))
                    {
                        _vm.RequestZoomCommand.Execute(true);
                    }
                    break;

                case "zoomout":
                    if (_vm.RequestZoomCommand.CanExecute(false))
                    {
                        _vm.RequestZoomCommand.Execute(false);
                    }
                    break;

                case "eraser":
                    _vm.TilePicker.IsEraser = !_vm.TilePicker.IsEraser;
                    break;

                case "swap":
                    _vm.TilePicker.Swap(Keyboard.Modifiers);
                    break;

                case "toggletile":
                    _vm.TilePicker.TileStyleActive = !_vm.TilePicker.TileStyleActive;
                    break;

                case "togglewall":
                    _vm.TilePicker.WallStyleActive = !_vm.TilePicker.WallStyleActive;
                    break;

                default:
                    SetActiveTool(command);
                    break;
                }
            }
            catch (Exception ex)
            {
                ErrorLogging.LogException(ex);
            }
        }
예제 #9
0
 protected override void OnScroll(ScrollEventArgs se)
 {
     base.OnScroll(se);
     this.Invalidate();
 }
예제 #10
0
 private void control_Scroll(object sender, ScrollEventArgs e)
 {
     Close();
 }
예제 #11
0
 private void dgv_showkpmaster_Scroll(object sender, ScrollEventArgs e)
 {
     this.cbo.Visible = false;
 }
예제 #12
0
 private void pnlGameView_Scroll(object sender, ScrollEventArgs e)
 {
 }
예제 #13
0
 private void hScrollBar4_Scroll(object sender, ScrollEventArgs e)
 {
     Recalc();
 }
예제 #14
0
파일: Actor.cs 프로젝트: jaquadro/MonoGdx
 private static void ScrollClass(Actor sender, ScrollEventArgs e)
 {
     if (sender != null)
         sender.OnScroll(e);
 }
예제 #15
0
 private void Form1_Scroll(object sender, ScrollEventArgs e)
 {
 }
예제 #16
0
 void HandleKeyTreeScrollEvent(object o, ScrollEventArgs args)
 {
     HandleKeyTreeMotion(args.Event.X, args.Event.Y);
 }
        public virtual bool OnScroll(ScrollEventArgs e)
        {
            if (this.Scroll != null)
            {
                this.Scroll(this, e);
            }

            return e.Handled;
        }
예제 #18
0
 private void HandleScroll(object sender, ScrollEventArgs e)
 {
     pictureBox.Invalidate();
 }
예제 #19
0
    private void OnScroll(object o, ScrollEventArgs args)
    {
        float oldZoom = Zoom;
        Vector realMousePos = (MousePos + Translation) * Zoom;

        if(args.Event.Direction == ScrollDirection.Down) {
            Zoom /= (float) Math.Sqrt(2);
        } else if(args.Event.Direction == ScrollDirection.Up) {
            Zoom *= (float) Math.Sqrt(2);
        }

        //Limit the Zoom to useful values;
        if( Zoom < 0.002 || Zoom > 500 ){
            Zoom = oldZoom;
        }

        SetTranslation(Translation
                         + realMousePos / Zoom - realMousePos / oldZoom);

        MousePos = MouseToWorld(realMousePos);
        if(Editor != null) {
            Editor.OnMouseMotion(MousePos, args.Event.State);
        }
        args.RetVal = true;
    }
예제 #20
0
 private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
 {
 }
예제 #21
0
        protected override void OnScroll(ScrollEventArgs e)
        {
            ResetFade();
            if (IsScrollY)
                SetScrollY(ScrollY + Math.Max(_areaHeight * .9f, MaxY * .1f) / 4 * e.ScrollAmountV);
            else if (IsScrollX)
                SetScrollX(ScrollX + Math.Max(_areaWidth * .9f, MaxX * .1f) / 4 * e.ScrollAmountV);

            e.Handled = true;

            base.OnScroll(e);
        }
예제 #22
0
 private void vScrollBarAge_Scroll(object sender, ScrollEventArgs e)
 {
     txtAge.Text = vScrollBarAge.Value.ToString();
 }
예제 #23
0
파일: IconList.cs 프로젝트: emtees/old-code
	void ScrollHandler (object o, ScrollEventArgs args)
	{
		Gdk.EventScroll es = args.Event;
		double newloc = 0.0;

		switch (es.Direction){
		case ScrollDirection.Up:
			newloc = adjustment.Value - visible_cols;
			break;
			
		case ScrollDirection.Down:
			newloc = adjustment.Value + visible_cols;
			break;
		}
		if (newloc < 0)
			newloc = 0;
		else if (newloc >= max_top)
			newloc = Math.Max (max_top, 0);

		adjustment.Value = newloc;
	}
예제 #24
0
 private void dataGrid_Scroll(object sender, ScrollEventArgs e)
 {
     UpdateData();
     UpdateColumnWidth();
 }
예제 #25
0
 private void hScrollBarZ_Scroll(object sender, ScrollEventArgs e)
 {
     Z = hScrollBarZ.Value;
     pictureBox1.Invalidate();
 }
예제 #26
0
 private void EditTask_Scroll(object sender, ScrollEventArgs e)
 {
 }
예제 #27
0
 protected sealed override void OnScroll(ScrollEventArgs se)
 {
     Invalidate();
     base.OnScroll(se);
 }
예제 #28
0
 private void hsbTree_Scroll(object sender, ScrollEventArgs e)
 {
     _graphicalTree.ViewX = -e.NewValue;
 }
예제 #29
0
 private void ScrollBar_Scroll(object sender, ScrollEventArgs e)
 {
     Scroll.ViewUnit.Left = scrollBar.Value;
     Scroll.ViewUnit.Normalize();
     UpdateSurface();
 }
예제 #30
0
 private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
 {
     tbPerioada.Text = vScrollBar1.Value.ToString();
 }
예제 #31
0
 private void Eff_ScrollChanged(object sender, ScrollEventArgs args)
 {
     // send a message to the cell that the scroll position has changes
     MessagingCenter.Send <ScrollMessage, double>(new ScrollMessage(), ScrollMessage.ScrollChanged, args.Y);
 }
예제 #32
0
 private void hScrollBarChipOutThreshold_Scroll(object sender, ScrollEventArgs e)
 {
     graLabelChipOutThresholdValue.Text = hScrollBarChipOutThreshold.Value.ToString();
 }
 private void OnScroll(object o, ScrollEventArgs args)
 {
     if(args.Event.Direction == ScrollDirection.Up &&
        Translation.Y <= (float) -ROW_HEIGHT) {
         Translation = Translation + new Vector(0, ROW_HEIGHT);
         args.RetVal = true;
     } else if(args.Event.Direction == ScrollDirection.Down) {
         Translation = Translation - new Vector(0, ROW_HEIGHT);
         args.RetVal = true;
     }
 }
예제 #34
0
 private void hScrollShoulderNickThreshold_Scroll(object sender, ScrollEventArgs e)
 {
     graLabelNickThresholdValue.Text = hScrollShoulderNickThreshold.Value.ToString();
 }
예제 #35
0
 void OnScroll(object sender, ScrollEventArgs e)
 {
     m_dataPanel.SuspendLayout();
     m_dataPanel.Invalidate();
     m_dataPanel.ResumeLayout();
 }
예제 #36
0
 private void hScrollLeadTipBurrThreshold_Scroll(object sender, ScrollEventArgs e)
 {
     graLabelLeadTipBurrThresholdValue.Text = hScrollLeadTipBurrThreshold.Value.ToString();
 }
 private void OnScroll(object o, ScrollEventArgs args)
 {
     if(args.Event.Direction == ScrollDirection.Up && FirstRow > 0 ) {
         FirstRow -= 1;
         args.RetVal = true;
         QueueDraw();
     } else if( args.Event.Direction == ScrollDirection.Down &&
                  FirstRow + 1 < Math.Floor( (double)gameObjectTypes.Count / (double)TILES_PER_ROW )) {
         FirstRow += 1;
         args.RetVal = true;
         QueueDraw();
     }
 }
예제 #38
0
 private void hScrollGateRemainingThreshold_Scroll(object sender, ScrollEventArgs e)
 {
     gradientLabelGateRemainingThresholdValue.Text = hScrollGateRemainingThreshold.Value.ToString();
 }
 protected override void OnScroll(ScrollEventArgs se)
 {
     this.Invalidate();
     base.OnScroll(se);
 }
예제 #40
0
 private void ZoomScroll_Scroll(object sender, ScrollEventArgs e)
 {
     Zoom_val     = ZoomScroll.Value + 1;
     ZoomBox.Text = ZoomScroll.Value.ToString();
 }
예제 #41
0
 private void OnScroll(object o, ScrollEventArgs args)
 {
     if(args.Event.Direction == ScrollDirection.Up &&
        Translation.Y <= (float) -ROW_HEIGHT) {
         Translation = Translation + new Vector(0, ROW_HEIGHT - (Translation.Y%ROW_HEIGHT));
         vadjustment.Value = -Translation.Y;
         args.RetVal = true;
     } else if(args.Event.Direction == ScrollDirection.Down &&
        Translation.Y - ROW_HEIGHT > -ROW_HEIGHT * Math.Floor( (double)tilegroup.Tiles.Count / (double)TILES_PER_ROW)){
         Translation = Translation - new Vector(0, ROW_HEIGHT - (Translation.Y%ROW_HEIGHT));
         vadjustment.Value = -Translation.Y;
         args.RetVal = true;
     }
 }
예제 #42
0
파일: Form1.cs 프로젝트: rajeshwarn/racer
 private void appPackPanel_Scroll(object sender, ScrollEventArgs e)
 {
     appPackPanel.Invalidate();
 }
예제 #43
0
	private void HandleScrollEvent(object sender, ScrollEventArgs args) 
	{
		// Activated only by Control + ScrollWheelUp/ScrollWheelDown
		if (ModifierType.ControlMask != (args.Event.State & ModifierType.ControlMask))
			return;
		
		if (args.Event.Direction == ScrollDirection.Up) {
			ZoomIn ();
			// stop event from propagating.
			args.RetVal = true;			
		} else if (args.Event.Direction == ScrollDirection.Down ) {
			ZoomOut ();
			args.RetVal = true;
		}
	}
 private void _hScrollBar_Scroll(object sender, ScrollEventArgs e)
 {
     OnScroll(e);
 }
예제 #45
0
    protected override void WndProc(ref Message m)
    {
        switch (m.Msg)
        {
            case 7:
                if (this.Focus != null)
                {
                    this.Focus(this, EventArgs.Empty);
                }
                break;

            case 8:
                if (this.LostFocus != null)
                {
                    this.LostFocus(this, EventArgs.Empty);
                }
                break;

            case 15:
                {
                    RECT rect = new RECT();
                    bool bErase = false;
                    NativeMethods.GetUpdateRect(base.Handle, ref rect, ref bErase);
                    base.WndProc(ref m);
                    if (this.Paint != null)
                    {
                        PaintEventArgs e = new PaintEventArgs(this.Graphics, new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top));
                        this.Paint(this, e);
                    }
                    return;
                }
            case 0x10:
                this.OnClose();
                break;

            case 20:
                return;

            case 0x114:
            case 0x115:
                {
                    ScrollEventArgs args = new ScrollEventArgs(ScrollEventType.First, 0, ScrollOrientation.HorizontalScroll);
                    this.OnScroll(args);
                    break;
                }
            case 0x200:
                if (this.MouseMove != null)
                {
                    this.MouseMove(this, new MouseEventArgs(MouseButtons, 0, NativeMethods.SignedLOWORD(m.LParam), NativeMethods.SignedHIWORD(m.LParam), 0));
                }
                break;

            case WM_LBUTTONDOWN:
                if (this.MouseDown != null)
                {
                    var args = new CancelableMouseEventArgs(MouseButtons, 1, NativeMethods.SignedLOWORD(m.LParam), NativeMethods.SignedHIWORD(m.LParam), 0);
                    args.Message = m;

                    this.MouseDown(this, args);

                    if( args.Cancel ) return;
                }
                break;

            case WM_MBUTTONDOWN:
                if (this.MouseDown != null)
                {
                    var args = new CancelableMouseEventArgs(MouseButtons, 1, NativeMethods.SignedLOWORD(m.LParam), NativeMethods.SignedHIWORD(m.LParam), 0);
                    args.Message = m;

                    this.MouseDown(this, args);

                    if( args.Cancel ) return;
                }
                break;

            case WM_RBUTTONDOWN:
                if (this.MouseDown != null)
                {
                    var args = new CancelableMouseEventArgs(MouseButtons, 1, NativeMethods.SignedLOWORD(m.LParam), NativeMethods.SignedHIWORD(m.LParam), 0);
                    args.Message = m;

                    this.MouseDown(this, args);

                    if( args.Cancel ) return;
                }
                break;

            case WM_LBUTTONUP:
                if(this.MouseUp != null )
                {
                    var args = new CancelableMouseEventArgs(MouseButtons, 0, NativeMethods.SignedLOWORD(m.LParam), NativeMethods.SignedHIWORD(m.LParam), 0);
                    args.Message = m;

                    this.MouseUp(this, args);

                    if( args.Cancel ) return;
                }
                break;

            case WM_RBUTTONUP:
                if(this.MouseUp != null )
                {
                    var args = new CancelableMouseEventArgs(MouseButtons, 0, NativeMethods.SignedLOWORD(m.LParam), NativeMethods.SignedHIWORD(m.LParam), 0);
                    args.Message = m;

                    this.MouseUp(this, args);

                    if (args.Cancel) return;
                }
                break;

            case WM_MBUTTONUP:
                if(this.MouseUp != null )
                {
                    var args = new CancelableMouseEventArgs(MouseButtons, 0, NativeMethods.SignedLOWORD(m.LParam), NativeMethods.SignedHIWORD(m.LParam), 0);
                    args.Message = m;

                    this.MouseUp(this, args);

                    if( args.Cancel ) return;
                }
                break;

            case 0x100:
                {
                    base.WndProc(ref m);
                    Keys keyData = ((Keys)((int)m.WParam)) | ModifierKeys;
                    this.OnKeyDown(new KeyEventArgs(keyData));
                    return;
                }
            case 0x101:
                {
                    base.WndProc(ref m);
                    Keys keys2 = ((Keys)((int)m.WParam)) | ModifierKeys;
                    this.OnKeyUp(new KeyEventArgs(keys2));
                    return;
                }
            case 0x102:
            case 0x106:
                this.OnKeyPress(new KeyPressEventArgs((char)((ushort)((long)m.WParam))));
                break;

            case 0x47:
                this.OnResize();
                break;
        }
        base.WndProc(ref m);
    }
예제 #46
0
 private void Color_Scroll(object sneder, ScrollEventArgs e)
 {
     this.btnApply.Enabled = true;
     this.BackColor        = Color.FromArgb(this.hsbRed.Value, this.hsbGreen.Value, this.hsbBlue.Value);
 }
예제 #47
0
파일: Window.cs 프로젝트: jaquadro/MonoGdx
 protected override void OnScroll(ScrollEventArgs e)
 {
     if (IsModal)
         e.Handled = true;
     base.OnScroll(e);
 }
예제 #48
0
파일: Actor.cs 프로젝트: jaquadro/MonoGdx
 protected virtual void OnPreviewScroll(ScrollEventArgs e)
 {
 }