Example #1
0
 /// <summary>
 /// Handles the down event of the pane_mouse control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
 private void pane_mouse_down(object sender, MouseEventArgs e)
 {
     //Allow new lines if not paused
     if (!paused)
     {
         //Create new Myst
         MystLine newMyst = new MystLine(pnlPane, e.Location);
         //Create new Timer for line (calls update method of new Myst)
         MyTimer newTimer = new MyTimer(ONE_SECOND_IN_MILISECONDS / trcSpeed.Value, newMyst.update, this);
         timers.Add(newTimer);
         //Add when mystShapes if free.
         lock (lockMystShapes)
         {
             mystShapes.Add(newMyst);
         }
     }
 }
Example #2
0
 /// <summary>
 /// Handles the down event of the pane_mouse control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
 private void pane_mouse_down(object sender, MouseEventArgs e)
 {
     //Allow new lines if not paused
     if (!paused)
     {
         //Create new Myst
         MystLine newMyst = new MystLine(pnlPane, e.Location);
         //Create new Timer for line (calls update method of new Myst)
         MyTimer newTimer = new MyTimer(ONE_SECOND_IN_MILISECONDS / trcSpeed.Value, newMyst.update, this);
         timers.Add(newTimer);
         //Add when mystShapes if free.
         lock (lockMystShapes)
         {
             mystShapes.Add(newMyst);
         }
     }
 }