Beispiel #1
0
        private void LengthOnOrderWarningMessagesHendler()
        {
            OrderLengthWarningMessage.ResetText();

            if (pipe.orderWeight != 0 && pipe.weightOfMeter != 0)
            {
                LengthOnOrderTextBox.Text = pipe.CalculateMeteresOnOrder().ToString("0.0");
            }
            else if (pipe.orderWeight == 0 && pipe.weightOfMeter == 0)
            {
                OrderLengthWarningMessage.Left = 30;
                OrderLengthWarningMessage.Top  = 50;
                OrderLengthWarningMessage.Text = "Введите вес по заказу\nи размеры готовой трубы";
                LengthOnOrderTextBox.Text      = InitialTextBoxValue;
            }
            else if (pipe.orderWeight == 0 && pipe.weightOfMeter != 0)
            {
                OrderLengthWarningMessage.Left = 38;
                OrderLengthWarningMessage.Top  = 57;
                OrderLengthWarningMessage.Text = "Введите вес по заказу";
                LengthOnOrderTextBox.Text      = InitialTextBoxValue;
            }
            else if (pipe.orderWeight != 0 && pipe.weightOfMeter == 0)
            {
                OrderLengthWarningMessage.Left = 15;
                OrderLengthWarningMessage.Top  = 57;
                OrderLengthWarningMessage.Text = "Введите размеры готовой трубы";
                LengthOnOrderTextBox.Text      = InitialTextBoxValue;
            }
        }
Beispiel #2
0
        private void Reset_Click(object sender, EventArgs e)
        {
            BearingsRadioButton.Checked = true;
            blankPipe.ResetParameters();
            pipe.ResetParameters();

            if (BearingsRadioButton.Checked == true)
            {
                blankPipe.stellGrade = StellGrades.Bearings;
                pipe.stellGrade      = StellGrades.Bearings;
            }

            OrderWeightTextBox.Text   = InitialTextBoxValue;
            BlankDiameterTextBox.Text = InitialTextBoxValue;
            BlankSideTextBox.Text     = InitialTextBoxValue;
            BlankPipeWorningMessage.ResetText();
            BlankMeterWeightTextBox.Text = InitialTextBoxValue;
            PipeDiameterTextBox.Text     = InitialTextBoxValue;
            PipeSideTextBox.Text         = InitialTextBoxValue;
            PipeWorningMessage.ResetText();
            PipeMeterWeightTextBox.Text       = InitialTextBoxValue;
            StretchingCoefficientTextBox.Text = InitialTextBoxValue;
            LengthOnOrderTextBox.Text         = InitialTextBoxValue;
            BlankLengthTextBox.Text           = InitialTextBoxValue;
            PipeLenghFromBlankTextBox.Text    = InitialTextBoxValue;
            PipeLengthTextBox.Text            = InitialTextBoxValue;
            BlankLengthOutOfPipeTextBox.Text  = InitialTextBoxValue;

            StretchingCoefficientWarningMessage.ResetText();
            OrderLengthWarningMessage.ResetText();
        }