Example #1
0
        private void m_redlst_DoubleClick(object sender, EventArgs e)
        {
            {
                String i1, i2, i3, i4, i5, i6, i7, i8, i9;
                //Начальная установка
                m_np1.Show();
                m_nm1.Show();
                m_np2.Show();
                m_nm2.Show();
                m_z1.Show();
                m_z2.Show();
                m_z3.Show();
                m_z4.Show();
                m_z5.Show();
                m_z6.Show();

                IDC_NP1_STATIC.Show();
                IDC_NM1_STATIC.Show();
                IDC_NP2_STATIC.Show();
                IDC_NM2_STATIC.Show();
                IDC_Z1_STATIC.Show();
                IDC_Z2_STATIC.Show();
                IDC_Z3_STATIC.Show();
                IDC_Z4_STATIC.Show();
                IDC_Z5_STATIC.Show();
                IDC_Z6_STATIC.Show();

                m_np1.Text = "";
                m_nm1.Text = "";
                m_np2.Text = "";
                m_nm2.Text = "";
                m_z1.Text  = "";
                m_z2.Text  = "";
                m_z3.Text  = "";
                m_z4.Text  = "";
                m_z5.Text  = "";
                m_z6.Text  = "";

                //Выбор типа компонента из списка и настройка панели
                int idx = m_redlst.SelectedIndex;
                switch (idx)
                {
                case 0:     //резисторы
                    i1 = "n+";
                    i2 = "n-";
                    i3 = "КОм";

                    IDC_NP2_STATIC.Text = i1;
                    IDC_NM2_STATIC.Text = i2;
                    IDC_Z1_STATIC.Text  = i3;

                    m_np1.Hide();
                    m_nm1.Hide();
                    m_z2.Hide();
                    m_z3.Hide();
                    m_z4.Hide();
                    m_z5.Hide();
                    m_z6.Hide();

                    IDC_NP1_STATIC.Hide();
                    IDC_NM1_STATIC.Hide();
                    IDC_Z2_STATIC.Hide();
                    IDC_Z3_STATIC.Hide();
                    IDC_Z4_STATIC.Hide();
                    IDC_Z5_STATIC.Hide();
                    IDC_Z6_STATIC.Hide();

                    m_n.Focus();
                    break;

                case 1:     //конеденсаторы
                    i1 = "n+";
                    i2 = "n-";
                    i3 = "мкФ";

                    IDC_NP2_STATIC.Text = i1;
                    IDC_NM2_STATIC.Text = i2;
                    IDC_Z1_STATIC.Text  = i3;

                    m_np1.Hide();
                    m_nm1.Hide();
                    m_z2.Hide();
                    m_z3.Hide();
                    m_z4.Hide();
                    m_z5.Hide();
                    m_z6.Hide();

                    IDC_NP1_STATIC.Hide();
                    IDC_NM1_STATIC.Hide();
                    IDC_Z2_STATIC.Hide();
                    IDC_Z3_STATIC.Hide();
                    IDC_Z4_STATIC.Hide();
                    IDC_Z5_STATIC.Hide();
                    IDC_Z6_STATIC.Hide();

                    m_n.Focus();
                    break;

                case 2:     //индуктивности
                    i1 = "n+";
                    i2 = "n-";
                    i3 = "Значение";

                    IDC_NP2_STATIC.Text = i1;
                    IDC_NM2_STATIC.Text = i2;
                    IDC_Z1_STATIC.Text  = i3;

                    m_np1.Hide();
                    m_nm1.Hide();
                    m_z2.Hide();
                    m_z3.Hide();
                    m_z4.Hide();
                    m_z5.Hide();
                    m_z6.Hide();

                    IDC_NP1_STATIC.Hide();
                    IDC_NM1_STATIC.Hide();
                    IDC_Z2_STATIC.Hide();
                    IDC_Z3_STATIC.Hide();
                    IDC_Z4_STATIC.Hide();
                    IDC_Z5_STATIC.Hide();
                    IDC_Z6_STATIC.Hide();

                    m_n.Focus();

                    break;

                case 6:     //ИНУН
                    i1 = "n1+";
                    i2 = "n1-";
                    i3 = "n2+";
                    i4 = "n2-";
                    i5 = "mu";
                    i6 = "T1";
                    i7 = "T2";

                    IDC_NP1_STATIC.Text = i1;
                    IDC_NM1_STATIC.Text = i2;
                    IDC_NP2_STATIC.Text = i3;
                    IDC_NM2_STATIC.Text = i4;
                    IDC_Z1_STATIC.Text  = i5;
                    IDC_Z2_STATIC.Text  = i6;
                    IDC_Z3_STATIC.Text  = i7;

                    m_z4.Hide();
                    m_z5.Hide();
                    m_z6.Hide();

                    IDC_Z4_STATIC.Hide();
                    IDC_Z5_STATIC.Hide();
                    IDC_Z6_STATIC.Hide();
                    m_n.Focus();
                    break;

                case 5:     //ИНУТ
                    i1 = "n1+";
                    i2 = "n1-";
                    i3 = "n2+";
                    i4 = "n2-";
                    i7 = "betta";

                    IDC_NP1_STATIC.Text = i1;
                    IDC_NM1_STATIC.Text = i2;
                    IDC_NP2_STATIC.Text = i3;
                    IDC_NM2_STATIC.Text = i4;
                    IDC_Z1_STATIC.Text  = i7;

                    m_z2.Hide();
                    m_z3.Hide();
                    m_z4.Hide();
                    m_z5.Hide();
                    m_z6.Hide();

                    IDC_Z2_STATIC.Hide();
                    IDC_Z3_STATIC.Hide();
                    IDC_Z4_STATIC.Hide();
                    IDC_Z5_STATIC.Hide();
                    IDC_Z6_STATIC.Hide();
                    m_n.Focus();
                    break;

                case 11:     //ИОУ
                    i1 = "n1+";
                    i2 = "n1-";
                    i3 = "n2+";
                    i4 = "n2-";

                    IDC_NP1_STATIC.Text = i1;
                    IDC_NM1_STATIC.Text = i2;
                    IDC_NP2_STATIC.Text = i3;
                    IDC_NM2_STATIC.Text = i4;

                    m_z1.Hide();
                    m_z2.Hide();
                    m_z3.Hide();
                    m_z4.Hide();
                    m_z5.Hide();
                    m_z6.Hide();

                    IDC_Z1_STATIC.Hide();
                    IDC_Z2_STATIC.Hide();
                    IDC_Z3_STATIC.Hide();
                    IDC_Z4_STATIC.Hide();
                    IDC_Z5_STATIC.Hide();
                    IDC_Z6_STATIC.Hide();

                    m_n.Focus();
                    break;

                case 8:     //Униполярные транзисторы
                    i1 = "Затвор";
                    i2 = "Сток";
                    i3 = "Исток";
                    i5 = "Rc";
                    i6 = "Czi";
                    i7 = "Czs";
                    i8 = "Csi";
                    i9 = "S";

                    IDC_NP1_STATIC.Text = i1;
                    IDC_NM1_STATIC.Text = i2;
                    IDC_NP2_STATIC.Text = i3;
                    IDC_Z1_STATIC.Text  = i5;
                    IDC_Z2_STATIC.Text  = i6;
                    IDC_Z3_STATIC.Text  = i7;
                    IDC_Z4_STATIC.Text  = i8;
                    IDC_Z5_STATIC.Text  = i9;

                    m_nm2.Hide();
                    m_z6.Hide();
                    IDC_NM2_STATIC.Hide();
                    IDC_Z6_STATIC.Hide();

                    m_n.Focus();
                    break;
                }
            }
        }
