当前位置: 首页>>代码示例>>C#>>正文


C# Forms.ScrollEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.ScrollEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ScrollEventArgs类的具体用法?C# ScrollEventArgs怎么用?C# ScrollEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ScrollEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ScrollEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: hScrollBar1_Scroll

 private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
 {
     //MessageBox.Show(hScrollBar1.Value.ToString());
     panel1.Location = new Point(-1 * hScrollBar1.Value , panel1.Location.Y);
     for (int i = 0; i < tBrushes.Count; i++)
         graphics.FillRectangle(tBrushes[i], new Rectangle(i * 80 + 5 * (i + 1), 0, 80, 80));
 }
开发者ID:D-Moskalyov,项目名称:GDIplus_Gallery,代码行数:7,代码来源:Form1.cs

示例2: muestraproducto_Scroll

        private void muestraproducto_Scroll(object sender, ScrollEventArgs e)
        {
                id_textbox.Text = Convert.ToString(Convert.ToString(lista_productos[Producto_scrollbar.Value].Id));
                nombre_textbox.Text = (lista_productos[Producto_scrollbar.Value].Nombre);
                genero_textbox.Text = (lista_productos[Producto_scrollbar.Value].Genero);
                descripcion_textbox.Text = lista_productos[Producto_scrollbar.Value].Descripcion;
                if (lista_productos[Producto_scrollbar.Value].Estado_alquiler == true) {

                    alquiler_textbox.Text = "SÍ";
                }
                else
                {
                    if (Producto_scrollbar.Value == 0)
                    {
                        alquiler_textbox.Text = "";
                    }
                    else
                    {
                        alquiler_textbox.Text = "NO";
                    }
                    }
            
            


                   
                      
        }
开发者ID:jlmorenorodriguez,项目名称:Otros,代码行数:28,代码来源:Form1.cs

示例3: OnScroll

        protected virtual void OnScroll(ScrollEventArgs se)
        {
            var ev = Scroll;

            if (ev != null)
                ev(this, se);
        }
开发者ID:tablesmit,项目名称:PdfiumViewer,代码行数:7,代码来源:CustomScrollControl.cs

示例4: vScrollBar1_Scroll

 private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
 {
     pictureBox1.Location = new Point((int)((-hScrollBar1.Value) * deltaX), (int)((-vScrollBar1.Value) * deltaY));
     KitayGorod.Location = new Point((int)(pictureBox1.Location.X + pictureBox1.Width / 1.7),
         (int)(pictureBox1.Location.Y + pictureBox1.Height / 2.063));
     KitayGorod.Size = new Size((int)(pictureBox1.Width / 12.59), (int)(pictureBox1.Height / 41.4));
 }
开发者ID:KlausWi,项目名称:MetroNavigatorForms,代码行数:7,代码来源:Map.cs

示例5: OnScroll

		// OnScroll event that changes the NewValue
		private void OnScroll (object sender, ScrollEventArgs sc_event)
		{
			int val = sc_event.NewValue;

			switch (sc_event.Type)
			{
				case ScrollEventType.First:
					sc_event.NewValue = scroll_bar.Maximum;
					break;
				case ScrollEventType.Last:
					sc_event.NewValue = scroll_bar.Minimum;
					break;
				case ScrollEventType.SmallDecrement:
					sc_event.NewValue -= 15;
					break;
				case ScrollEventType.SmallIncrement:
					sc_event.NewValue += 15;
					break;
				case ScrollEventType.LargeDecrement:
					sc_event.NewValue = 0;
					break;
				case ScrollEventType.LargeIncrement:
					sc_event.NewValue = 100;
					break;
				default:
					break;
			}

			Console.WriteLine ("OnScroll. Type: {0} in value {1} out value {2}",
				sc_event.Type, val, sc_event.NewValue);
		}
开发者ID:hitswa,项目名称:winforms,代码行数:32,代码来源:swf-scrollbar-events.cs

