示例#1
0
        private void lbl_Back(object sender, EventArgs e)
        {
            StepFrame vMainFrom = null;

            if (Parent == null)
            {
                return;
            }
            if (Parent.Parent == null)
            {
                return;
            }

            vMainFrom = Parent.Parent as StepFrame;
            vMainFrom.BackStep();
        }
示例#2
0
        private void lblClose_Click(object sender, EventArgs e)
        {
            StepFrame vMainFrom = null;

            if (Parent == null)
            {
                return;
            }
            if (Parent.Parent == null)
            {
                return;
            }

            vMainFrom = Parent.Parent as StepFrame;

            vMainFrom.Close();
        }
示例#3
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            Control focusItem = roundEdit1;

            try
            {
                StepFrame vMainFrom = null;

                if (Parent == null)
                {
                    return;
                }
                if (Parent.Parent == null)
                {
                    return;
                }

                vMainFrom = Parent.Parent as StepFrame;
                int UserIndex = 0;

                if (vMainFrom.IsEnableCheck)
                {
                    if (radioButton1.Checked)
                    {
                        Helper.WriteLog("Manual input: " + roundEdit1._RichTextBox.Text);

                        int nDb = 0;
                        Int32.TryParse(roundEdit1._RichTextBox.Text, out nDb);

                        if (!Int32.TryParse(roundEdit1._RichTextBox.Text, out nDb) || nDb <= 0 || nDb > Data_WallsType.maxRW)
                        {
                            focusItem = roundEdit1;
                            throw new Exception("Значение поля \"Индекс изоляции воздушного шума, Rw\" " +
                                                "должно быть заполнено и не может быть больше " + Data_WallsType.maxRW.ToString() + " Дб");
                        }


                        UserIndex = nDb;
                    }
                    else
                    if (radioButton2.Checked)
                    {
                        if (customComboBox1.SelectedIndex < 1)
                        {
                            focusItem = customComboBox1;
                            throw new Exception("Необходимо выбрать значение поля \"Тип здания\"");
                        }

                        var itemType = customComboBox1.SelectedItem as sBuildingType;

                        if (customComboBox2.SelectedIndex < 1)
                        {
                            focusItem = customComboBox2;
                            throw new Exception("Необходимо выбрать значение поля \"Тип конструкции\"");
                        }

                        var itemS = customComboBox2.SelectedItem as sBuildingWall;
                        UserIndex = itemS.Db;

                        Helper.WriteLog("ComboBox Choise: " + itemType.Name + " - " + itemS.Name);
                    }
                }

                Helper.WriteLog("Rw = " + UserIndex);
                vMainFrom.CalcStruct.Rw = UserIndex;
                vMainFrom.NextStep();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                focusItem.Focus();
                return;
            }
        }
示例#4
0
 private void roundButton1_Click(object sender, EventArgs e)
 {
     Steps.StepFrame d = new Steps.StepFrame();
     d.ShowDialog(this);
 }
示例#5
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            Control focusItem = cbEI;

            try
            {
                StepFrame vMainFrom = null;

                if (base.Parent == null)
                {
                    return;
                }
                if (base.Parent.Parent == null)
                {
                    return;
                }

                vMainFrom = base.Parent.Parent as StepFrame;

                if (vMainFrom.IsEnableCheck)
                {
                    if (cbEI.SelectedIndex < 1)
                    {
                        focusItem = cbEI;
                        throw new Exception("Выберите \"Предел огнестойкости EI\"");
                    }

                    var elem = (CBItem)cbEI.SelectedItem;
                    vMainFrom.CalcStruct.EI = elem._intValue;

                    elem = (CBItem)cbTP.SelectedItem;
                    vMainFrom.CalcStruct.Tp = elem._intValue;

                    if (cbIsolation.SelectedIndex > 0)
                    {
                        var itm = (CBItem)cbIsolation.SelectedItem;
                        vMainFrom.CalcStruct.Ti = itm._intValue;
                    }
                    else
                    {
                        vMainFrom.CalcStruct.Ti = 0;
                    }

                    if (cbCountN.SelectedIndex > 0)
                    {
                        var itm = (CBItem)cbCountN.SelectedItem;
                        vMainFrom.CalcStruct.N = itm._intValue;
                    }
                    else
                    {
                        vMainFrom.CalcStruct.N = 0;
                    }
                }

                vMainFrom.NextStep();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                focusItem.Focus();
                return;
            }
        }