public static bool ShowBox(Window parent) { MsgBoxWifiCred box = new MsgBoxWifiCred(parent); box.processType = ProcessType.Create; box.ShowDialog(); return(box.Result.IsChanged); }
/// <summary> /// Get user data when using credentials for first time. Will not /// be save unless the connection is successful /// </summary> /// <param name="win">Parent window</param> /// <param name="ssid">SSID as the box title</param> /// <param name="host">Network host name or IP address</param> /// <param name="service">Network port</param> /// <returns></returns> public static WifiCredResult ShowBox(Window win, string ssid, string host, string service) { MsgBoxWifiCred box = new MsgBoxWifiCred(win, ssid, host, service); box.processType = ProcessType.Init; box.ShowDialog(); return(box.Result); }
/// <summary>Retrieve data from storage to edit and save</summary> /// <param name="parent">The parent window</param> /// <param name="index">The data item index object</param> public static bool ShowBox(Window parent, IIndexItem <DefaultFileExtraInfo> index) { MsgBoxWifiCred box = new MsgBoxWifiCred(parent, index); box.processType = ProcessType.Edit; box.ShowDialog(); return(box.Result.IsChanged); }
private void onCredentialsRequested(object sender, WifiCredentials item) { WifiCredResult result = MsgBoxWifiCred.ShowBox(this.parent, item.SSID, item.RemoteHostName, item.RemoteServiceName); if (result.IsChanged) { item.IsUserSaveRequest = true; item.WifiPassword = result.Password; item.IsUserCanceled = false; item.RemoteHostName = result.HostName; item.RemoteServiceName = result.ServiceName; } else { item.IsUserCanceled = true; } }
private void Wifi_CredentialsRequestedEventHandler(object sender, WifiCredentials cred) { var result = MsgBoxWifiCred.ShowBox(this, cred.SSID, cred.RemoteHostName, cred.RemoteServiceName); cred.IsUserCanceled = !result.IsOk; cred.IsUserSaveRequest = result.Save; cred.RemoteHostName = result.HostName; cred.RemoteServiceName = result.ServiceName; cred.WifiPassword = result.Password; //cred.RemoteHostName = "192.168.4.1"; //cred.RemoteServiceName = "80"; //cred.WifiPassword = "******"; // TODO - implement dialog //App.ShowMsg("Returning cred for wifi"); // Not using UserName }