示例6: HueControl_Scroll

        private void HueControl_Scroll(object sender, ScrollEventArgs e)
        {
            var u8 = (byte)Math.Min(255,
                this.HorizontalScroll.Value * 240 / (this.panel1.Width - this.Width)
            );

            delta = u8 - prev;
            prev = u8;

            var hls = ScriptCoreLib.JavaScript.Runtime.JSColor.FromHLS(
                u8,

                120,
                240
                );

            var rgb = hls.ToRGB();

            this.panel1.BackColor = Color.FromArgb(rgb.R, rgb.G, rgb.B);

            //Console.WriteLine(
            //    new
            //    {
            //        u8
            //    }
            //);

            if (AdjustHue != null)
                AdjustHue(delta);
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:30,代码来源:HueControl.cs

示例7: hScrollBar2_Scroll

        private void hScrollBar2_Scroll(object sender, ScrollEventArgs e)
        {
            gammaFactorBlue = (double)sbFactorBlue.Value / 10.0;
            lblGammaFactorBlue.Text = string.Format("{0}", gammaFactorBlue);
            DrawLion();

        }
开发者ID:kevincwq,项目名称:Cross.Drawing,代码行数:7,代码来源:fmGammaCorrection.cs

示例8: scrollBarVertical_Scroll

        private void scrollBarVertical_Scroll(object sender, ScrollEventArgs e)
        {
            //Create a graphics object and draw a portion of the image in the PictureBox.
            Graphics g = pictureBoxMain.CreateGraphics();

            int xWidth = pictureBoxMain.Width;
            int yHeight = pictureBoxMain.Height;

            int x;
            int y;

            if (e.ScrollOrientation == ScrollOrientation.HorizontalScroll)
            {
                x = e.NewValue;
                y = scrollBarVertical.Value;
            }
            else //e.ScrollOrientation == ScrollOrientation.VerticalScroll
            {
                y = e.NewValue;
                x = scrollBarHorizontal.Value;
            }

            g.DrawImage(pictureBoxMain.Image,
              new Rectangle(0, 0, xWidth, yHeight),  //where to draw the image
              new Rectangle(x, y, xWidth, yHeight),  //the portion of the image to draw
              GraphicsUnit.Pixel);

            pictureBoxMain.Update();
        }
开发者ID:dennex,项目名称:Comp2614,代码行数:29,代码来源:MainForm.cs

示例9: vScrollBar1_Scroll

		private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
		{
			if (this.GraphPane != null) {
				if ((e.Type != ScrollEventType.ThumbPosition &&
				     e.Type != ScrollEventType.ThumbTrack) ||
				    (e.Type == ScrollEventType.ThumbTrack &&
				     _zoomState == null)) {
					ZoomStateSave(this.GraphPane, ZoomState.StateType.Scroll);
				}
				for (int i = 0; i < this.GraphPane.YAxisList.Count; i++) {
					ScrollRange scroll = _yScrollRangeList[i];
					if (scroll.IsScrollable) {
						Axis axis = this.GraphPane.YAxisList[i];
						HandleScroll(axis, e.NewValue, scroll.Min, scroll.Max, vScrollBar1.LargeChange,
						             !axis.Scale.IsReverse);
					}
				}

				for (int i = 0; i < this.GraphPane.Y2AxisList.Count; i++) {
					ScrollRange scroll = _y2ScrollRangeList[i];
					if (scroll.IsScrollable) {
						Axis axis = this.GraphPane.Y2AxisList[i];
						HandleScroll(axis, e.NewValue, scroll.Min, scroll.Max, vScrollBar1.LargeChange,
						             !axis.Scale.IsReverse);
					}
				}

				ApplyToAllPanes(this.GraphPane);

				ProcessEventStuff(vScrollBar1, e);
			}
		}
开发者ID:stewmc,项目名称:vixen,代码行数:32,代码来源:ZedGraphControl.ScrollBars.cs

示例10: scrollBar_Scroll

        private void scrollBar_Scroll(object sender, ScrollEventArgs e)
        {
            if (e.Type != ScrollEventType.EndScroll)
                return;

            documentForm.ViewLocation = new Point(hScrollBar.Value, vScrollBar.Value);
        }
开发者ID:verebes,项目名称:xml_form_editor,代码行数:7,代码来源:ScrollablePage.cs

示例11: DoScroll

        internal void DoScroll(object sender, ScrollEventArgs e)
        {
            var amount = DateTime.Now - LastScroll <= ShortInterval ? 0.04f : 0.02f;
            LastScroll = DateTime.Now;

            ChangeVolumeSafe(e.NewValue, amount);
        }
开发者ID:ascott18,项目名称:AudioSwitch,代码行数:7,代码来源:VolumeBar.cs

示例12: OnScroll

 protected virtual void OnScroll(ScrollEventArgs e)
 {
     if (!ContainsFocus)
         Focus();
     if (scrollEventHandler == null)
         return;
     scrollEventHandler(this, e);
 }
开发者ID:x893,项目名称:BTool,代码行数:8,代码来源:TreeViewWrapper.cs

示例13: onScroll

 private void onScroll(object sender, ScrollEventArgs e)
 {
     colorLabel.ForeColor = Color.FromArgb(
         (int)rScrollBar.Value,
         (int)gScrollBar.Value,
         (int)bScrollBar.Value
     );
 }
开发者ID:welvet,项目名称:wC-,代码行数:8,代码来源:RGBForm.cs

示例14: OnScroll

 protected override void OnScroll(ScrollEventArgs se)
 {
     if (Chart == null) return;
     //Chart.ScrollBy(se.NewValue - se.OldValue);
     if (se.NewValue == Chart.LeftPos) return;
     Chart.ScrollTo(se.NewValue);
     Chart.Invalidate();
 }
开发者ID:johnmensen,项目名称:TradeSharp,代码行数:8,代码来源:ChartScrollBar.cs

示例15: hScrollBarPCS0_Scroll

 private void hScrollBarPCS0_Scroll(object sender, ScrollEventArgs e)
 {
     byte value = (byte)hScrollBarPCS0.Value;
     lbPCS0.Text = value.ToString();
     byte addr = GetAddress(false);
     // write to pcs0 register
     CommObj.Send(new byte[] { addr, 0x1, value }, 0);
 }
开发者ID:ControlEverythingCom,项目名称:AnyI2C,代码行数:8,代码来源:frmI2CPWM.cs


注:本文中的System.Windows.Forms.ScrollEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。