Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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.егуляторУсилениеПЧ);
        }
Ejemplo n.º 3
0
        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.егуляторУровень);
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
        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);
            }
        }