예제 #1
0
        private bool ConfigureWpaPersonal(WirelessSettings wirelessSettings, WPAPersonalSettings wpaSettings, ProductType productType = ProductType.None)
        {
            /*
             *      TPS                     VEP-MI                          VEP-SI
             * WEP    WEP Persoanl            WEP Personal, WEP Enterprise    NA
             * 'WPA    Personal, Enterprise    Personal, Enterprise            Personal, Enterprise
             * WPS    Push, Pin               NA                              NA
             */
            CoreUtility.Retry.UntilTrue(() => _adapter.IsElementPresent("WirelessSecurity_WPA"), 20, TimeSpan.FromSeconds(5));
            _adapter.Check("WirelessSecurity_WPA");

            if (_adapter.Settings.ProductType == PrinterFamilies.VEP)
            {
                _adapter.SelectByValue("Wireless_WPAVersion", Enum <WPAVersions> .Value(wpaSettings.Version));
                _adapter.SelectByValue("Wireless_WPAEncryption", Enum <WPAEncryptions> .Value(wpaSettings.Encryption));
            }

            _adapter.Check("WirelessSecurity_WPAPersonal");
            _adapter.SetText("Wireless_WPAPassphrase", wpaSettings.passphrase);

            if (_adapter.Settings.ProductType == PrinterFamilies.InkJet)
            {
                _adapter.SetText("Wireless_WPAConfirmPassphrase", wpaSettings.passphrase);
            }

            try
            {
                _adapter.Click("Wireless_Apply");
            }
            finally
            { }

            return(true);
        }
예제 #2
0
 public WirelessSecuritySettings(WPAPersonalSettings wpaPersonalSettings)
 {
     WirelessAuthentication    = WirelessAuthentications.Wpa;
     WirelessConfigurationType = WirelessTypes.Personal;
     WPAPersonalSecurity       = wpaPersonalSettings;
 }