public static LocalFileHandler AddLocalFiles(this RServer server) { var handler = new LocalFileHandler(); server.AddHandler(handler); return(handler); }
public static void SwitchStaging() { LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); LocalFileHandler.SetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER, (int)SeverMachineType.STG); LocalFileHandler.Flush(); Debug.Log("サーバーをステージング環境マシンに設定しました"); }
public static void SwitchProduction() { LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); LocalFileHandler.SetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER, (int)SeverMachineType.PRODUCTION); LocalFileHandler.Flush(); Debug.Log("サーバーを本番環境マシンに設定しました"); }
/// <summary> /// News the message. /// </summary> /// <returns>The message.</returns> public void NewMessage() { string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); LocalFileHandler.SetString(LocalFileConstants.FROM_MYPAGE_SCENE, CommonConstants.MYPAGE_SCENE); LocalFileHandler.Flush(); SceneHandleManager.NextSceneRedirect(CommonConstants.MESSAGE_SCENE); }
public static void SwitchLocal() { string s = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); LocalFileHandler.SetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER, (int)SeverMachineType.LOCAL); LocalFileHandler.Flush(); Debug.Log("サーバーをローカルマシンに設定しました"); }
/// <summary> /// Movies the popup dont show button. /// この警告を2度と表示しない /// </summary> public void MoviePopupDontShowButton() { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); LocalFileHandler.SetString(LocalFileConstants.MOVIE_POPUP_SHOW, "1"); LocalFileHandler.Flush(); PanelPopupCloseAnimate(_popupMovie); }
/// <summary> /// Popups the close. /// レビューをしない時の処理。 /// </summary> /// <returns>The close.</returns> public void PopupClose() { //if (_isNotShowToggle.isOn == true) //{ //ここでアプリレビューキーを保存 LocalFileHandler.SetString(LocalFileConstants.APPLI_REVIEW_POPUP_SHOW, "1"); LocalFileHandler.Flush(); //} StartCoroutine(PopupCloseCoroutine()); }
/// <summary> /// Init this instance. /// </summary> public void Init(string url, string text) { _storeUrl = url; _popupText.text = text; string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; //ローカルファイルに保存用初期化。 LocalFileHandler.Init(commonFileName); }
public async Task Run() { // Create client alias core object + specify which environment you want to use var acmeClient = new AcmeClient(EnviromentUri); // Create new Account var account = await acmeClient.CreateNewAccountAsync(ContactEmail); // Create new Order var order = await acmeClient.NewOrderAsync(account, Identifiers); // Create DNS challenge (DNS is required for wildcard certificate) var challenges = await acmeClient.GetDnsChallenges(account, order); // Creation of all DNS entries foreach (var challenge in challenges) { var dnsKey = challenge.VerificationKey; var dnsText = challenge.VerificationValue; // value can be e.g.: eBAdFvukOz4Qq8nIVFPmNrMKPNlO8D1cr9bl8VFFsJM // Create DNS TXT record e.g.: // key: _acme-challenge.your.domain.com // value: eBAdFvukOz4Qq8nIVFPmNrMKPNlO8D1cr9bl8VFFsJM } // Validation of all DNS entries foreach (var challenge in challenges) { await acmeClient.ValidateChallengeAsync(account, challenge); // Verify status of challenge var freshChallenge = await acmeClient.GetChallengeAsync(account, challenge); if (freshChallenge.Status == ChallengeStatus.Invalid) { throw new Exception("Something is wrong with your DNS TXT record(s)!"); } } // Generate certificate var certificate = await acmeClient.GenerateCertificateAsync(account, order, "Suppo.biz"); // Save files locally var password = "******"; await LocalFileHandler.WriteAsync("Suppo.biz.pfx", certificate.GeneratePfx(password)); await LocalFileHandler.WriteAsync("Suppo.biz.crt", certificate.GenerateCrt(password)); await LocalFileHandler.WriteAsync("Suppo.biz.crt.pem", certificate.GenerateCrtPem(password)); await LocalFileHandler.WriteAsync("Suppo.biz.key.pem", certificate.GenerateKeyPem()); Assert.Pass(); }
/// <summary> /// Ienums the set data. /// </summary> /// <returns>The set data.</returns> private IEnumerator IenumSetData() { string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } SearchEventManager.Instance._order = _orderAPIThrow; SearchEventManager.Instance._sex = _sexAPIThrow; SearchEventManager.Instance._ageTo = _ageHighAPIThrow; SearchEventManager.Instance._ageFrom = _ageLowAPIThrow; SearchEventManager.Instance._heightTo = _heightToAPIThrow; SearchEventManager.Instance._heightFrom = _heightFromAPIThrow; SearchEventManager.Instance._bodyType = _bodyTypeAPIThrow; SearchEventManager.Instance._isImage = _isImageAPIThrow; SearchEventManager.Instance._radius = _radiusAPIThrow; SearchEventManager.Instance._keyword = _keyword.text; SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; Debug.Log(condition._isImage + " 画像の有無で検索。 "); Debug.Log(condition._radius + " 距離で検索 "); Debug.Log(condition._keyword + " キ=ワードで検索 "); LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); Debug.Log(" 検索条件を保存。 "); }
/// <summary> /// Boards the detail to chat open. /// </summary> /// <param name="animObj">Animation object.</param> public void BoardDetailToChatOpen(GameObject animObj) { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (GetUserApi._httpCatchData.result.review == "false") { //動画広告が何もない場合はアイモバイル、インターステシャルを表示。 if (Maio.CanShow(CommonConstants.MAIO_ZONE_ID_1) == false) { if (AppStartLoadBalanceManager.m_NendAdFullBoard != null) { AppStartLoadBalanceManager.m_NendAdFullBoard.Load(); AppStartLoadBalanceManager.m_NendAdFullBoard.Show(); } BoardDetailToChatMethod(""); } else { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); string isMovieFlag = LocalFileHandler.GetString(LocalFileConstants.MOVIE_POPUP_SHOW); if (string.IsNullOrEmpty(isMovieFlag) == true) { AppStartLoadBalanceManager._whereFromAds = MaioMovieSdkEvent.WhereFromAds.BoardDetailChatOpen; PanelPopupAnimate(_popupMovie); return; } else { AppStartLoadBalanceManager._whereFromAds = MaioMovieSdkEvent.WhereFromAds.BoardDetailChatOpen; //問答無用で動画広告を表示 Maio.Show(CommonConstants.MAIO_ZONE_ID_1); return; } } } else { //レビューの場合「true」の場合は、強制的に BoardDetailToChatMethod(""); //chatを開く。 } #elif UNITY_EDITOR BoardDetailToChatMethod(""); #endif }
/// <summary> /// Sets the data. /// マスターデータから動的に値が変更する所用 /// </summary> public void SetData() { //StartCoroutine(IenumSetData ()); string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); SearchEventManager.Instance._order = _orderAPIThrow; SearchEventManager.Instance._sex = _sexAPIThrow; SearchEventManager.Instance._ageTo = _ageHighAPIThrow; SearchEventManager.Instance._ageFrom = _ageLowAPIThrow; SearchEventManager.Instance._heightTo = _heightToAPIThrow; SearchEventManager.Instance._heightFrom = _heightFromAPIThrow; SearchEventManager.Instance._bodyType = _bodyTypeAPIThrow; SearchEventManager.Instance._isImage = _isImageAPIThrow; SearchEventManager.Instance._radius = _radiusAPIThrow; SearchEventManager.Instance._keyword = _keyword.text; SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; Debug.Log(condition._isImage + " 画像の有無で検索。 "); Debug.Log(condition._radius + " 距離で検索 "); Debug.Log(condition._keyword + " キ=ワードで検索 "); LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { _loadingOverlay.SetActive(true); // アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで //static変数のデータが消え去ってしまうみたいなのでリカバー if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true) { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } //ここでユーザーキーを取得 AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY); #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif } //ユーザーデータ取得。 new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR //有料会員か? if (CommonConstants.IS_PREMIUM == false) { //_nendAdBanner.Show (); } else { _nendAdBanner.Pause(); _nendAdBanner.Hide(); Destroy(_nendAdBanner.gameObject); } #endif } //性別が取得出来ていない場合の処理。 if (GetUserApi._httpCatchData.result.user.sex_cd == "0") { PanelGenderSelectCommon.Instance.Init(); //性別選択のUIを表示。 _loadingOverlay.SetActive(false); yield break; } AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd; ///メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///ユーザーのステータスをチェックする処理。 AppliEventController.Instance.UserStatusProblem(); ///強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///アプリポップアップレビューの立ち上げ処理。 AppliEventController.Instance.AppliReview(); //マスターデータの取得。 if (InitDataApi._httpCatchData == null) { new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } } //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。 if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 AppStartLoadBalanceManager._isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 AppStartLoadBalanceManager._isBaseProfile = false; } //こっからプッシュ飛んできた時の処理。 if (NotificationRecieveManager._isCatch == true) { _isFromPush = true; switch (AppStartLoadBalanceManager._toScenePanel) { case CommonConstants.VIEW_MESSAGE_DETAIL: if (_panelChat != null) { _panelChat.gameObject.name = AppStartLoadBalanceManager._toPushCatchUserId; TapThisMessage(_panelChat.gameObject); } NotificationRecieveManager._isCatch = false; _loadingOverlay.SetActive(false); yield break; break; case CommonConstants.VIEW_PROFILE: HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, ChatBackButton); ProfilePanel.Instance.Init(AppStartLoadBalanceManager._toPushCatchUserId); PanelProfileAnimate(_panelProfile.gameObject); NotificationRecieveManager._isCatch = false; _loadingOverlay.SetActive(false); yield break; break; //お知らせ詳細用プッシュが飛んできた場合。 case CommonConstants.VIEW_INFO_DETAIL: HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, InformationBackButton); _backSwipe.EventMessageTarget = _informationPanel.gameObject; if (AppStartLoadBalanceManager._toPushCatchUserId != null) { string id = AppStartLoadBalanceManager._toPushCatchUserId; } if (_informationPanel != null) { if (_informationPanel.GetComponent <uTweenPosition> ().from.x == 0) { _informationPanel.GetComponent <uTweenPosition> ().from = _informationPanel.GetComponent <uTweenPosition> ().to; } _informationPanel.GetComponent <uTweenPosition> ().to = Vector3.zero; _informationPanel.GetComponent <uTweenPosition> ().ResetToBeginning(); _informationPanel.GetComponent <uTweenPosition> ().enabled = true; // 初期化処理 _informationPanelScroll.GetComponent <PanelInformationInfiniteScroll> ().Init(AppStartLoadBalanceManager._toPushCatchUserId); } yield break; break; } //キャンペーンからユーザーのプロフィールに行く特 } else if (CampaignWebView._isFromCampaign == true) { HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, ChatBackButton); ProfilePanel.Instance.Init(CampaignWebView._toUser); PanelProfileAnimate(_panelProfile.gameObject); _loadingOverlay.SetActive(false); CampaignWebView._isFromCampaign = false; yield break; } LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); string fromScene = LocalFileHandler.GetString(LocalFileConstants.FROM_MYPAGE_SCENE); if (string.IsNullOrEmpty(fromScene) == false && fromScene == CommonConstants.MYPAGE_SCENE) { _backSwipe.EventMessageTarget = _panelEazyNotify.gameObject; HeaderPanel.Instance.BackButtonSwitch(true, BackMypageScene); } if (Helper.LocalFileHandler.GetBool(LocalFileConstants.TUTORIAL_MESSAGE_KEY) == false) { _panelTutorialMessge.SetActive(true); } else { _panelTutorialMessge.SetActive(false); } HeaderTab1(); //新着メッセージ未既読のAPI取得する new GetUnreadMessageCountApi(); while (GetUnreadMessageCountApi._success == false) { yield return(GetUnreadMessageCountApi._success == true); } AppStartLoadBalanceManager._msgBadge = GetUnreadMessageCountApi._httpCatchData.result.count; _loadingOverlay.SetActive(false); yield break; }
IEnumerator InitFromCondition() { _loadingOverlay.SetActive(true); string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } SearchEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY); //条件検索のデータがローカルファイルに残っている場合。 if (SearchCondition != null) { SearchEventManager.Instance._lat = SearchCondition._lat; SearchEventManager.Instance._lng = SearchCondition._lng; SearchEventManager.Instance._order = SearchCondition._order; SearchEventManager.Instance._sex = SearchCondition._sex; SearchEventManager.Instance._ageFrom = SearchCondition._ageFrom; SearchEventManager.Instance._ageTo = SearchCondition._ageTo; SearchEventManager.Instance._heightFrom = SearchCondition._heightFrom; SearchEventManager.Instance._heightTo = SearchCondition._heightTo; SearchEventManager.Instance._bodyType = SearchCondition._bodyType; SearchEventManager.Instance._isImage = SearchCondition._isImage; SearchEventManager.Instance._radius = SearchCondition._radius; SearchEventManager.Instance._keyword = SearchCondition._keyword; } // 通信レスポンス待ってから UserListApi._success = false; new UserListApi( // todo とりあえず試すため全部の設定 あとできちんと値を設定して絞り込むようにしてください AppStartLoadBalanceManager._userKey, EventManager.SearchEventManager.Instance._lat, EventManager.SearchEventManager.Instance._lng, EventManager.SearchEventManager.Instance._order, EventManager.SearchEventManager.Instance._sex, EventManager.SearchEventManager.Instance._ageFrom, EventManager.SearchEventManager.Instance._ageTo, EventManager.SearchEventManager.Instance._heightFrom, EventManager.SearchEventManager.Instance._heightTo, EventManager.SearchEventManager.Instance._bodyType, EventManager.SearchEventManager.Instance._isImage, EventManager.SearchEventManager.Instance._radius, EventManager.SearchEventManager.Instance._keyword, "1" ); while (UserListApi._success == false) { yield return(UserListApi._success == true); } SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); if (UserListApi._httpCatchData.result.users != null) { if (UserListApi._httpCatchData.result.users.Count > 0) { _InfiniteLimitScroll.GetComponent <SearchListSmallImageInfiniteLimitScroll> ().m_currentItemNo = 0; _InfiniteLimitScroll.GetComponent <SearchListSmallImageInfiniteLimitScroll> ().Init(); EventManager.SearchEventManager.Instance._nowShowPage = "1"; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.9995f; if (UserListApi._httpCatchData.result.users.Count >= 20) { _nextButton.SetActive(true); } } else { // リストのないページカウントになってるので 一旦通信とリストの更新をさせないようにする _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); PopupPanel.Instance.PopMessageInsert( LocalMsgConst.LIST_SEARCH_ZERO, LocalMsgConst.OK, PanelListZeroFinishClose ); PanelPopupAnimate(GameObject.FindGameObjectWithTag(CommonConstants.POPUP_BASIC_TAG)); } } else { _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); } _loadingOverlay.SetActive(false); }
/// <summary> /// Inits the coroutine. /// </summary> /// <returns>The coroutine.</returns> private IEnumerator InitCoroutine() { string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; Helper.LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } SearchEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <SearchEventManager.SearchCondition> (LocalFileConstants.SEARCH_CONDITION_KEY); //ここからマスターデータを当てるDropdownに当てる処理 - ここから if (InitDataApi._httpCatchData == null) { new InitDataApi(); while (InitDataApi._success == true) { yield return(InitDataApi._success == false); } } //表示順 - 選択 ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _orderList = new List <string> (); //ローカルにデータが存在する場合。 _orderList.Add("指定しない"); foreach (var d in InitDataApi._httpCatchData.result.user_sort) { _orderList.Add(d.name); } _order.AddOptions(_orderList); if (string.IsNullOrEmpty(SearchCondition._order) == false) { _order.value = int.Parse(CommonModelHandle.GetByIdBaseData(SearchCondition._order, CurrentProfSettingStateType.UserSort).id); } //表示順 - 選択 ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //性別 - 選択 ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _genderList = new List <string> (); //ローカルにデータが存在する場合。 _genderList.Add("指定しない"); foreach (var d in InitDataApi._httpCatchData.result.sex_cd) { _genderList.Add(d.name); } _gender.AddOptions(_genderList); if (string.IsNullOrEmpty(SearchCondition._sex) == false) { if (CommonModelHandle.GetByIdBaseData(SearchCondition._sex, CurrentProfSettingStateType.Gender).name == "男性") { _gender.value = 1; } else if (CommonModelHandle.GetByIdBaseData(SearchCondition._sex, CurrentProfSettingStateType.Gender).name == "女性") { _gender.value = 2; } } else { _gender.value = 0; } //性別 - 選択 ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //体型 - 選択 ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _bodyTypeList = new List <string> (); _bodyTypeList.Add("指定しない"); string gender = "1"; if (AppStartLoadBalanceManager._gender == ((int)GenderType.Male).ToString()) { gender = ((int)GenderType.Male).ToString(); } else if (AppStartLoadBalanceManager._gender == ((int)GenderType.FeMale).ToString()) { gender = ((int)GenderType.FeMale).ToString(); } var bodyType = CommonModelHandle.GetNameMaster(gender, CurrentProfSettingStateType.BodyType); foreach (var d in bodyType) { _bodyTypeList.Add(d.name); } _bodyType.AddOptions(_bodyTypeList); if (string.IsNullOrEmpty(SearchCondition._bodyType) == false) { _bodyType.value = DropdownValueCalc(SearchCondition._bodyType, bodyType); } else { _bodyType.value = 0; } //体型 - 選択 ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //年齢 - 何歳まで ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _ageFromList = new List <string> (); _ageFromList.Add("18"); for (int i = 18; i <= 100; i++) { _ageFromList.Add(i.ToString()); } _ageFrom.AddOptions(_ageFromList); _tmpCount = 0; if (string.IsNullOrEmpty(SearchCondition._ageFrom) == false) { foreach (var afl in _ageFromList) { if (afl == SearchCondition._ageFrom) { _ageFrom.value = _tmpCount; break; } _tmpCount++; } } else { _ageFrom.value = 0; } //年齢 - 何歳まで ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //年齢 - 何歳まで ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _ageToList = new List <string> (); _ageToList.Add("100"); for (int i = 18; i <= 100; i++) { _ageToList.Add(i.ToString()); } _ageTo.AddOptions(_ageToList); _tmpCount = 0; if (string.IsNullOrEmpty(SearchCondition._ageTo) == false) { foreach (var atl in _ageToList) { if (atl == SearchCondition._ageTo) { _ageTo.value = _tmpCount; break; } _tmpCount++; } } else { _ageTo.value = 0; } //年齢 - 何歳まで ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //身長から - ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _heightFromList = new List <string> (); _heightFromList.Add("指定なし"); for (int i = 110; i <= 220; i++) { _heightFromList.Add(i.ToString()); } _heightFrom.AddOptions(_heightFromList); _tmpCount = 0; if (string.IsNullOrEmpty(SearchCondition._heightFrom) == false) { foreach (var hfl in _heightFromList) { if (hfl == SearchCondition._heightFrom) { _heightFrom.value = _tmpCount; break; } _tmpCount++; } } else { _heightFrom.value = 0; } //身長から - ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //身長まで - ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _heightToList = new List <string> (); _heightToList.Add("指定なし"); for (int i = 110; i <= 220; i++) { _heightToList.Add(i.ToString()); } _heightTo.AddOptions(_heightToList); _tmpCount = 0; if (string.IsNullOrEmpty(SearchCondition._heightTo) == false) { foreach (var htl in _heightToList) { if (htl == SearchCondition._heightTo) { _heightTo.value = _tmpCount; break; } _tmpCount++; } } else { _heightTo.value = 0; } //身長まで - ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //距離 - ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _radiusList = new List <string> (); _radiusList.Add("指定しない"); foreach (var d in InitDataApi._httpCatchData.result.radius) { _radiusList.Add(d.name); } _radius.AddOptions(_radiusList); _tmpCount = 0; if (string.IsNullOrEmpty(SearchCondition._radius) == false) { foreach (var r in _radiusList) { if (r == CommonModelHandle.GetByIdBaseData(SearchCondition._radius, CurrentProfSettingStateType.Radius).name) { _radius.value = _tmpCount; break; } _tmpCount++; } } else { _radius.value = 0; } //距離 - ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //画像 - ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ if (string.IsNullOrEmpty(SearchCondition._isImage) == false) { _isImageListObject.value = int.Parse(SearchCondition._isImage); } //画像 - ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //キーワードを当てる処理 - ここから ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ if (string.IsNullOrEmpty(SearchCondition._keyword) == false) { _keyword.text = SearchCondition._keyword; } //キーワードを当てる処理 - ここまで ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ //ここまでマスターデータを当てるDropdownに当てる処理 - ここまで }
/// <summary> /// Naitives the init coroutine. /// </summary> /// <returns>The init coroutine.</returns> private IEnumerator NaitiveInitCoroutine() { string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); /// ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } /// 検索条件をローカルに保存しているので、そこから引いてくる。 SearchEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <SearchEventManager.SearchCondition> (LocalFileConstants.SEARCH_CONDITION_KEY); /// ローカルに「距離順, 最終ログイン順,登録日が新しい順」のデータが保存されている場合の処理。 if (string.IsNullOrEmpty(SearchCondition._order) == false) { _orderNative.transform.GetChild(0).gameObject.SetActive(false); _orderNative.transform.GetChild(1).gameObject.SetActive(true); var oderText = CommonModelHandle.GetByIdBaseData(SearchCondition._order, CurrentProfSettingStateType.UserSort); if (oderText != null) { _orderNative.transform.GetChild(1).GetComponent <Text> ().text = oderText.name; _orderAPIThrow = oderText.id; } else { _orderNative.transform.GetChild(1).GetComponent <Text> ().text = "距離順が近い"; _orderAPIThrow = "1"; } } else { _orderNative.transform.GetChild(0).gameObject.SetActive(false); _orderNative.transform.GetChild(1).gameObject.SetActive(true); _orderNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _orderAPIThrow = "1"; } /// 性別の条件の場合の処理 if (string.IsNullOrEmpty(SearchCondition._sex) == false) { _genderNative.transform.GetChild(0).gameObject.SetActive(false); _genderNative.transform.GetChild(1).gameObject.SetActive(true); var genderText = CommonModelHandle.GetByIdBaseData(SearchCondition._sex, CurrentProfSettingStateType.Gender); if (genderText != null) { _genderNative.transform.GetChild(1).GetComponent <Text> ().text = genderText.name; _sexAPIThrow = genderText.id; } else { _genderNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _sexAPIThrow = ""; } } else { _genderNative.transform.GetChild(0).gameObject.SetActive(false); _genderNative.transform.GetChild(1).gameObject.SetActive(true); _genderNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _sexAPIThrow = ""; } /// 年齢のまでの場合の処理。 if (string.IsNullOrEmpty(SearchCondition._ageTo) == false) { _ageToNative.transform.GetChild(0).gameObject.SetActive(false); _ageToNative.transform.GetChild(1).gameObject.SetActive(true); _ageToNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._ageTo; _ageHighAPIThrow = SearchCondition._ageTo; } else { _ageToNative.transform.GetChild(0).gameObject.SetActive(false); _ageToNative.transform.GetChild(1).gameObject.SetActive(true); _ageToNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _ageHighAPIThrow = ""; } /// 年齢の〜からの場合の処理 if (string.IsNullOrEmpty(SearchCondition._ageFrom) == false) { _ageFromNative.transform.GetChild(0).gameObject.SetActive(false); _ageFromNative.transform.GetChild(1).gameObject.SetActive(true); _ageFromNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._ageFrom; _ageLowAPIThrow = SearchCondition._ageFrom; } else { _ageFromNative.transform.GetChild(0).gameObject.SetActive(false); _ageFromNative.transform.GetChild(1).gameObject.SetActive(true); _ageFromNative.transform.GetChild(1).GetComponent <Text> ().text = ""; _ageLowAPIThrow = ""; } /// 身長のまでの場合の処理。 if (string.IsNullOrEmpty(SearchCondition._heightTo) == false) { _heightToNative.transform.GetChild(0).gameObject.SetActive(false); _heightToNative.transform.GetChild(1).gameObject.SetActive(true); _heightToNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._heightTo; _heightToAPIThrow = SearchCondition._heightTo; } else { _heightToNative.transform.GetChild(0).gameObject.SetActive(false); _heightToNative.transform.GetChild(1).gameObject.SetActive(true); _heightToNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _heightToAPIThrow = ""; } /// 身長の〜からの場合の処理。 if (string.IsNullOrEmpty(SearchCondition._heightFrom) == false) { _heightFromNative.transform.GetChild(0).gameObject.SetActive(false); _heightFromNative.transform.GetChild(1).gameObject.SetActive(true); _heightFromNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._heightFrom; _heightFromAPIThrow = SearchCondition._heightFrom; } else { _heightFromNative.transform.GetChild(0).gameObject.SetActive(false); _heightFromNative.transform.GetChild(1).gameObject.SetActive(true); _heightFromNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _heightFromAPIThrow = ""; } /// 体型の条件の場合の初期化処理 if (string.IsNullOrEmpty(SearchCondition._bodyType) == false) { _bodyTypeNative.transform.GetChild(0).gameObject.SetActive(false); _bodyTypeNative.transform.GetChild(1).gameObject.SetActive(true); _bodyTypeNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._bodyType; _bodyTypeAPIThrow = SearchCondition._bodyType; } else { _bodyTypeNative.transform.GetChild(0).gameObject.SetActive(false); _bodyTypeNative.transform.GetChild(1).gameObject.SetActive(true); _bodyTypeNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _bodyTypeAPIThrow = ""; } ///// 画像あり、なしの条件の場合の処理 if (string.IsNullOrEmpty(SearchCondition._isImage) == false) { _isImageNative.transform.GetChild(0).gameObject.SetActive(false); _isImageNative.transform.GetChild(1).gameObject.SetActive(true); if (SearchCondition._isImage == "0") { _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "画像なし"; } else if (SearchCondition._isImage == "1") { _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "画像あり"; } else { _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; } _isImageAPIThrow = SearchCondition._isImage; } else { _isImageNative.transform.GetChild(0).gameObject.SetActive(false); _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; _isImageAPIThrow = ""; } ///// 距離の条件の場合の初期化処理。 if (string.IsNullOrEmpty(SearchCondition._radius) == false) { _radiusNative.transform.GetChild(0).gameObject.SetActive(false); _radiusNative.transform.GetChild(1).gameObject.SetActive(true); var radiusText = CommonModelHandle.GetByIdBaseData(SearchCondition._radius, CurrentProfSettingStateType.Radius); if (radiusText != null) { _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = radiusText.name; } else { _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; } } else { _radiusNative.transform.GetChild(0).gameObject.SetActive(false); _radiusNative.transform.GetChild(1).gameObject.SetActive(true); _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; } /// キーワード条件の場合の初期化処理 if (string.IsNullOrEmpty(SearchCondition._keyword) == false) { _keyword.text = SearchCondition._keyword; } yield break; }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { _loadingOverlay.SetActive(true); // アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで //static変数のデータが消え去ってしまうみたいなのでリカバー if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true) { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } //ここでユーザーキーを取得。 AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY); #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif } //ユーザーデータの取得。 new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR //有料会員か? if (CommonConstants.IS_PREMIUM == false) { //_nendAdBanner.Show (); } else { _nendAdBanner.Pause(); _nendAdBanner.Hide(); Destroy(_nendAdBanner.gameObject); } #endif } //審査レビューじゃない場合のみ広告表示。 if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (CommonConstants.IS_PREMIUM == false) { // 広告の取得、表示処理 if (CommonConstants.IS_AD_TEST == true) { //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); } else { //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); } } else { IMobileSdkAdsUnityPlugin.stop(); } #endif } //性別が取得出来ていない場合の処理。 if (GetUserApi._httpCatchData.result.user.sex_cd == "0") { PanelGenderSelectCommon.Instance.Init(); //性別選択のUIを表示。 _loadingOverlay.SetActive(false); yield break; } AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd; ///メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///ユーザーのステータスをチェックする処理。 AppliEventController.Instance.UserStatusProblem(); ///強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///アプリポップアップレビューの立ち上げ処理。 AppliEventController.Instance.AppliReview(); //マスターデータの取得 if (InitDataApi._httpCatchData == null) { new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } } //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。 if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 AppStartLoadBalanceManager._isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 AppStartLoadBalanceManager._isBaseProfile = false; } LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); if (LocalFileHandler.GetBool(LocalFileConstants.TUTORIAL_MATCHING_KEY) == false) { _tutorial.SetActive(true); } else { _tutorial.SetActive(false); } _isStart = true; _loadingOverlay.SetActive(false); yield break; }
IEnumerator InitFromCondition() { _loadingOverlay.SetActive(true); string lat = ""; string lng = ""; #if !UNITY_EDITOR if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.lat) == false) { lat = GetUserApi._httpCatchData.result.user.lat; } if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.lng) == false) { lng = GetUserApi._httpCatchData.result.user.lng; } #endif // 通信レスポンス待ってから new BoardListApi ( AppStartLoadBalanceManager._userKey, EventManager.BulletinBoardEventManager.Instance._CategoryID, lat, lng, EventManager.BulletinBoardEventManager.Instance._sex, EventManager.BulletinBoardEventManager.Instance._ageFrom, EventManager.BulletinBoardEventManager.Instance._ageTo, EventManager.BulletinBoardEventManager.Instance._heightFrom, EventManager.BulletinBoardEventManager.Instance._heightTo, EventManager.BulletinBoardEventManager.Instance._bodyType, EventManager.BulletinBoardEventManager.Instance._isImage, EventManager.BulletinBoardEventManager.Instance._radius, EventManager.BulletinBoardEventManager.Instance._keyword, "1" ); while (BoardListApi._success == false) { yield return(BoardListApi._success == true); } string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); BulletinBoardEventManager.SearchCondition condition = new BulletinBoardEventManager.SearchCondition(); condition._lat = BulletinBoardEventManager.Instance._lat; condition._lng = BulletinBoardEventManager.Instance._lng; condition._CategoryID = BulletinBoardEventManager.Instance._CategoryID; condition._sex = BulletinBoardEventManager.Instance._sex; condition._ageFrom = BulletinBoardEventManager.Instance._ageFrom; condition._ageTo = BulletinBoardEventManager.Instance._ageTo; condition._heightFrom = BulletinBoardEventManager.Instance._heightFrom; condition._heightTo = BulletinBoardEventManager.Instance._heightTo; condition._bodyType = BulletinBoardEventManager.Instance._bodyType; condition._isImage = BulletinBoardEventManager.Instance._isImage; condition._radius = BulletinBoardEventManager.Instance._radius; condition._keyword = BulletinBoardEventManager.Instance._keyword; LocalFileHandler.Save <BulletinBoardEventManager.SearchCondition>(LocalFileConstants.BBS_SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); if (BoardListApi._httpCatchData.result.boards != null) { if (BoardListApi._httpCatchData.result.boards.Count > 0) { // 条件検索の場合は無条件に初期化 _boardListInfiniteLimitScroll.GetComponent <BoardListInfiniteLimitScroll> ().m_currentItemNo = 0; _boardListInfiniteLimitScroll.GetComponent <BoardListInfiniteLimitScroll> ().Init(); _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; EventManager.BulletinBoardEventManager.Instance._nowShowPage = "1"; } else { // リストのないページカウントになってるので 一旦通信とリストの更新をさせないようにする _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); PopupPanel.Instance.PopMessageInsert( LocalMsgConst.LIST_SEARCH_ZERO, LocalMsgConst.OK, BoardPanelListZeroFinishClose ); PanelPopupAnimate(GameObject.FindGameObjectWithTag(CommonConstants.POPUP_BASIC_TAG)); } } else { _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); PopupPanel.Instance.PopMessageInsert( LocalMsgConst.LIST_SEARCH_ZERO, LocalMsgConst.OK, BoardPanelListZeroFinishClose ); } _loadingOverlay.SetActive(false); }
public async Task Run() { // Create client alias core object + specify which environment you want to use var acmeClient = new AcmeClient(EnviromentUri); // Create new Account var account = await acmeClient.CreateNewAccountAsync(ContactEmail); // Create new Order var order = await acmeClient.NewOrderAsync(account, Identifiers); // Create DNS challenge (DNS is required for wildcard certificate) var challenges = await acmeClient.GetDnsChallenges(account, order); try { // Creation of all DNS entries foreach (var challenge in challenges) { var dnsKey = challenge.VerificationKey; var dnsText = challenge.VerificationValue; await AddTxtEntry(challenge.DnsKey, dnsText); // value can be e.g.: eBAdFvukOz4Qq8nIVFPmNrMKPNlO8D1cr9bl8VFFsJM // Create DNS TXT record e.g.: // key: _acme-challenge.your.domain.com // value: eBAdFvukOz4Qq8nIVFPmNrMKPNlO8D1cr9bl8VFFsJM } await Task.Delay(60000); // Validation of all DNS entries foreach (var challenge in challenges) { await acmeClient.ValidateChallengeAsync(account, challenge); Challenge freshChallenge; do { // Verify status of challenge freshChallenge = await acmeClient.GetChallengeAsync(account, challenge); if (freshChallenge.Status == ChallengeStatus.Invalid) { throw new Exception("Something is wrong with your DNS TXT record(s)!"); } if (freshChallenge.Status != ChallengeStatus.Valid) { await Task.Delay(5000); } } while (freshChallenge.Status == ChallengeStatus.Valid); } } finally { foreach (var challenge in challenges) { await ClearTxtEntries(challenge.DnsKey); } } var commonName = Identifiers.FirstOrDefault(i => !i.StartsWith("*")); // Generate certificate var certificate = await acmeClient.GenerateCertificateAsync(account, order, commonName); // Save files locally var password = "******"; await LocalFileHandler.WriteAsync($"{commonName}.pfx", certificate.GeneratePfx(password)); await LocalFileHandler.WriteAsync($"{commonName}.crt", certificate.GenerateCrt(password)); await LocalFileHandler.WriteAsync($"{commonName}.crt.pem", certificate.GenerateCrtPem(password)); await LocalFileHandler.WriteAsync($"{commonName}.key.pem", certificate.GenerateKeyPem()); Assert.Pass(); }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { _tmpText.text = LocalMsgConst.TITLE_SEARCH; _loadingOverLay.SetActive(true); // アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで //static変数のデータが消え去ってしまうみたいなのでリカバー if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true) { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } //ここでユーザーキーを取得 AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY); #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif } //ユーザーデータ取得。 new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR //有料会員か? if (CommonConstants.IS_PREMIUM == false) { //_nendAdBanner.Show (); } else { _nendAdBanner.Pause(); _nendAdBanner.Hide(); Destroy(_nendAdBanner.gameObject); } #endif } //性別が取得出来ていない場合の処理。 if (GetUserApi._httpCatchData.result.user.sex_cd == "0") { PanelGenderSelectCommon.Instance.Init(); //性別選択のUIを表示。 _loadingOverLay.SetActive(false); yield break; } AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd; ///メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadingOverLay.SetActive(false); yield break; } ///強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadingOverLay.SetActive(false); yield break; } ///アプリポップアップレビューの立ち上げ処理。 AppliEventController.Instance.AppliReview(); //マスターデータ取得。 if (InitDataApi._httpCatchData == null) { new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } } //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。 if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 AppStartLoadBalanceManager._isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 AppStartLoadBalanceManager._isBaseProfile = false; } HeaderPanel.Instance.UiButtonSwitch(true, PictLayoutChangeEvent); #if UNITY_EDITOR yield return(StartCoroutine(CallInitApi())); #endif SearchListButton(); _statePanel = StatePanel.Notify; _loadingOverLay.SetActive(false); yield break; }
IEnumerator Init(int pageChange) { string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } _loadingOverlay.SetActive(true); SearchEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY); //条件検索のデータがローカルファイルに残っている場合。 if (SearchCondition != null) { SearchEventManager.Instance._lat = SearchCondition._lat; SearchEventManager.Instance._lng = SearchCondition._lng; SearchEventManager.Instance._order = SearchCondition._order; SearchEventManager.Instance._sex = SearchCondition._sex; SearchEventManager.Instance._ageFrom = SearchCondition._ageFrom; SearchEventManager.Instance._ageTo = SearchCondition._ageTo; SearchEventManager.Instance._heightFrom = SearchCondition._heightFrom; SearchEventManager.Instance._heightTo = SearchCondition._heightTo; SearchEventManager.Instance._bodyType = SearchCondition._bodyType; SearchEventManager.Instance._isImage = SearchCondition._isImage; SearchEventManager.Instance._radius = SearchCondition._radius; SearchEventManager.Instance._keyword = SearchCondition._keyword; } // 通信レスポンス待ってから UserListApi._success = false; int page_next = int.Parse(EventManager.SearchEventManager.Instance._nowShowPage) + pageChange; new UserListApi( AppStartLoadBalanceManager._userKey, SearchEventManager.Instance._lat, SearchEventManager.Instance._lng, SearchEventManager.Instance._order, SearchEventManager.Instance._sex, SearchEventManager.Instance._ageFrom, SearchEventManager.Instance._ageTo, SearchEventManager.Instance._heightFrom, SearchEventManager.Instance._heightTo, SearchEventManager.Instance._bodyType, SearchEventManager.Instance._isImage, SearchEventManager.Instance._radius, SearchEventManager.Instance._keyword, page_next.ToString() //EventManager.SearchEventManager.Instance._nowShowPage ); while (UserListApi._success == false) { yield return(UserListApi._success == true); } SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); if (UserListApi._httpCatchData.result.users != null) { if (UserListApi._httpCatchData.result.users.Count > 0) { _InfiniteLimitScroll.GetComponent <SearchListLargeImageInfiniteLimitScroll> ().Init(); // 更新後のリストの位置にバーをあわせる if (pageChange >= 0) { _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; } else { _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; } int page = int.Parse(SearchEventManager.Instance._nowShowPage) + pageChange; if (page % 4 == 0) { System.GC.Collect(); Resources.UnloadUnusedAssets(); } SearchEventManager.Instance._nowShowPage = page.ToString(); } else { // リストのないページカウントになってるので 一旦通信とリストの更新をさせないようにする _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelMax(0); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelInstantateCount(0); } } else { _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelMax(0); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelInstantateCount(0); } _loadingOverlay.SetActive(false); }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { _coverOrProf = CoverOrProfType.None; _time = 0; _tmpText.text = LocalMsgConst.TITLE_MYPAGE; _loadingOverlay.SetActive(true); //アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで //static変数のデータが消え去ってしまうみたいなのでリカバー if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true) { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } //ここでユーザーキーを取得。 AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY); #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif } //ユーザーの取得。 new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } if (GetUserApi._httpCatchData.result.is_auto_renewable == "true") { CommonConstants.IS_PREMIUM = true; } else { CommonConstants.IS_PREMIUM = false; } PremiumPushPanel.Instance.Init(); //性別が取得出来ていない場合の処理。 if (GetUserApi._httpCatchData.result.user.sex_cd == "0") { PanelGenderSelectCommon.Instance.Init(); //性別選択のUIを表示。 _loadingOverlay.SetActive(false); yield break; } AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd; ///メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///ユーザーのステータスをチェックする処理。 AppliEventController.Instance.UserStatusProblem(); ///強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///アプリポップアップレビューの立ち上げ処理。 AppliEventController.Instance.AppliReview(); //マスターデータの取得。 if (InitDataApi._httpCatchData == null) { new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } } //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。 if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 AppStartLoadBalanceManager._isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 AppStartLoadBalanceManager._isBaseProfile = false; } //こっからプッシュ飛んできた時の処理。 if (NotificationRecieveManager._isCatch == true) { switch (AppStartLoadBalanceManager._toScenePanel) { case CommonConstants.VIEW_HISTORY: HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, HistoryListCloseEvent); _tmpText.text = LocalMsgConst.TITLE_HISTORY; PaneHistory.Instance.Init(); PanelAnimate(_paneHistory); _paneHistory.GetComponent <BoxCollider2D> ().enabled = false; break; } NotificationRecieveManager._isCatch = false; yield break; } //ヘッダーパネル初期化 PanelStateManager.InitPanelSet(); //データの初期化等 DataInit(); //シーンの最初に表示する箇所、初期化。 PanelMypageMain.Instance.Init(); //審査レビューじゃない場合のみ広告表示。 if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR //有料会員か? if (CommonConstants.IS_PREMIUM == false) { // 広告の取得、表示処理 string spotId = ""; if (CommonConstants.IS_AD_TEST == true) { spotId = CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); } else { spotId = CommonConstants.IMOBILE_BANNER_SPOT_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); } if (AppStartLoadBalanceManager.m_NendAdFullBoard != null) { AppStartLoadBalanceManager.m_NendAdFullBoard.Load(); AppStartLoadBalanceManager.m_NendAdFullBoard.Show(); } if (_isUnserBanner == false) { _imobileBannerViewId = IMobileSdkAdsUnityPlugin.show( spotId, IMobileSdkAdsUnityPlugin.AdType.BANNER, IMobileSdkAdsUnityPlugin.AdAlignPosition.CENTER, IMobileSdkAdsUnityPlugin.AdValignPosition.BOTTOM, true ); _isUnserBanner = true; } //_nendAdBanner.Show (); } else { Debug.Log(" i-mobile LOG: => Start This is Premium"); string spotId = ""; if (CommonConstants.IS_AD_TEST == true) { spotId = CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); } else { spotId = CommonConstants.IMOBILE_BANNER_SPOT_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); } //バナー広告隠す処理。 IMobileSdkAdsUnityPlugin.setVisibility(_imobileBannerViewId, false); //有料会員のため、広告ストップ IMobileSdkAdsUnityPlugin.stop(spotId); _nendAdBanner.Pause(); _nendAdBanner.Hide(); Destroy(_nendAdBanner.gameObject); } #endif } _loadingOverlay.SetActive(false); yield break; }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { #if UNITY_IPHONE && !UNITY_EDITOR NotificationServices.RegisterForNotifications( NotificationType.Alert | NotificationType.Badge | NotificationType.Sound); // notification clear NativeRecieveManager.RemotePushClear(); #endif //ローディングアニメーション取得。 _loadAnimation.SetActive(true); //アプリ全体で使用する変数をリセット。 ResetStaticVariable(); //仮登録API ---------------------- new PreRegistUser(); while (PreRegistUser._success == false) { yield return(PreRegistUser._success == true); } _userKey = PreRegistUser._httpCatchData.result.user.user_key; _gender = PreRegistUser._httpCatchData.result.user.sex_cd; new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } //-------------------------------- 広告用設定 初期化処理 ここから -------------------------------- #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (GetUserApi._httpCatchData.result.review == "false") { string nendNativeAdApiKey_IOS = ""; string nendNativeAdSpotId_IOS = ""; string nendNativeAdApiKey_Android = ""; string nendNativeAdSpotId_Android = ""; if (CommonConstants.IS_AD_TEST == true) { //Imobile Test mode IMobileSdkAdsUnityPlugin.setTestMode(true); //Maio test mode Maio.SetAdTestMode(true); //バナー広告用 テスト IMobileSdkAdsUnityPlugin.registerInline( CommonConstants.IMOBILE_PARTNER_TEST_ID, CommonConstants.IMOBILE_MDDIA_TEST_ID, CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID ); IMobileSdkAdsUnityPlugin.registerFullScreen( CommonConstants.IMOBILE_PARTNER_TEST_ID, CommonConstants.IMOBILE_MDDIA_TEST_ID, CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID ); //スポット情報の取得処理 //バナー広告用テスト IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID); //インタースティシャル広告テスト IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); //NEND IOS用 テスト nendNativeAdApiKey_IOS = CommonConstants.NEND_NATIVEAD_API_TEST_ID; nendNativeAdSpotId_IOS = CommonConstants.NEND_NATIVEAD_SPOT_TEST_ID; //NEND Android用 テスト nendNativeAdApiKey_Android = CommonConstants.NEND_NATIVEAD_API_TEST_ID; nendNativeAdSpotId_Android = CommonConstants.NEND_NATIVEAD_SPOT_TEST_ID; } else { // //バナー広告用 IMobileSdkAdsUnityPlugin.registerInline( CommonConstants.IMOBILE_PARTNER_ID, CommonConstants.IMOBILE_MDDIA_ID, CommonConstants.IMOBILE_BANNER_SPOT_ID ); //インタースティシャル用 IMobileSdkAdsUnityPlugin.registerFullScreen( CommonConstants.IMOBILE_PARTNER_ID, CommonConstants.IMOBILE_MDDIA_ID, CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID ); //フル広告用 IMobileSdkAdsUnityPlugin.registerFullScreen( CommonConstants.IMOBILE_PARTNER_ID, CommonConstants.IMOBILE_MDDIA_ID, CommonConstants.IMOBILE_FULL_SPOT_ID ); //スポット情報の取得処理 //インタースティシャル IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); //バナー IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_BANNER_SPOT_ID); //アイモバイル・フル広告用 IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_FULL_SPOT_ID); //NEND Native AD IOS nendNativeAdApiKey_IOS = CommonConstants.NEND_NATIVEAD_API_IOS_ID; nendNativeAdSpotId_IOS = CommonConstants.NEND_NATIVEAD_SPOT_IOS_ID; //NEND Native AD ANDROID nendNativeAdApiKey_Android = CommonConstants.NEND_NATIVEAD_API_ANDROID_ID; nendNativeAdSpotId_Android = CommonConstants.NEND_NATIVEAD_SPOT_ANDROID_ID; } //Nend Native Ad セットアップ処理。 #if UNITY_EDITOR // UnityEditorの場合は、広告枠のタイプを指定しテスト用の広告を使って表示の確認が行えます。 m_NendAdClient = NativeAdClientFactory.NewClient(NativeAdClientFactory.NativeAdType.SmallSquare); m_NendAdFullBoard = NendAdFullBoard.NewFullBoardAd(CommonConstants.NEND_NATIVEFULL_SPOT_IOS_ID, CommonConstants.NEND_NATIVEFULL_API_IOS_ID); #elif UNITY_IPHONE m_NendAdClient = NativeAdClientFactory.NewClient(nendNativeAdSpotId_IOS, nendNativeAdApiKey_IOS); m_NendAdFullBoard = NendAdFullBoard.NewFullBoardAd(CommonConstants.NEND_NATIVEFULL_SPOT_IOS_ID, CommonConstants.NEND_NATIVEFULL_API_IOS_ID); #elif UNITY_ANDROID m_NendAdClient = NativeAdClientFactory.NewClient(nendNativeAdSpotId_Android, nendNativeAdApiKey_Android); //m_NendAdFullBoard = NativeAdClientFactory.NewClient (nendNativeAdSpotId_Android, nendNativeAdApiKey_Android); #endif //バナー広告用。 IMobileSdkAdsUnityPlugin.inlinieAdOrientation = IMobileSdkAdsUnityPlugin.ImobileSdkAdsInlineAdOrientation.PORTRAIT; //maio動画広告のクローズボタンが押された時のイベント処理。 Maio.OnClosedAd += MaioMovieSdkEvent.OnClosed; //動画 広告用。 Maio.Start(CommonConstants.MAIO_MEDIA_ID); NendAdBannerOrigenalManager.Instance.Init(); } #endif //-------------------------------- 広告用設定 初期化処理 ここまで-------------------------------- //メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadAnimation.SetActive(false); yield break; } //ユーザーのステータスをチェックする処理。 AppliEventController.Instance.UserStatusProblem(); //強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadAnimation.SetActive(false); yield break; } //GPSを取得する処理。 yield return(StartCoroutine(GpsSet())); #if UNITY_IPHONE && !UNITY_EDITOR NativeRecieveManager.GetPushMessageIos(); #endif _tokenSent = false; _toPushCatchUserId = ""; #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif //基本プロフィールを作成しているかどうかの判定。 if (string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 _isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 _isBaseProfile = false; } //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } //ここでユーザーキーを保存 LocalFileHandler.SetString(LocalFileConstants.USER_KEY, _userKey); LocalFileHandler.Flush(); //レビュー時、すれ違い機能は表示しないようにしておく。リスクヘッジ。 #if UNITY_ANDROID && !UNITY_EDITOR _deviceToken = GCMService.GetRegistrationId(); //デバイストークンの登録API---------------------- if (string.IsNullOrEmpty(_deviceToken) == false) { new SetDeviceToken(_userKey, _deviceToken); while (SetDeviceToken._success == false) { yield return(SetDeviceToken._success == true); } } else { GCMService.Registration(); } #endif //初期マスターデータの取得 //ファイルネーム比較してマスター更新分があったら再度Api飛ばしてローカルデータを更新する new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } //新着メッセージ未既読のAPI取得する new GetUnreadMessageCountApi(); while (GetUnreadMessageCountApi._success == false) { yield return(GetUnreadMessageCountApi._success == true); } _msgBadge = GetUnreadMessageCountApi._httpCatchData.result.count; var user = PreRegistUser._httpCatchData.result.user; if (string.IsNullOrEmpty(user.pref) == false && string.IsNullOrEmpty(user.city_id) == false && user.pref != "0" && user.city_id != "0") { if (PreRegistUser._httpCatchData.result.complete.Count > 0) { //Mypageシーンに遷移 - 遷移する前にログインボーナス表示 string loginComplete = PreRegistUser._httpCatchData.result.complete [0]; if (string.IsNullOrEmpty(loginComplete) == false) { StartEventManager.Instance.PanelPopupAnimate(_loginBonus); _loginBonus.transform.GetChild(0).localScale = new Vector3(1, 1, 1); _loadAnimation.SetActive(false); yield break; } else { _loadAnimation.SetActive(false); NextSceneProccess(); yield break; } } else { _loadAnimation.SetActive(false); NextSceneProccess(); yield break; } } else { if (_gender != "0") { NextSceneProccess(); yield break; } #if !UNITY_EDITOR && UNITY_IPHONE //初回時に通る処理。 => ポップアップ //説明用ポップアップ。 PopupSecondSelectPanel.Instance.PopMessageInsert( LocalMsgConst.SELF_SHARE_INFO_CONFIRM, LocalMsgConst.APPROVAL, LocalMsgConst.DENIAL, PublicUserInfoAllow, PublicUserInfoDeny ); GameObject obj = GameObject.FindGameObjectWithTag(CommonConstants.POPUP_SECOND_SELECT_TAG); StartEventManager.Instance.PanelPopupAnimate(obj); #endif if (string.IsNullOrEmpty(LocalFileHandler.GetString(LocalFileConstants.VALID_URL_KEY)) == true) { if (GetUserApi._httpCatchData.result.review == "false") { new Valid(_userKey); while (Valid._success == false) { yield return(Valid._success == true); } //start app installed. defaul browser open if (string.IsNullOrEmpty(Valid._httpCatchData.result.url) == false) { //ローカルファイルにvalid_urlで保存 初回インストール時のみ通知するURLとする LocalFileHandler.SetString(LocalFileConstants.VALID_URL_KEY, Valid._httpCatchData.result.url); LocalFileHandler.Flush(); var uri = new System.Uri(Valid._httpCatchData.result.url); Application.OpenURL(uri.AbsoluteUri); } } } LocalFileHandler.HashAllClear(); _startAnimation.GetComponent <uTweenPosition> ().enabled = true; _loadAnimation.SetActive(false); } }
/// <summary> /// Taps the this message. /// 自分と相手とのメッセージのやり取り. /// </summary> /// <param name="obj">Object.</param> public void TapThisMessage(GameObject obj) { if (_panelEazyNotifyInfiniteScroll.GetDisplayType() == "2") { HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, InformationBackButton); _backSwipe.EventMessageTarget = _informationPanel.gameObject; if (obj != null) { string id = obj.name; } if (_informationPanel != null) { if (_informationPanel.GetComponent <uTweenPosition> ().from.x == 0) { _informationPanel.GetComponent <uTweenPosition> ().from = _informationPanel.GetComponent <uTweenPosition> ().to; } _informationPanel.GetComponent <uTweenPosition> ().to = Vector3.zero; _informationPanel.GetComponent <uTweenPosition> ().ResetToBeginning(); _informationPanel.GetComponent <uTweenPosition> ().enabled = true; // 初期化処理 _informationPanelScroll.GetComponent <PanelInformationInfiniteScroll> ().Init(obj.name); } } else { _userId = obj.name; #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (GetUserApi._httpCatchData.result.review == "false") { if (CommonConstants.IS_PREMIUM == false) { //動画広告が何もない場合はアイモバイル、インターステシャルを表示。 if (Maio.CanShow(CommonConstants.MAIO_ZONE_ID_1) == false) { if (AppStartLoadBalanceManager.m_NendAdFullBoard != null) { AppStartLoadBalanceManager.m_NendAdFullBoard.Load(); AppStartLoadBalanceManager.m_NendAdFullBoard.Show(); } } else { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); string isMovieFlag = LocalFileHandler.GetString(LocalFileConstants.MOVIE_POPUP_SHOW); if (string.IsNullOrEmpty(isMovieFlag) == true) { PanelPopupAnimate(_popupMovie); return; } else { //問答無用で動画広告を表示 AppStartLoadBalanceManager._whereFromAds = MaioMovieSdkEvent.WhereFromAds.MessageList; Maio.Show(CommonConstants.MAIO_ZONE_ID_1); return; } } } else { // IMobileSdkAdsUnityPlugin.stop(); } } #endif //審査中のときは、広告を一切挟まないので下記、処理。 HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, ChatBackButton); _backSwipe.EventMessageTarget = _panelChat.gameObject; if (obj != null) { string id = obj.name; } if (_panelChat != null) { if (_panelChat.GetComponent <uTweenPosition> ().from.x == 0) { _panelChat.GetComponent <uTweenPosition> ().from = _panelChat.GetComponent <uTweenPosition> ().to; } _panelChat.GetComponent <uTweenPosition> ().to = Vector3.zero; _panelChat.GetComponent <uTweenPosition> ().ResetToBeginning(); _panelChat.GetComponent <uTweenPosition> ().enabled = true; // 初期化処理 _panelChat.GetComponent <PanelChat> ()._maxAfterID = ""; _panelChat.GetComponent <PanelChat> ()._maxBeforeID = ""; _panelChat.GetComponent <PanelChat> ()._maxAfterIDBackup = ""; _panelChat.GetComponent <PanelChat> ()._maxBeforeIDBackup = ""; _panelChat.GetComponent <PanelChat> ()._listUpdateDisable = false; _panelChat.GetComponent <PanelChat> ().Init(obj.name); } } }
// 初期化 changepaeはページが進むか戻るか IEnumerator Init(int ChangePage) { //HeaderPanel.Instance.GetComponent<Text> ().text = PanelStateManager.GetHeaderStringByKey("BulletInBoardPanel"); _loadingOverlay.SetActive(true); // 通信レスポンス待ってから int page_next = int.Parse(EventManager.BulletinBoardEventManager.Instance._nowShowPage) + ChangePage; string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } BulletinBoardEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <BulletinBoardEventManager.SearchCondition>(LocalFileConstants.BBS_SEARCH_CONDITION_KEY); //条件検索のデータがローカルファイルに残っている場合。 if (SearchCondition != null) { if (string.IsNullOrEmpty(SearchCondition._lat) == false) { BulletinBoardEventManager.Instance._lat = SearchCondition._lat; } if (string.IsNullOrEmpty(SearchCondition._lng) == false) { BulletinBoardEventManager.Instance._lng = SearchCondition._lng; } if (string.IsNullOrEmpty(SearchCondition._CategoryID) == false) { BulletinBoardEventManager.Instance._CategoryID = SearchCondition._CategoryID; } if (string.IsNullOrEmpty(SearchCondition._sex) == false) { BulletinBoardEventManager.Instance._sex = SearchCondition._sex; } if (string.IsNullOrEmpty(SearchCondition._ageFrom) == false) { BulletinBoardEventManager.Instance._ageFrom = SearchCondition._ageFrom; } if (string.IsNullOrEmpty(SearchCondition._ageTo) == false) { BulletinBoardEventManager.Instance._ageTo = SearchCondition._ageTo; } if (string.IsNullOrEmpty(SearchCondition._heightFrom) == false) { BulletinBoardEventManager.Instance._heightFrom = SearchCondition._heightFrom; } if (string.IsNullOrEmpty(SearchCondition._heightTo) == false) { BulletinBoardEventManager.Instance._heightTo = SearchCondition._heightTo; } if (string.IsNullOrEmpty(SearchCondition._bodyType) == false) { BulletinBoardEventManager.Instance._bodyType = SearchCondition._bodyType; } if (string.IsNullOrEmpty(SearchCondition._isImage) == false) { BulletinBoardEventManager.Instance._isImage = SearchCondition._isImage; } if (string.IsNullOrEmpty(SearchCondition._radius) == false) { BulletinBoardEventManager.Instance._radius = SearchCondition._radius; } if (string.IsNullOrEmpty(SearchCondition._keyword) == false) { BulletinBoardEventManager.Instance._keyword = SearchCondition._keyword; } } new BoardListApi ( AppStartLoadBalanceManager._userKey, BulletinBoardEventManager.Instance._CategoryID, BulletinBoardEventManager.Instance._lat, BulletinBoardEventManager.Instance._lng, BulletinBoardEventManager.Instance._sex, BulletinBoardEventManager.Instance._ageFrom, BulletinBoardEventManager.Instance._ageTo, BulletinBoardEventManager.Instance._heightFrom, BulletinBoardEventManager.Instance._heightTo, BulletinBoardEventManager.Instance._bodyType, BulletinBoardEventManager.Instance._isImage, BulletinBoardEventManager.Instance._radius, BulletinBoardEventManager.Instance._keyword, page_next.ToString() //EventManager.BulletinBoardEventManager.Instance._nowShowPage ); while (BoardListApi._success == false) { yield return(BoardListApi._success == true); } if (BoardListApi._httpCatchData.result.boards != null) { if (BoardListApi._httpCatchData.result.boards.Count > 0) { _boardListInfiniteLimitScroll.GetComponent <BoardListInfiniteLimitScroll> ().Init(); // 更新後のリストの位置にバーをあわせる if (ChangePage >= 0) { _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; } else { _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; } int page = int.Parse(EventManager.BulletinBoardEventManager.Instance._nowShowPage) + ChangePage; if (page % 2 == 0) { System.GC.Collect(); Resources.UnloadUnusedAssets(); } EventManager.BulletinBoardEventManager.Instance._nowShowPage = page.ToString(); } else { // リストのないページカウントになってるので 一旦通信とリストの更新をさせないようにする _disablePageForNetworkCall = true; _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); } } else { _disablePageForNetworkCall = true; _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); } _loadingOverlay.SetActive(false); }
//---------------- ここまで - 送り放題のポップアップ ---------------- #endregion #region チャットをオープン /// <summary> /// Profiles to chat open. /// </summary> /// <returns>The to chat open.</returns> public void ProfileToChatOpen(GameObject animObj) { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (GetUserApi._httpCatchData.result.review == "false") { if (CommonConstants.IS_PREMIUM == false) { //動画広告が何もない場合はアイモバイル、インターステシャルを表示。 if (Maio.CanShow(CommonConstants.MAIO_ZONE_ID_1) == false) { if (AppStartLoadBalanceManager.m_NendAdFullBoard != null) { AppStartLoadBalanceManager.m_NendAdFullBoard.Load(); AppStartLoadBalanceManager.m_NendAdFullBoard.Show(); } } else { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); string isMovieFlag = LocalFileHandler.GetString(LocalFileConstants.MOVIE_POPUP_SHOW); if (string.IsNullOrEmpty(isMovieFlag) == true) { PanelPopupAnimate(_popupMovie); return; } else { AppStartLoadBalanceManager._whereFromAds = MaioMovieSdkEvent.WhereFromAds.ProfileToChat; //問答無用で動画広告を表示 Maio.Show(CommonConstants.MAIO_ZONE_ID_1); return; } } } else { //有料会員の場合は何もしない。 } } #endif if (_blockButton.transform.GetChild(0).gameObject.activeSelf == true) { PopupPanel.Instance.PopClean(); PopupPanel.Instance.PopMessageInsert( LocalMsgConst.BLOCK_USER, LocalMsgConst.OK, ChatBlockEvent ); PanelPopupAnimate(GameObject.FindGameObjectWithTag(CommonConstants.POPUP_BASIC_TAG)); return; } _panelChat.GetComponent <PanelChat> ()._maxAfterID = ""; _panelChat.GetComponent <PanelChat> ()._maxBeforeID = ""; _panelChat.GetComponent <PanelChat> ()._maxAfterIDBackup = ""; _panelChat.GetComponent <PanelChat> ()._maxBeforeIDBackup = ""; _panelChat.GetComponent <PanelChat> ()._listUpdateDisable = false; //解除処理 PanelChat.Instance.Init(_toUserId); PanelPopupCloseAnimate(this.gameObject); _backSwipe.EventMessageTarget = _panelChat; PanelAnimate(animObj); _panelChat.GetComponent <BoxCollider2D> ().enabled = true; if (MypageEventManager.Instance != null || SearchEventManager.Instance != null) { HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, ProfileToChatCloseEvent); _backSwipe.EventMessageTarget = _panelChat.gameObject; } if (MessageEventManager.Instance != null) { HeaderPanel.Instance.BackButtonSwitch(false); //HeaderPanel.Instance.BackButtonSwitch (true, MessageEventManager.Instance.ChatBackButton); HeaderPanel.Instance.BackButtonSwitch(true, ProfileToChatCloseEvent); _backSwipe.EventMessageTarget = _panelChat.gameObject; } if (BulletinBoardEventManager.Instance != null) { HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, BulletinBoardEventManager.Instance.ProfileToChatCloseEvent); _backSwipe.EventMessageTarget = _panelChat.gameObject; } if (MatchingEventManager.Instance != null) { HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, MatchingEventManager.Instance.ChatBackButton); _backSwipe.EventMessageTarget = _panelChat.gameObject; } }
/// <summary> /// WEB VIEW URL を返す /// </summary> /// <returns>APIのURL</returns> /// <param name="apiKey">APIの識別キー</param> public static string GetWebviewDataURL(string apiKey, bool secure = false) { ApiKeyValue api = GetAPIKeyValue(apiKey); if (api != null) { string url = ""; string http; if (secure == true) { http = HTTPS; } else { http = HTTP; } if (_env == "product") { url = string.Format("{0}://{1}{2}", http, Instance.PRODUCT_WEBVIEW, api.api); return(url); } else if (_env == "staging") { url = string.Format("{0}://{1}{2}", Instance.STG_WEBVIEW, api.api); return(url); } else { //return string.Format("http://{0}{1}", Instance.DEV_DOMAIN, api.api); #if UNITY_EDITOR LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); int domainSwich = LocalFileHandler.GetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER); switch (domainSwich) { case (int)SeverMachineType.LOCAL: url = string.Format("{0}://{1}{2}", http, Instance.LOCAL_WEBVIEW, api.api); break; case (int)SeverMachineType.DEV: url = string.Format("{0}://{1}{2}", http, Instance.DEV_WEBVIEW, api.api); break; case (int)SeverMachineType.STG: url = string.Format("{0}://{1}{2}", http, Instance.STG_WEBVIEW, api.api); break; case (int)SeverMachineType.PRODUCTION: url = string.Format("{0}://{1}{2}", http, Instance.PRODUCT_WEBVIEW, api.api); break; default: url = string.Format("{0}://{1}{2}", http, Instance.DEV_WEBVIEW, api.api); break; } return(url); #else return(string.Format("{0}://{1}{2}", http, Instance.DEV_WEBVIEW, api.api)); #endif } } return(null); }