Наследование: System.EventArgs
Пример #1
0
 private void EhHorzScrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
 {
     if (null != _winFormsController)
     {
         _winFormsController.EhView_HorzScrollBarScroll(e);
     }
 }
Пример #2
0
        private void hScrollBar2_Scroll(object sender, ScrollEventArgs e)
        {
            gammaFactorBlue = (double)sbFactorBlue.Value / 10.0;
            lblGammaFactorBlue.Text = string.Format("{0}", gammaFactorBlue);
            DrawLion();

        }
Пример #3
0
		// 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);
		}
Пример #4
0
 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();
 }
Пример #5
0
 private void upDown_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
 {
     if (e.Type == ScrollEventType.SmallDecrement || e.Type == ScrollEventType.SmallIncrement)
     {
         UpDown(e.NewValue == 0);
     }
 }
Пример #6
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);
        }
Пример #7
0
		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);
 }
Пример #9
0
        /// ------------------------------------------------------------------------------------
        /// <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);
        }
Пример #10
0
 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;
     }
 }
Пример #11
0
        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();
        }
Пример #12
0
        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);
                    }
                }
            }
        }
Пример #13
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);
                    }
                }
            }
        }
Пример #14
0
 private void OnVerticalScroll(object sender, WinForms.ScrollEventArgs args)
 {
     this.viewMatrix.Reset();
     this.viewMatrix.Translate(0.0f, -args.NewValue);
     this.Invalidate();
     this.Update();
 }
Пример #15
0
 private void EhHorzScrollBar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
 {
     if (null != m_Ctrl)
     {
         m_Ctrl.EhView_HorzScrollBarScroll(e);
     }
 }
Пример #16
0
        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();
        }
Пример #17
0
 private void hsbSetDOutVal_Scroll(object eventSender, System.Windows.Forms.ScrollEventArgs eventArgs)
 {
     if (eventArgs.Type == System.Windows.Forms.ScrollEventType.EndScroll)
     {
         hsbSetDOutVal_Change(eventArgs.NewValue);
     }
 }
Пример #18
0
        protected virtual void OnScroll(ScrollEventArgs se)
        {
            var ev = Scroll;

            if (ev != null)
                ev(this, se);
        }
Пример #19
0
 /// <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;
     }
 }
Пример #20
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();
        }
Пример #22
0
 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();
 }
Пример #23
0
        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();
        }
Пример #24
0
 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));
 }
Пример #25
0
 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));
 }
Пример #26
0
        internal void DoScroll(object sender, ScrollEventArgs e)
        {
            var amount = DateTime.Now - LastScroll <= ShortInterval ? 0.04f : 0.02f;
            LastScroll = DateTime.Now;

            ChangeVolumeSafe(e.NewValue, amount);
        }
Пример #27
0
        /// ////////////////////////////////////////////
        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();
            }
        }
Пример #29
0
        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";
                    }
                    }
            
            


                   
                      
        }
Пример #30
0
 protected virtual void OnScroll(ScrollEventArgs e)
 {
     if (!ContainsFocus)
         Focus();
     if (scrollEventHandler == null)
         return;
     scrollEventHandler(this, e);
 }
Пример #31
0
#pragma warning disable 169

        private void OnSmallChangeChanged(object sender, SWF.ScrollEventArgs args)
        {
            if (args.Type == SWF.ScrollEventType.SmallDecrement ||
                args.Type == SWF.ScrollEventType.SmallIncrement)
            {
                RaiseAutomationPropertyChangedEvent();
            }
        }
Пример #32
0
 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();
     }
 }
Пример #33
0
 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();
     }
 }
Пример #34
0
 private void onScroll(object sender, ScrollEventArgs e)
 {
     colorLabel.ForeColor = Color.FromArgb(
         (int)rScrollBar.Value,
         (int)gScrollBar.Value,
         (int)bScrollBar.Value
     );
 }
Пример #35
0
 private void sbValue_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
 {
     if (this._isLoaded)
     {
         this._CurrentPosition = Convertir.DecimalToHexa(sbValue.Value);
         LoadPosition(this._CurrentPosition);
     }
 }
Пример #36
0
 private void GraphEdit_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
 {
     if (m_vTaskList != null)
     {
         m_stGraphs.TranslateTransform(AutoScrollPosition.X, AutoScrollPosition.Y);
         ShowAllTasks();
     }
 }
Пример #37
0
 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);
 }
Пример #38
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();
     }
 }
Пример #39
0
 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();
 }
Пример #40
0
 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);
     }
 }
Пример #41
0
        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();
        }
Пример #42
0
 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));
     }
 }
Пример #43
0
 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();
 }
Пример #44
0
        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);
 }
Пример #46
0
 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;
     }
 }
Пример #47
0
 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);
 }
Пример #48
0
        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;
        }
Пример #49
0
        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);

        }
Пример #50
0
 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);
 }
Пример #51
0
        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();
        }
Пример #53
0
        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;
                }
            }
        }
Пример #54
0
 private void flowLayoutPanel1_Scroll(object sender, ScrollEventArgs e)
 {
     if (flowLayoutPanel1.AutoScrollPosition.Y == 0)
     {
         this.labelofSeemore.Visible = true;
     }
     else
     {
         this.labelofSeemore.Visible = false;
     }
 }
Пример #55
0
        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.");
        }
Пример #56
0
        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();
            }
        }
Пример #57
0
        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();
            }
        }
Пример #58
0
 // 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;
         }
     }
 }
Пример #59
0
 /// <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;
     }
 }
Пример #60
0
 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);
     }
 }