void OnEnable() { if (!UIManager.Instance.isAffiliate) { availablePokerType = new List <string> () { "All", "WhoopAss", "Texas", "Table" }; availableMoneyType = new List <string> () { "All", "Play Money", "Real Money" }; } btnNext.interactable = false; btnPrevious.interactable = false; // btnCurrent.interactable = false; APIManager.GetInstance().GetPlayerInfo(); SetDropDownOptions(); GetFilteredData(true); SetPlayerProfile(); PokerSocketManager.onGameCreated += HandleOnGameCreated; PokerSocketManager.onJoinCashGame += HandleOnJoinCashGame; PokerSocketManager.onLeaveCashGame += HandleOnLeaveCashGame; PokerSocketManager.onPlayerJoinedCashGame += HandleOnPlayerJoinedCashGame; StartCoroutine(GetGameDetail()); UIAccount.AccountAPIManager.GetInstance().GetAccountDetail(); }
public void OnGameRulesButtonTap() { imgGameRules.sprite = spSelected; imgTips.sprite = spDisabled; imgGameRules.transform.localScale = new Vector3(1, 1, 1); imgTips.transform.localScale = new Vector3(1, 1, 1); Color bgColor = new Color(); ColorUtility.TryParseHtmlString(APIConstants.HEX_GOLDEN_HEADER, out bgColor); txtGameRulesTitle.color = bgColor; ColorUtility.TryParseHtmlString(APIConstants.HEX_RED_HEADER, out bgColor); txtTipsTitle.color = bgColor; txtGameRules.gameObject.SetActive(true); txtTips.gameObject.SetActive(false); if (txtGameRules.text.Length == 0) { loader.gameObject.SetActive(true); } APIManager.GetInstance().GetGameRules(); }
void StartPage_Loaded(object sender, RoutedEventArgs e) { APIManager.GetInstance().RestoreLoginState(new Action <Boolean>((b) => Dispatcher.BeginInvoke(() => { }))); settingManager.RestoreSettings(); this.content.RenderTransform = TranslateTransform; apiManager.RandomArticleHandler += apiManager_RandomArticleHandler; apiManager.GetRandomArticle(); }
void OnDisable() { UIManager.Instance.playerDetailPanel.gameObject.SetActive(false); PokerSocketManager.onGameCreated -= HandleOnGameCreated; PokerSocketManager.onJoinCashGame -= HandleOnJoinCashGame; PokerSocketManager.onLeaveCashGame -= HandleOnLeaveCashGame; PokerSocketManager.onPlayerJoinedCashGame -= HandleOnPlayerJoinedCashGame; APIManager.GetInstance().StopUpdatingLoginStauts(); }
private IEnumerator GetAffiliateDataAtInterval() { while (true) { if (UIManager.Instance.lobbyPanel.gameObject.activeSelf || UIManager.Instance.dashboardPanel.buyChipsPanel.gameObject.activeSelf) { APIManager.GetInstance().GetAvailableGame(APIManager.GetInstance().affiliateId, (www) => { Debug.Log("Affiliate id : " + APIManager.GetInstance().affiliateId + "\nAvailable games : " + www.text); API_AvailableGames availableGames = JsonUtility.FromJson <API_AvailableGames> (www.text); UIManager.Instance.lobbyPanel.RefreshForAffiliateGameUpdate(availableGames); }); } yield return(new WaitForSeconds(10f)); } }
public void OnYesButtonTap() { LoginScript.loginDetails = null; gameObject.SetActive(false); SoundManager.Instance.PlayButtonTapSound(); UIManager.Instance.DisplayLoader("Logging out.."); APIManager.GetInstance().Logout((success) => { UIManager.Instance.HideLoader(); if (success) { UIManager.Instance.lobbyPanel.gameObject.SetActive(false); UIManager.Instance.dashboardPanel.gameObject.SetActive(false); UIManager.Instance.loginPanel.gameObject.SetActive(true); } }); }
public void SetAffiliateData(string affiliateId) { APIManager.GetInstance().affiliateId = affiliateId; if (UIManager.Instance.isAffiliate) { StartCoroutine(GetAffiliateDataAtInterval()); } APIManager.GetInstance().GetAvailableGame(APIManager.GetInstance().affiliateId, (www) => { Debug.Log("Affiliate id : " + APIManager.GetInstance().affiliateId + "\nAvailable games : " + www.text); if (string.IsNullOrEmpty(www.error)) { API_AvailableGames availableGames = JsonUtility.FromJson <API_AvailableGames> (www.text); UIManager.Instance.lobbyPanel.RefreshForAffiliateGameUpdate(availableGames); } }); }
private void OnSelected() { ArticleContent ca = APIManager.GetInstance().currentArticle; String share = ca.title + " - 阅FM http://yue.fm/" + ca.short_id; switch (list[this.listBox.SelectedIndex].name) { case "weibo": case "tencent": case "douban": String uri = "/SocialStatusPage.xaml?type=" + list[this.listBox.SelectedIndex].name + "&share=" + share; (Application.Current.RootVisual as PhoneApplicationFrame).Navigate(new Uri(uri, UriKind.Relative)); break; case "mail": EmailComposeTask ect = new EmailComposeTask(); ect.Body = share; ect.Show(); break; case "sms": SmsComposeTask sct = new SmsComposeTask(); sct.Body = share; sct.Show(); break; default: ShareStatusTask sst = new ShareStatusTask(); sst.Status = share; sst.Show(); break; } action(); LayoutRootOutStoryboard.Begin(); }
public void buttoncallhourly() { CancelInvoke("GetPerfectClock"); APIManager.GetInstance().lastHourAchivement(); }
public void onLoginButtonClicked() { string strUserName = ifUserName.text; string strPassword = ifPassword.text; // Debug.Log ("-----------"); // int temp = int.Parse ("sadf"); LoggedUserBean.userName = strUserName; SoundManager.Instance.PlayButtonTapSound(); // Use code below to test the tournament // --------------------------------------- if (inputFieldIPAddress.gameObject.activeSelf) { PlayerPrefs.SetString("LocalC_IP", inputFieldIPAddress.text); NetworkManager.localIPAddressC = inputFieldIPAddress.text; } // string tableNumber = "1"; // if (strUserName.Equals ("Chirag")) // tableNumber = "10"; // else if (strUserName.Equals ("Ravi")) // tableNumber = "2"; // else if (strUserName.Equals ("Plr1")) // tableNumber = "1"; // else if (strUserName.Equals ("Plr2")) // tableNumber = "4"; // else if (strUserName.Equals ("Plr3")) // tableNumber = "5"; // else if (strUserName.Equals ("Plr4")) // tableNumber = "6"; // else if (strUserName.Equals ("Plr5")) // tableNumber = "7"; // else if (strUserName.Equals ("Plr6")) // tableNumber = "8"; // else if (strUserName.Equals ("Plr7")) // tableNumber = "9"; // else if (strUserName.Equals ("Plr9")) // tableNumber = "10"; // // if (strUserName.Equals ("Plr2")) // tableNumber = "1"; // else if (strUserName.Equals ("Plr7")) // tableNumber = "2"; // // //// Uncomment below two lines for testing SnG Tournament //// tableNumber = "1"; //// getDataFormPHP ("{\"GameRoomID\":3,\"user_name\":\"" + strUserName + "\",\"game_id\":3,\"real_money\":\"0\",\"play_money\":\"46978\",\"buyin\":\"1000.00\",\"stake\":\"640.00\\/1280.00\",\"speed\":\"regular\",\"game_type\":\"play money\",\"max_player\":10,\"GameType\":\"WA_SNG\",\"isLimit\":\"0\",\"TableNumber\":\"" + tableNumber + "\"}"); // // //// For testing of Regular tournament // string _gameID = inputFieldGameID.text; // string _tableNumber = inputFieldTableNumber.text; // tableNumber = _tableNumber; // getDataFormPHP ("{\"GameRoomID\":" + _gameID + ",\"user_name\":\"" + strUserName + "\",\"game_id\":" + _gameID + ",\"real_money\":\"0\",\"play_money\":\"46978\",\"buyin\":\"1000.00\",\"stake\":\"640.00\\/1280.00\",\"speed\":\"regular\",\"game_type\":\"play money\",\"max_player\":10,\"GameType\":\"WA_REGULAR\",\"isLimit\":\"0\",\"TableNumber\":\"" + tableNumber + "\"}"); // Start (); // return; // --------------------------------------- // For mobile / EXE version if (Application.platform != RuntimePlatform.WebGLPlayer || UIManager.Instance.isAffiliate) { if (IsLoginDetailValid()) { APIManager.GetInstance().SendLoginInfo(strUserName, strPassword); } return; } // End code // TABLE // getDataFormPHP ("{\"GameRoomID\":" + 0 + ",\"user_name\":\"" + strUserName + "\",\"game_id\":" + 0 + ",\"real_money\":\"0\",\"play_money\":\"46978\",\"buyin\":\"1000.00\",\"stake\":\"640.00\\/1280.00\",\"speed\":\"regular\",\"game_type\":\"play money\",\"max_player\":3,\"GameType\":\"TABLE\",\"isLimit\":\"0\",\"TableNumber\":\"" + 1 + "\"}"); // Start (); // return; if (strPassword.Equals("")) { txtError.text = "<color=red>Password should not be empty.</color>"; } else if (!strUserName.Equals("")) { txtError.text = "<color=green>Connecting with server.</color>"; // StartCoroutine(SendGameStartInfoToServer(strUserName,strPassword)); UIManager.Instance.DisplayLoader(); Debug.Log(Constants.REMOVE_BEFORE_LIVE); NetworkManager.Instance.InitializeServer(UIManager.Instance.gameType); NetworkManager.Instance.Connect(strUserName); // NetworkManager.Instance.Connect (NetworkManager.Instance.playerID); } else { txtError.text = "<color=red>Username should not be empty.</color>"; } }