Example #2
0
File: RED.cs Project: Azim/KaKa
        private void m_redlst_DoubleClick(object sender, EventArgs e)
        {
            m_np1.Show();
            m_nm1.Show();
            m_np2.Show();
            m_nm2.Show();
            m_z1.Show();
            m_z2.Show();
            m_z3.Show();
            m_z4.Show();
            m_z5.Show();
            m_z6.Show();
            IDC_NP1_STATIC.Show();
            IDC_NM1_STATIC.Show();
            IDC_NP2_STATIC.Show();
            IDC_NM2_STATIC.Show();
            IDC_Z1_STATIC.Show();
            IDC_Z2_STATIC.Show();
            IDC_Z3_STATIC.Show();
            IDC_Z4_STATIC.Show();
            IDC_Z5_STATIC.Show();
            IDC_Z6_STATIC.Show();
            m_np1.Text = "";
            m_nm1.Text = "";
            m_np2.Text = "";
            m_nm2.Text = "";
            m_z1.Text  = "";
            m_z2.Text  = "";
            m_z3.Text  = "";
            m_z4.Text  = "";
            m_z5.Text  = "";
            m_z6.Text  = "";
            //Выбор типа компонента из списка и настройка панели
            int idx = m_redlst.SelectedIndex;

            switch (idx)
            {
            case 0:
            case 1:
            case 2:
                IDC_NP2_STATIC.Text = "n+";
                IDC_NM2_STATIC.Text = "n-";
                IDC_Z1_STATIC.Text  = "Значение";
                m_np1.Hide();
                m_nm1.Hide();
                m_z2.Hide();
                m_z3.Hide();
                m_z4.Hide();
                m_z5.Hide();
                m_z6.Hide();
                IDC_NP1_STATIC.Hide();
                IDC_NM1_STATIC.Hide();
                IDC_Z2_STATIC.Hide();
                IDC_Z3_STATIC.Hide();
                IDC_Z4_STATIC.Hide();
                IDC_Z5_STATIC.Hide();
                IDC_Z6_STATIC.Hide();
                break;

            case 3:
                IDC_NP1_STATIC.Text = "n1+";
                IDC_NM1_STATIC.Text = "n1-";
                IDC_NP2_STATIC.Text = "n2+";
                IDC_NM2_STATIC.Text = "n2-";
                IDC_Z1_STATIC.Text  = "y0";
                IDC_Z2_STATIC.Text  = "T1";
                IDC_Z3_STATIC.Text  = "T2";
                m_z4.Hide();
                m_z5.Hide();
                m_z6.Hide();
                break;

            case 4:
            case 5:
                IDC_NP1_STATIC.Text = "n1+";
                IDC_NM1_STATIC.Text = "n1-";
                IDC_NP2_STATIC.Text = "n2+";
                IDC_NM2_STATIC.Text = "n2-";
                IDC_Z1_STATIC.Text  = "Значение";
                m_z2.Hide();
                m_z3.Hide();
                m_z4.Hide();
                m_z5.Hide();
                m_z6.Hide();
                break;

            case 6:
                IDC_NP1_STATIC.Text = "n1+";
                IDC_NM1_STATIC.Text = "n1-";
                IDC_NP2_STATIC.Text = "n2+";
                IDC_NM2_STATIC.Text = "n2-";
                IDC_Z1_STATIC.Text  = "Ri";
                IDC_Z2_STATIC.Text  = "Ro";
                IDC_Z3_STATIC.Text  = "m";
                IDC_Z4_STATIC.Text  = "ft";
                m_z5.Hide();
                m_z6.Hide();
                break;
            }
            m_n.Focus();
        }
