Example #1
0
 /// <summary>
 /// Moves digraph image according to mouse wheel scrolling
 /// </summary>
 private void MainWindow_MouseWheel(object sender, MouseEventArgs e)
 {
     MouseWheelTimer.Start();
     if (isControlPressed)
     {
         if (e.Delta > 0)
         {
             GraphBuilder_KeyDown(e, new KeyEventArgs(Keys.Oemplus));
         }
         else if (e.Delta < 0)
         {
             GraphBuilder_KeyDown(e, new KeyEventArgs(Keys.OemMinus));
         }
     }
     else
     {
         if (e.Delta > 0)
         {
             GraphBuilder_KeyDown(e, new KeyEventArgs(Keys.Up));
         }
         else if (e.Delta < 0)
         {
             GraphBuilder_KeyDown(e, new KeyEventArgs(Keys.Down));
         }
     }
 }
Example #2
0
 /// <summary>
 /// Changes vertices radius
 /// </summary>
 private void RadiusTrackBar_ValueChanged(object sender, EventArgs e)
 {
     graphDrawing.R        = RadiusTrackBar.Value;
     RadiusValueLabel.Text = @"R = " + RadiusTrackBar.Value;
     if (!isCommand)
     {
         radiusChanged = true;
         MouseWheelTimer.Start();
     }
     else
     {
         radius = RadiusTrackBar.Value;
     }
 }