/// <summary> /// Call to the login window. /// </summary> public void CallLogin() { LoginWin Login = new LoginWin(); this.Close(); Login.Show(); }
public static void RemoveComponent() { if (_Instance != null) { _Instance._RemoveComponent(); } _Instance = null; }
// private int addressId; // private float m_delayConnectSecond; // #if UNITY_EDITOR // private readonly string[,] ServerTypeDic = { // {"测试服务器", "http://127.0.0.1:8080"} // }; // #else // private readonly string[,] ServerTypeDic = { // {"正式服务器", "http://127.0.0.1:8080"} // }; // #endif public static void InitComponent() { if (_Instance == null) { _Instance = new LoginWin(); } _Instance._InitComponent(); }
private void btnOSBLELogin_Click(object sender, RoutedEventArgs e) { LoginWin lw = new LoginWin(); lw.LoginAttemptCompleted += new EventHandler(OSBLELoginAttemptCompleted); //lw.LoginAttemptCompleted += new LoginWindow.LoginAttemptCompletedDelegate(OSBLELoginAttemptCompleted); lw.Show(); }
public void OnGUI() { if (Input.GetMouseButtonDown(0))//先这么写 { LoginWin.RemoveComponent(); LuaManager.Instance.CallLuaFunByName("Game.initLoadUI"); // MagusSceneManager.Instance.SetNextScene(SceneID.Game); } }
private void Button_Click(object sender, RoutedEventArgs e) { if (MessageBoxResult.Yes == MessageBox.Show("Oturumu kapatmak istiyor musunuz?", "", MessageBoxButton.YesNo, MessageBoxImage.Question)) { LoginWin win = new LoginWin(); win.Show(); Close(); } }
void OSBLELoginAttemptCompleted(object sender, EventArgs e) { LoginWin lw = sender as LoginWin; ChemProV.Logic.OSBLE.OSBLEState state = lw.State; // Set the global Core.App.OSBLEState = state; if (state.IsLoggedIn) { NormalOsbleIcon.Visibility = System.Windows.Visibility.Collapsed; LoggedInOsble.Visibility = System.Windows.Visibility.Visible; } }
public void InitFairyGUI() { //重命名根节点 GRoot.inst.displayObject.parent.gameObject.name = "FairyGUI"; GRoot.inst.displayObject.gameObject.name = "UIROOT"; Stage.inst.stage.GetRenderCamera().allowMSAA = true; //分辨率适配 //1280*720 6s:1334*750 1920*1080 iphonex:2436*1125 GRoot.inst.SetContentScaleFactor(1334, 750, FairyGUI.UIContentScaler.ScreenMatchMode.MatchWidth); UIConfig.defaultFont = "hwxs"; //基础ui LoginWin.InitComponent(); //loadingui //messagebox //transitionwin }
private void LoginCheck() { LoginWin login = new LoginWin(); login.Owner = this; bool?result = login.ShowDialog(); if (result == true) { frame_content.Navigate(new Uri("view/Pages/Home.xaml", UriKind.Relative)); if (login.CheckBox.IsChecked == (bool?)true) { loginVM.SetBool(true); } } }
public bool Login(LoginInfo logininfo) { if (winshow == true) { return(false); } try { winshow = true; loginSucceed = false; logininfo.RrrorInformation = "";//清空信息 loginWin = new LoginWin(logininfo); loginWin.Title = (string)Application.Current.Resources["strLogin"]; loginWin.Parachanged += Win_Parachanged; loginWin.ShowDialog(); return(loginSucceed); } finally { winshow = false; } }
private static async System.Threading.Tasks.Task UpgradeAccount(LoginWin login) { await Store.LoadData(login); AccountWin account = login.Account; AccountDataItem accountUWP = new AccountDataItem(login.LocalAccountId) { AccountId = login.AccountId, AutoLogin = login.AutoLogin, CurrentChangeNumber = account.CurrentChangeNumber, CurrentSemesterId = account.School.ActiveSemesterIdentifier, DeviceId = login.DeviceId, LocalAccountId = login.LocalAccountId, LocalToken = login.Password, PremiumAccountExpiresOn = account.PremiumAccountExpiresOn, RememberPassword = login.RememberPassword, RememberUsername = login.RememberUsername, Username = login.Username, WeekOneStartsOn = account.WeekOneStartsOn, Version = account.Version }; // Save account (need to do this so there's a folder for everything else) await AccountsManager.Save(accountUWP); try { AccountDataStore dataStoreUWP = await AccountDataStore.Get(login.LocalAccountId); // Transfer the Changes PartialChanges existingChanges = await account.GetPartialChanges(); await AccountDataStore.ChangedItems.ImportChangesAsync(login.LocalAccountId, existingChanges.Changes.Keys.ToArray(), existingChanges.Deletes.Keys.ToArray()); try { // Transfer images to upload string[] imagesToUpload = (await account.GetAllImagesToUpload()).ToArray(); await dataStoreUWP.AddImagesToUploadAsync(imagesToUpload); // Transfer stored images StorageFolder oldImagesFolder = await login.GetImagesFolder(); IFolder newImagesFolderPortable = await PowerPlannerAppDataLibrary.DataLayer.FileHelper.GetOrCreateImagesFolder(login.LocalAccountId); StorageFolder newImagesFolder = await StorageFolder.GetFolderFromPathAsync(newImagesFolderPortable.Path); foreach (StorageFile existingImage in await oldImagesFolder.GetFilesAsync()) { await existingImage.MoveAsync(newImagesFolder); } } catch { } // Get all the existing items BaseItem[] syncItems = account.GetAllItemsInSendingFormat(); // Translate them to the universal sync language BaseDataItem[] uwpItems = PowerPlannerAppDataLibrary.SyncLayer.Sync.GetSyncItemsAsDataItems(syncItems); // And then input those into the new database await dataStoreUWP.ImportItemsAsync(uwpItems); } catch (Exception ex) { try { TelemetryExtension.Current?.TrackException(ex); } catch { } await AccountsManager.Delete(login.LocalAccountId); } }
private void LogOut(object sender, RoutedEventArgs e) { LoginWin win = new LoginWin(); win.Show(); Close(); }
public LoginViewModel(LoginWin loginWin) { this.loginWin = loginWin; this.loginWin.LoginBtn.Click += Login_Click; this.loginWin.RegisterBtn.Click += Register_Click; }