예제 #1
0
        private void SendConfigForm_Load(object sender, EventArgs e)
        {
            ModemList     ML = new ModemList();
            List <string> LS = ML.GetModemsList();

            lblModem.Text = LS[ModemInd];

            LS           = ML.GetSoftList(ModemInd);
            lblSoft.Text = LS[SoftVerInd];

            TransferTyte tft = ML.GetTansferType(ModemInd, SoftVerInd);

            if (tft == TransferTyte.http)
            {
                cmbProtocol.SelectedIndex = 1;
            }
            else if (tft == TransferTyte.tftp)
            {
                cmbProtocol.SelectedIndex = 0;
            }
            else
            {
                cmbProtocol.SelectedIndex = -1;
            }
        }
예제 #2
0
        /// <summary>
        /// Способ передачи модему файла конфигурации
        /// </summary>
        /// <param name="ModemNum"></param>
        /// <param name="SoftNum"></param>
        /// <returns></returns>
        public TransferTyte GetTansferType(int ModemNum, int SoftNum)
        {
            TransferTyte rezult = TransferTyte.none;

            switch (ModemNum)
            {
            case 0:    // QTech QDSL-1040 rev B1
                switch (SoftNum)
                {
                case 0:                             // 2.3
                    rezult = TransferTyte.tftp;
                    break;

                case 1:                             // 2.5
                    rezult = TransferTyte.tftp;
                    break;
                }
                break;

            case 1:                         // D-Link 2540U BRU T1A
                switch (SoftNum)
                {
                case 0:                             // 1.0.27
                    rezult = TransferTyte.http;
                    break;

                case 1:                             // 1.0.28
                    rezult = TransferTyte.http;
                    break;

                case 2:                             // 1.0.30
                    rezult = TransferTyte.http;
                    break;
                }
                break;

            case 2:                         // D-Link 2500U NRU D4
                rezult = TransferTyte.http;
                break;

            case 3:                         // D-Link 2520U BRS D4
                rezult = TransferTyte.http;
                break;
            }

            return(rezult);
        }