private void EhHorzScrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (null != _winFormsController) { _winFormsController.EhView_HorzScrollBarScroll(e); } }
private void hScrollBar2_Scroll(object sender, ScrollEventArgs e) { gammaFactorBlue = (double)sbFactorBlue.Value / 10.0; lblGammaFactorBlue.Text = string.Format("{0}", gammaFactorBlue); DrawLion(); }
// 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); }
private void vScrollBar1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { //Point tempPoint = panelTable.Location; //tempPoint.Y=-e.NewValue; panelTable.Location = new Point(0, -e.NewValue); panelTable.Select(); }
private void upDown_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (e.Type == ScrollEventType.SmallDecrement || e.Type == ScrollEventType.SmallIncrement) { UpDown(e.NewValue == 0); } }
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); }
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); } }
private void hScrollBar1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { DoScroll(lineSeries1); DoScroll(lineSeries2); DoScroll(lineSeries3); DoScroll(lineSeries4); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Handle scroll actions. Update the selection too. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// ------------------------------------------------------------------------------------ private void OnScroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (e.Type == ScrollEventType.EndScroll || e.Type == ScrollEventType.ThumbPosition) { return; } int iLastSelected; if (e.NewValue == m_Actions.TopIndex) { // nothing changed return; } else if (e.NewValue < m_Actions.TopIndex) { // scroll up iLastSelected = e.NewValue; } else { // scroll down iLastSelected = e.NewValue + m_Actions.ItemsPerPage - 1; if (iLastSelected >= m_Actions.Items.Count) { iLastSelected = m_Actions.Items.Count - 1; } } SelectListItems(iLastSelected, e.NewValue); }
private void hScrollBar2_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { for (int i = 0; i < tChart1.Series.Count; ++i) { (tChart1.Series[i] as Steema.TeeChart.Styles.Bar).BarWidthPercent = hScrollBar2.Value; } }
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(); }
private void vScroll_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { ScrollInfoStruct sI = new ScrollInfoStruct(); sI.fMask = SIF_ALL; sI.cbSize = Marshal.SizeOf(sI); GetScrollInfo(listView.Handle, 1, ref sI); if (vScroll.Value != sI.nPos) { int scrollDifference = vScroll.Value - sI.nPos; if (scrollDifference < 0) { scrollDifference = Math.Abs(scrollDifference); for (int x = 0; x < scrollDifference; x++) { SendMessage(listView.Handle, 277, (IntPtr)0, (IntPtr)0); } } else { for (int x = 0; x < scrollDifference; x++) { SendMessage(listView.Handle, 277, (IntPtr)1, (IntPtr)0); } } } }
private void hScroll_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { ScrollInfoStruct sI = new ScrollInfoStruct(); sI.fMask = SIF_ALL; sI.cbSize = Marshal.SizeOf(sI); GetScrollInfo(listView.Handle, 0, ref sI); if (Math.Abs(hScroll.Value - sI.nPos) >= 6) { int scrollDifference = (int)Math.Round((double)((hScroll.Value - sI.nPos) / 6), 0); if (scrollDifference < 0) { scrollDifference = Math.Abs(scrollDifference); for (int x = 0; x < scrollDifference; x++) { SendMessage(listView.Handle, 276, (IntPtr)0, (IntPtr)0); } //GetScrollInfo(listView.Handle, 0, ref sI); //int y0 = sI.nPos; //SendMessage( listView.Handle,276,(IntPtr) 1,(IntPtr)0 ); //GetScrollInfo(listView.Handle, 0, ref sI); //MessageBox.Show((sI.nPos - y0).ToString()); } else { for (int x = 0; x < scrollDifference; x++) { SendMessage(listView.Handle, 276, (IntPtr)1, (IntPtr)0); } } } }
private void OnVerticalScroll(object sender, WinForms.ScrollEventArgs args) { this.viewMatrix.Reset(); this.viewMatrix.Translate(0.0f, -args.NewValue); this.Invalidate(); this.Update(); }
private void EhHorzScrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (null != m_Ctrl) { m_Ctrl.EhView_HorzScrollBarScroll(e); } }
void _scrollbar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (_ignoreScrollbarChange > 0) { return; } if (_ishorizontal) { try { hScrollbar.Value = _scrollbar.Value; _grid.HorizontalScrollingOffset = _scrollbar.Value; } catch { } } else { if (_scrollbar.Value >= 0 && _scrollbar.Value < _grid.Rows.Count) { _grid.FirstDisplayedScrollingRowIndex = _scrollbar.Value + (_scrollbar.Value == 1 ? -1 : 1) >= _grid.Rows.Count ? _grid.Rows.Count - 1 : _scrollbar.Value + (_scrollbar.Value == 1 ? -1 : 1); } else { _grid.FirstDisplayedScrollingRowIndex = _scrollbar.Value - 1; } } _grid.Invalidate(); }
private void hsbSetDOutVal_Scroll(object eventSender, System.Windows.Forms.ScrollEventArgs eventArgs) { if (eventArgs.Type == System.Windows.Forms.ScrollEventType.EndScroll) { hsbSetDOutVal_Change(eventArgs.NewValue); } }
protected virtual void OnScroll(ScrollEventArgs se) { var ev = Scroll; if (ev != null) ev(this, se); }
/// <summary> /// changing the text position /// </summary> private void ScrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (UpperLine != e.NewValue) { this.Invalidate(); } else { return; } if (e.NewValue + NumOfLines - 2 > ScrollBar.Maximum) { UpperLine = ScrollBar.Maximum - NumOfLines + 1; } else { UpperLine = e.NewValue; } if (UpperLine > 0) { e.NewValue = ScrollBar.Value = UpperLine; } else { e.NewValue = ScrollBar.Value = UpperLine = 0; } }
private void scrollBar_Scroll(object sender, ScrollEventArgs e) { if (e.Type != ScrollEventType.EndScroll) return; documentForm.ViewLocation = new Point(hScrollBar.Value, vScrollBar.Value); }
//Function to manage the scroll bar event private void ScrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { //Create a graphics object and draw a portion of the image in the PictureBox. Graphics g = pictureBox1.CreateGraphics(); int xWidth = pictureBox1.Width; int yHeight = pictureBox1.Height; int x; int y; if (e.ScrollOrientation == ScrollOrientation.HorizontalScroll) { x = e.NewValue; y = vScrollBar1.Value; } else //e.ScrollOrientation == ScrollOrientation.VerticalScroll { y = e.NewValue; x = hScrollBar1.Value; } g.DrawImage(pictureBox1.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); panel1.Invalidate(); }
private void vBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { // move the large picture according to the scrollbar largePic.Top = -vBar.Value; // repaint the radar this.smallPic.Refresh(); }
void _scrollbar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (_ignoreScrollbarChange > 0) { return; } if (_ishorizontal) { hScrollbar.Value = _scrollbar.Value; try { _grid.HorizontalScrollingOffset = _scrollbar.Value; } catch { } } else { if (_scrollbar.Value >= 0 && _scrollbar.Value < _grid.Rows.Count) { try { _grid.FirstDisplayedScrollingRowIndex = _scrollbar.Value + (_scrollbar.Value == 1 ? -1 : 1); } catch (Exception) {//目前先捕获异常,延期处理 // ignored } } } _grid.Invalidate(); }
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)); }
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)); }
internal void DoScroll(object sender, ScrollEventArgs e) { var amount = DateTime.Now - LastScroll <= ShortInterval ? 0.04f : 0.02f; LastScroll = DateTime.Now; ChangeVolumeSafe(e.NewValue, amount); }
/// //////////////////////////////////////////// private void m_scrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (m_scrollBar.Enabled) { DateTime newStart = m_dtFirstCellDate; switch (e.Type) { case ScrollEventType.SmallIncrement: newStart = newStart.AddDays(7); break; case ScrollEventType.SmallDecrement: newStart = newStart.AddDays(-7); break; case ScrollEventType.LargeDecrement: m_btnPrecedent_Click(this, new EventArgs()); return; case ScrollEventType.LargeIncrement: m_btnSuivant_Click(this, new EventArgs()); return; } SetDateStart(newStart); } }
#pragma warning disable 169 private void OnMaximumChangeChanged(object sender, SWF.ScrollEventArgs args) { if (args.Type == SWF.ScrollEventType.Last) { RaiseAutomationPropertyChangedEvent(); } }
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"; } } }
protected virtual void OnScroll(ScrollEventArgs e) { if (!ContainsFocus) Focus(); if (scrollEventHandler == null) return; scrollEventHandler(this, e); }
#pragma warning disable 169 private void OnSmallChangeChanged(object sender, SWF.ScrollEventArgs args) { if (args.Type == SWF.ScrollEventType.SmallDecrement || args.Type == SWF.ScrollEventType.SmallIncrement) { RaiseAutomationPropertyChangedEvent(); } }
private void vScrollBar2_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { panelSlide.Location = new Point(0, -vScrollBar2.Value); if (ActiveControl == null) //only activate scroll if no control within this control is active { vScrollBar2.Select(); } }
void panel1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (e.ScrollOrientation == System.Windows.Forms.ScrollOrientation.HorizontalScroll) { panel2.HorizontalScroll.Value = panel1.HorizontalScroll.Value; panel1.BringToFront(); } }
private void onScroll(object sender, ScrollEventArgs e) { colorLabel.ForeColor = Color.FromArgb( (int)rScrollBar.Value, (int)gScrollBar.Value, (int)bScrollBar.Value ); }
private void sbValue_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (this._isLoaded) { this._CurrentPosition = Convertir.DecimalToHexa(sbValue.Value); LoadPosition(this._CurrentPosition); } }
private void GraphEdit_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (m_vTaskList != null) { m_stGraphs.TranslateTransform(AutoScrollPosition.X, AutoScrollPosition.Y); ShowAllTasks(); } }
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); }
/* -------------------------------------------------------------- *\ * hscMap_Scroll() * - horizontal scroll bar for map editor window \* -------------------------------------------------------------- */ private void hscMap_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { m_XSel = e.NewValue; if (m_bOpen) { picMap.Refresh(); } }
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(); }
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); } }
private void HorizontalScroll(object sender, System.Windows.Forms.ScrollEventArgs e) { if (e.NewValue == _hScroll.Value) // don't need to scroll if already there { return; } _DrawPanel.Invalidate(); }
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)); } }
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(); }
private void hScrollBar1_Scroll(object sender, ScrollEventArgs e) { if (globe != null) { globe.GroundOpaque = 100 - hScrollBar1.Value; textbox1.Text = Convert.ToString(hScrollBar1.Value); } }
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); }
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; } }
protected override void OnScroll(ScrollEventArgs se) { int barSize = SystemInformation.VerticalScrollBarWidth; for (int i = 0; i < this.Controls.Count; i++) { var con = Controls[i]; con.Width = this.Width - barSize; } base.OnScroll(se); }
private void iSB_Vertical_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { int rowIndex = e.NewValue; int bytesPerRow = iRenderer.RowsAndColumns.Width * 4; uint baseAddressOffset = (uint)(bytesPerRow * rowIndex); uint address = iReconstructor.Statistics.HeapAddressStart + baseAddressOffset; // iRenderer.Address = address; }
private void PreencherCor(object sender, ScrollEventArgs e) { vermelhoLabel.Text = vermelhoHScrollBar.Value.ToString(); verdeLabel.Text = verdeHScrollBar.Value.ToString(); azulLabel.Text = azulHScrollBar.Value.ToString(); corLabel.BackColor = Color.FromArgb(vermelhoHScrollBar.Value, verdeHScrollBar.Value, azulHScrollBar.Value); }
protected override void OnScroll(ScrollEventArgs se) { if (BrandedImage != null) { BrandedImage.Left = Width / 2 - BrandedImage.Width / 2; BrandedImage.Top = Height / 2 - BrandedImage.Height / 2; } Invalidate(); base.OnScroll(se); }
private void hScrollBar1_Scroll(object sender, ScrollEventArgs e) { if (globe != null && layer != null) { layer.Opaque = 100 - hScrollBar1.Value; textbox1.Text = Convert.ToString(hScrollBar1.Value); globe.Refresh(); } }
private void hScrollBar1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { // Set transparency to all walls tChart1.Walls.Left.Transparency = hScrollBar1.Value; tChart1.Walls.Right.Transparency = hScrollBar1.Value; tChart1.Walls.Bottom.Transparency = hScrollBar1.Value; tChart1.Walls.Back.Transparency = hScrollBar1.Value; label2.Text = hScrollBar1.Value.ToString(); }
private void extendedScrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { bool downsampleBool = false; if ((this.ulLayout != null && this.ulLayout.Type != 1) || (this.urLayout != null && this.urLayout.Type != 1) && (this.llLayout != null && this.llLayout.Type != 1) || (this.lrLayout != null && this.lrLayout.Type != 1)) { downsampleBool = true; } if (this.ulLayout != null) { if (this.ulLayout.Type == 1 && downsampleBool) { this.ulLayout.Scroll = (int)Math.Floor(e.NewValue * .001); } else { this.ulLayout.Scroll = e.NewValue; } } if (this.urLayout != null) { if (this.urLayout.Type == 1 && downsampleBool) { this.urLayout.Scroll = (int)Math.Floor(e.NewValue * .001); } else { this.urLayout.Scroll = e.NewValue; } } if (this.llLayout != null) { if (this.llLayout.Type == 1 && downsampleBool) { this.llLayout.Scroll = (int)Math.Floor(e.NewValue * .001); } else { this.llLayout.Scroll = e.NewValue; } } if (this.lrLayout != null) { if (this.lrLayout.Type == 1 && downsampleBool) { this.lrLayout.Scroll = (int)Math.Floor(e.NewValue * .001); } else { this.lrLayout.Scroll = e.NewValue; } } }
private void flowLayoutPanel1_Scroll(object sender, ScrollEventArgs e) { if (flowLayoutPanel1.AutoScrollPosition.Y == 0) { this.labelofSeemore.Visible = true; } else { this.labelofSeemore.Visible = false; } }
private void vScrollBar1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { Trace.WriteLine("FStations: vScrollBar1_Scroll on thread \"" + Thread.CurrentThread.Name + "\" ( " + AppDomain.GetCurrentThreadId().ToString() + " )"); saveCurrentStation(); setCurrentStation(this.vScrollBar1.Value); Trace.WriteLine("FStations: vScrollBar1_Scroll ended."); }
private void hScrollBar2_Scroll(object sender, ScrollEventArgs e) { if (e.OldValue != e.NewValue) { label3.Left += (e.NewValue - e.OldValue) * 6; label3.Text = "Gov't Spending (G)\n$" + e.NewValue.ToString() + " billion"; chart5.Series[1].Points[4].YValues[0] = e.NewValue; chart5.Refresh(); } }
private void hScrollBar1_Scroll(object sender, ScrollEventArgs e) { if (e.OldValue != e.NewValue) { label2.Left += (e.NewValue - e.OldValue) * 6; label2.Text = "Tax Rate (T)\n" + e.NewValue.ToString() + "% (of GDP)"; chart5.Series[0].Points[4].YValues[0] = e.NewValue * _expendit.GetExpenditure() / 100; chart5.Refresh(); } }
// Scrolling two gridviews private void dataGridViewXDiagnosis_Scroll(object sender, ScrollEventArgs e) { if (e.ScrollOrientation == ScrollOrientation.VerticalScroll) { int index = this.dataGridViewXDiagnosis.FirstDisplayedScrollingRowIndex; if (this.dataGridViewXDiagnosisResult.FirstDisplayedScrollingRowIndex != -1) { this.dataGridViewXDiagnosisResult.FirstDisplayedScrollingRowIndex = index; } } }
/// <summary> /// Overrides the default scroll behavior to add grid snapping. /// </summary> /// <param name="se">The scrolling properties.</param> protected override void OnScroll(ScrollEventArgs se) { if (XSnap == 0 && YSnap == 0) base.OnScroll(se); else { if (se.ScrollOrientation == ScrollOrientation.HorizontalScroll) HorizontalScroll.Value = se.NewValue / XSnap * XSnap; else VerticalScroll.Value = se.NewValue / YSnap * YSnap; } }
protected void vScrollBarChanged(object sender, System.Windows.Forms.ScrollEventArgs e) { if (e.Type == ScrollEventType.SmallIncrement || e.Type == ScrollEventType.LargeIncrement || e.Type == ScrollEventType.Last) { SetValue(iValue - 1); } else if (e.Type == ScrollEventType.SmallDecrement || e.Type == ScrollEventType.LargeDecrement || e.Type == ScrollEventType.First) { SetValue(iValue + 1); } }