Example #3
0
        private void m_redlst_DoubleClick(object sender, EventArgs e)
        {
            String i1, i2, i3, i4, i5, i6, i7, i8, i9;

            m_np1.Show();
            m_nm1.Show();
            m_np2.Show();
            m_nm2.Show();
            m_z1.Show();
            m_z2.Show();
            m_z3.Show();
            m_z4.Show();
            m_z5.Show();
            m_z6.Show();
            IDC_NP1_STATIC.Show();
            IDC_NM1_STATIC.Show();
            IDC_NP2_STATIC.Show();
            IDC_NM2_STATIC.Show();
            IDC_Z1_STATIC.Show();
            IDC_Z2_STATIC.Show();
            IDC_Z3_STATIC.Show();
            IDC_Z4_STATIC.Show();
            IDC_Z5_STATIC.Show();
            IDC_Z6_STATIC.Show();
            m_np1.Text = "";
            m_nm1.Text = "";
            m_np2.Text = "";
            m_nm2.Text = "";
            m_z1.Text  = "";
            m_z2.Text  = "";
            m_z3.Text  = "";
            m_z4.Text  = "";
            m_z5.Text  = "";
            m_z6.Text  = "";
            //Выбор типа компонента из списка и настройка панели
            int idx = m_redlst.SelectedIndex;

            switch (idx)
            {
            case 0:
                i1 = "n+";
                i2 = "n-";
                i3 = "КОм";
                IDC_NP2_STATIC.Text = i1;
                IDC_NM2_STATIC.Text = i2;
                IDC_Z1_STATIC.Text  = i3;
                m_np1.Hide();
                m_nm1.Hide();
                m_z2.Hide();
                m_z3.Hide();
                m_z4.Hide();
                m_z5.Hide();
                m_z6.Hide();
                IDC_NP1_STATIC.Hide();
                IDC_NM1_STATIC.Hide();
                IDC_Z2_STATIC.Hide();
                IDC_Z3_STATIC.Hide();
                IDC_Z4_STATIC.Hide();
                IDC_Z5_STATIC.Hide();
                IDC_Z6_STATIC.Hide();
                m_n.Focus();
                break;

            case 1:
                i1 = "n+";
                i2 = "n-";
                i3 = "мкФ";
                IDC_NP2_STATIC.Text = i1;
                IDC_NM2_STATIC.Text = i2;
                IDC_Z1_STATIC.Text  = i3;
                m_np1.Hide();
                m_nm1.Hide();
                m_z2.Hide();
                m_z3.Hide();
                m_z4.Hide();
                m_z5.Hide();
                m_z6.Hide();
                IDC_NP1_STATIC.Hide();
                IDC_NM1_STATIC.Hide();
                IDC_Z2_STATIC.Hide();
                IDC_Z3_STATIC.Hide();
                IDC_Z4_STATIC.Hide();
                IDC_Z5_STATIC.Hide();
                IDC_Z6_STATIC.Hide();
                m_n.Focus();
                break;

            case 2:
                i1 = "n+";
                i2 = "n-";
                i3 = "мГн";
                IDC_NP2_STATIC.Text = i1;
                IDC_NM2_STATIC.Text = i2;
                IDC_Z1_STATIC.Text  = i3;
                m_np1.Hide();
                m_nm1.Hide();
                m_z2.Hide();
                m_z3.Hide();
                m_z4.Hide();
                m_z5.Hide();
                m_z6.Hide();
                IDC_NP1_STATIC.Hide();
                IDC_NM1_STATIC.Hide();
                IDC_Z2_STATIC.Hide();
                IDC_Z3_STATIC.Hide();
                IDC_Z4_STATIC.Hide();
                IDC_Z5_STATIC.Hide();
                IDC_Z6_STATIC.Hide();
                m_n.Focus();
                break;
            }
        }