Datalogic .NET SDK

SetWiFiPowerState (Method)

 

Syntax

 

   public static Boolean SetWiFiPowerState (Boolean on);

 

 

Class                           : Device

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

Turn the WiFi on or off.

 

 

Parameters Table

 

Type

Parameter

Description

[in]

Boolean

on

Set to true to turn WiFi on, false to turn WiFi off.

 

 

 

 

[returns]

Boolean

 

TRUE is returned on success, otherwise FALSE is returned.

[on error]

FALSE

 

-

 

 

Example

 

        private void btnSetWifi_Click(object sender, EventArgs e)

        {

            bool b = false;

 

            WiFiState = Device.GetWiFiPowerStatus();  // current state

 

            b = Device.SetWiFiPowerState(!WiFiState); // change state

            if (!b)

            {

                txtWifiStatus.Text = "No WiFi avbl";

            }

        }

 

 

 

 

See Also

Example #033.

 

Copyright © Datalogic ADC. All Right Reserved