Пример #1
0
        // создать.клик
        private void btnApply_Click(object sender, EventArgs e)
        {
            ConfFileName = string.Empty;

            Settings = new AllOtions();

            Settings.ModemNum = cmbModem.SelectedIndex;
            Settings.SoftNum  = cmbSoft.SelectedIndex;

            if (rbPPPoA.Checked == true)
            {
                Settings.Encapsulation = EncapType.PPPoA;
            }
            else
            {
                Settings.Encapsulation = EncapType.PPPoE;
            }

            Settings.Login    = txbLogin.Text;
            Settings.Password = txbPassw.Text;

            Settings.IpTV = chbIpTV.Checked;

            if (rbTVToAll.Checked == true)
            {
                Settings.PMap = PortMappingsType.ForAll;
            }
            else
            {
                Settings.PMap = PortMappingsType.SelectedPorts;
            }

            // класс
            ConfCreate CC = new ConfCreate(Settings, txbFolder.Text);

            // создать конфигурацию
            CC.CreateConfiguration();


            if (CC.ConfFileName.Length > 0)
            {
                ConfFileName = CC.ConfFileName;

                // попробовать влить
                btnSend.Enabled = true;
            }
        }
Пример #2
0
 public ConfCreate(AllOtions ModemSettings, string Path)
 {
     Settings     = ModemSettings;
     FolderPath   = Path;
     ConfFileName = string.Empty;
 }