/// <summary> ///get NIC state /// </summary> private string getStateDescription(WLAN_INTERFACE_STATE state) { string stateDescription = string.Empty; switch (state) { case WLAN_INTERFACE_STATE.wlan_interface_state_connected: stateDescription = "connected"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_not_ready: case WLAN_INTERFACE_STATE.wlan_interface_state_ad_hoc_network_formed: case WLAN_INTERFACE_STATE.wlan_interface_state_disconnecting: case WLAN_INTERFACE_STATE.wlan_interface_state_disconnected: case WLAN_INTERFACE_STATE.wlan_interface_state_associating: case WLAN_INTERFACE_STATE.wlan_interface_state_discovering: case WLAN_INTERFACE_STATE.wlan_interface_state_authenticating: stateDescription = "connect fail"; break; } return(stateDescription); }
/// <summary > /// WLAN I/F status wording /// </summary > private string getStateDescription(WLAN_INTERFACE_STATE state) { string stateDescription = string.Empty; switch (state) { case WLAN_INTERFACE_STATE.wlan_interface_state_not_ready: stateDescription = "not ready to operate"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_connected: stateDescription = "connected"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_ad_hoc_network_formed: stateDescription = "first node in an adhoc network"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_disconnecting: stateDescription = "disconnecting"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_disconnected: stateDescription = "disconnected"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_associating: stateDescription = "associating"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_discovering: stateDescription = "discovering"; break; case WLAN_INTERFACE_STATE.wlan_interface_state_authenticating: stateDescription = "authenticating"; break; } return stateDescription; }
public static InterfaceState Convert(WLAN_INTERFACE_STATE source) => (InterfaceState)source;