本文整理汇总了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));
}
示例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";
}
}
}
示例3: OnScroll
protected virtual void OnScroll(ScrollEventArgs se)
{
var ev = Scroll;
if (ev != null)
ev(this, se);
}
示例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));
}
示例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);
}
示例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);
}
示例7: hScrollBar2_Scroll
private void hScrollBar2_Scroll(object sender, ScrollEventArgs e)
{
gammaFactorBlue = (double)sbFactorBlue.Value / 10.0;
lblGammaFactorBlue.Text = string.Format("{0}", gammaFactorBlue);
DrawLion();
}
示例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();
}
示例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);
}
}
示例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);
}
示例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);
}
示例12: OnScroll
protected virtual void OnScroll(ScrollEventArgs e)
{
if (!ContainsFocus)
Focus();
if (scrollEventHandler == null)
return;
scrollEventHandler(this, e);
}
示例13: onScroll
private void onScroll(object sender, ScrollEventArgs e)
{
colorLabel.ForeColor = Color.FromArgb(
(int)rScrollBar.Value,
(int)gScrollBar.Value,
(int)bScrollBar.Value
);
}
示例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();
}
示例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);
}