private void егуляторУровень_MouseMove_1(object sender, MouseEventArgs e) { if (!isManipulation) { return; } var button = sender as Button; var angle = TransformImageHelper.CalculateAngle(button.Width, button.Height, e); K05M_01Parameters.егуляторУровень = angle / 10; }
private void егуляторУсилениеПЧ_MouseMove(object sender, MouseEventArgs e) { if (!isManipulation) { return; } var button = sender as Button; var angle = TransformImageHelper.CalculateAngle(button.Width, button.Height, e); AstraParameters.егуляторУсилениеПЧ = angle; егуляторУсилениеПЧ.BackgroundImage = TransformImageHelper.RotateImageByAngle(ControlElementImages.revolverRoundBlack, AstraParameters.егуляторУсилениеПЧ); }
private void егулятор_MouseMove(object sender, MouseEventArgs e) { if (!isManipulation) { return; } var button = sender as Button; var angle = TransformImageHelper.CalculateAngle(button.Width, button.Height, e); N15Parameters.егуляторУровень = angle; button.BackgroundImage = TransformImageHelper.RotateImageByAngle( ControlElementImages.revolverRoundSmall, (float)N15Parameters.егуляторУровень); }
private void егулятор_MouseMove(object sender, MouseEventArgs e) { if (!isManipulation) { return; } var button = sender as Button; var angle = TransformImageHelper.CalculateAngle(button.Width, button.Height, e); var property = typeof(WattmeterParameters).GetProperty(button.Name); property.SetValue(null, angle); button.BackgroundImage = TransformImageHelper.RotateImageByAngle(ControlElementImages.revolverRoundBlack, (int)property.GetValue(null)); }
private void C1_67Регулятор_MouseMove(object sender, MouseEventArgs e) { if (!isManipulation) { return; } var button = sender as Button; var angle = TransformImageHelper.CalculateAngle(button.Width, button.Height, e); var propertyList = typeof(C1_67Parameters).GetProperties(); foreach (var property in propertyList.Where(property => button.Name == property.Name)) { property.SetValue(null, angle); var tempAngle = Convert.ToInt32(property.GetValue(null, null)); button.BackgroundImage = TransformImageHelper.RotateImageByAngle( ControlElementImages.revolverRoundSmall, tempAngle); } }