• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.ScrollEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: CodeScrollBar_Scroll

 private void CodeScrollBar_Scroll(object sender, ScrollEventArgs e)
 {
     foreach (Control Ctl in this.CodeGroup.Controls)
     {
         //MessageBox.Show(Ctl.GetType().ToString());
         if (Ctl.GetType().ToString().Contains("mButton"))
             Ctl.Location = new Point(Ctl.Location.X, Ctl.Location.Y + (e.OldValue - e.NewValue));
     }
 }
开发者ID:LiSmart,项目名称:AVR_Craft,代码行数:9,代码来源:MainForm.cs


示例17: cellsizeTrackBar_Scroll

 private void cellsizeTrackBar_Scroll(object sender, EventArgs e)
 {
     cellsizeValueLabel.Text = cellsizeTrackBar.Value.ToString();
     if (cellsizeTrackBar.Focused && cellSizeChange != null)
     {
         ScrollEventArgs ea = new ScrollEventArgs(ScrollEventType.EndScroll, cellsizeTrackBar.Value);
         cellSizeChange.Invoke(sender, ea);
     }
 }
开发者ID:walle,项目名称:myleveleditor,代码行数:9,代码来源:MapCellSizeForm.cs


示例18: hScrollBarScroll

 private void hScrollBarScroll(object sender, ScrollEventArgs e)
 {
     cGL.intOptionC = 0;
     HScrollBar hb = (HScrollBar)sender;
     int n = int.Parse(hb.Name.Substring(hb.Name.Length - 1));
     cGL.ScrollValue[n - 1] = (hb.Value - 100) / 10.0f;
     if (e != null)
         cGL.Draw();
 }
开发者ID:yakirisrael,项目名称:RobotOpenGL,代码行数:9,代码来源:Form1.cs


示例19: metroTrackBar1_Scroll

 private void metroTrackBar1_Scroll(object sender, ScrollEventArgs e)
 {
     turnCoordinatorInstrumentControl1.SetTurnCoordinatorParameters(metroTrackBar1.Value, metroTrackBar1.Value);
     airSpeedIndicatorInstrumentControl1.SetAirSpeedIndicatorParameters(metroTrackBar1.Value * 72 - 35);
     headingIndicatorInstrumentControl1.SetHeadingIndicatorParameters(metroTrackBar1.Value * 72);
     altimeterInstrumentControl1.SetAlimeterParameters(metroTrackBar1.Value * 200);
     attitudeIndicatorInstrumentControl1.SetAttitudeIndicatorParameters(metroTrackBar1.Value * 10, metroTrackBar1.Value * 10);
     verticalSpeedIndicatorInstrumentControl1.SetVerticalSpeedIndicatorParameters(metroTrackBar1.Value * 72);
 }
开发者ID:suas-anadolu,项目名称:groundstation,代码行数:9,代码来源:AviationInstrumentForm.cs


示例20: dgvSerial_Scroll

 private void dgvSerial_Scroll(object sender, ScrollEventArgs e)
 {
     if (e.ScrollOrientation == ScrollOrientation.VerticalScroll)
     {
         int first_displayed_ndx = this.dgvSerial.FirstDisplayedScrollingRowIndex;
         this.dgvSerial.Rows[first_displayed_ndx].Cells[1].Selected = true;
         this.dgvSerial.HorizontalScrollingOffset = this.h_scroll_pos;
     }
 }
开发者ID:wee2tee,项目名称:SN_Net,代码行数:9,代码来源:SNInquiryWindow.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ScrollableControl类代码示例发布时间:2022-05-26
下一篇:
C# Forms.ScrollBar类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap