Ejemplo n.º 1
0
        // ====================================主要按鈕====================================
        private void Button1_Click(object sender, EventArgs e)
        {
            button4.Enabled = true;

            ONT_Profile.Slot    = Slot_Box.Text;
            ONT_Profile.Port    = Port_Box.Text;
            ONT_Profile.Onuid   = OnuID_Box.Text;
            ONT_Profile.Sn      = SN_Box.Text;
            ONT_Profile.Des     = Des_Box.Text;
            ONT_Profile.mode    = Mode_Box.Text;
            ONT_Profile.Svlan   = Svlan_Box.Text;
            ONT_Profile.Cvlan   = Cvlan_Box.Text;
            ONT_Profile.Bw_Up   = UP_Box.Text;
            ONT_Profile.Bw_Down = Down_Box.Text;
            ONT_Profile.Ip      = IP_Box.Text;
            ONT_Profile.Gw      = GW_Box.Text;
            ONT_Profile.Bw_Per  = Percen_Box.Text;
            if (Des_Box.Text != "" && Des_Box.Text.Length == 10)
            {
                ONT_Profile.MV = Des_Box.Text.Substring(6, 4);
            }
            else
            {
                MessageBox.Show("你電路編號是不是填錯阿!");
            }

            ONT_Profile.Group7750();


            string total =
                "=====OLT部分:=====\r\n" +
                ONT_Profile.Dba_profile() +
                ONT_Profile.Vlan_profile() +
                ONT_Profile.Traffic_profile() +
                ONT_Profile.Onu_profile() +
                ONT_Profile.GPON_OLT() +
                ONT_Profile.OLT_Vlan() +
                "\r\n=====10K部分:=====\r\n" +
                ONT_Profile.K10() +
                "\r\n=====7750或7450部分:=====\r\n" +
                ONT_Profile.ALU7750()
            ;



            richTextBox1.Text = total;
        }