private void MotorSettingClicked(object sender, RoutedEventArgs routedEventArgs)
        {
            var control = sender as MotorControl;

            if (control != null)
            {
                MotorSettings.SaveSettings += MotorSettings_SaveSettings;

                _selectedMotorControl = control;

                MotorSettings.Show(
                    control.BrickInputPort,
                    _brick.Ports[control.BrickInputPort].Type,
                    control.MotorMovementType,
                    control.DegreeMovement,
                    control.PowerRatingMovement,
                    control.TimeToMoveInSeconds);
            }
        }
        void MotorSettings_SaveSettings(object sender, MotorSettingsEventArgs e)
        {
            if (_selectedMotorControl == null)
                return;

            MotorSettings.SaveSettings -= MotorSettings_SaveSettings;

            _selectedMotorControl.MotorMovementType = e.MotorMovementType;
            _selectedMotorControl.DegreeMovement = e.DegreeMovement;
            _selectedMotorControl.PowerRatingMovement = e.PowerRatingMovement;
            _selectedMotorControl.TimeToMoveInSeconds = e.TimeToMoveInSeconds;

            _selectedMotorControl.UpdateUx();

            _selectedMotorControl = null;
        }