コード例 #1
0
        /// <summary>
        /// Handles the change of the location, sets the new location and invokes the changed event.
        /// </summary>
        private void txtLocation_ValueChanged(VectorTextBox sender, TPoint newLocation)
        {
            var diff = newLocation - this.currentDefinition.Location;

            this.currentDefinition = (MouseSpeedIndicatorDefinition)this.currentDefinition.Translate(diff.Width, diff.Height);
            this.DefinitionChanged?.Invoke(this.currentDefinition);
        }
コード例 #2
0
 /// <summary>
 /// Handles the change of the radius, sets the new radius and invokes the changed event.
 /// </summary>
 private void udRadius_ValueChanged(object sender, EventArgs e)
 {
     this.currentDefinition = this.currentDefinition.SetRadius((int)this.udRadius.Value);
     this.DefinitionChanged?.Invoke(this.currentDefinition);
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MouseSpeedPropertiesForm" /> class.
 /// </summary>
 public MouseSpeedPropertiesForm(MouseSpeedIndicatorDefinition initialDefinition)
 {
     this.initialDefinition = initialDefinition ?? throw new ArgumentNullException(nameof(initialDefinition));
     this.currentDefinition = (MouseSpeedIndicatorDefinition)this.initialDefinition.Clone();
     this.InitializeComponent();
 }