private void Move2DControl_Click(object sender, EventArgs e)
 {
     if (Enabled && Zones != null)
     {
         Point local = this.PointToClient(Cursor.Position);
         foreach (var z in Zones)
         {
             if (z.HitTest(local))
             {
                 if (z is MouvementZone)
                 {
                     if (((MouvementZone)z).Mouvement.IsEmpty)
                     {
                         HomeClick?.Invoke(this, new HomeEventArgs(SpeedValue));
                     }
                     else
                     {
                         MoveClick?.Invoke(this, new MoveEventArgs(((MouvementZone)z).Mouvement, SpeedValue));
                     }
                 }
                 else if (z is SpeedPercentZone)
                 {
                     SpeedValue = ((SpeedPercentZone)z).Speed;
                 }
                 return;
             }
         }
     }
 }
示例#2
0
 private void buttonMove_Click(object sender, EventArgs e)
 {
     if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
     {
         DirectoryWay = folderBrowserDialog.SelectedPath;
         MoveClick?.Invoke(this, EventArgs.Empty);
     }
 }