public JoinMemberRequest(JoinMemberInfo memInfo) { Dictionary <string, object> dic = new Dictionary <string, object> (); dic.Add("memberEmail", memInfo.MemberEmail); // dic.Add ("memberEmail", memInfo.MemberID); dic.Add("memberName", memInfo.MemberName); dic.Add("osType", memInfo.OsType); dic.Add("registType", memInfo.RegistType); dic.Add("memberPwd", memInfo.MemberPwd); dic.Add("memUID", memInfo.MemUID); dic.Add("memImage", memInfo.MemImage); AddField("param", JsonFx.Json.JsonWriter.Serialize(dic)); if (memInfo.Photo != null && memInfo.Photo.Length > 0) { if (File.Exists(memInfo.Photo)) { Debug.Log("a file exists : " + memInfo.Photo); byte[] bytes = File.ReadAllBytes(memInfo.Photo); AddBinaryData("file", bytes, "profile.png", "image/png"); } else { Debug.Log("a file not found : " + memInfo.Photo); } } // Debug.Log ("memberPwd : " + memInfo.MemberPwd); }
void DialogueHandler(DialogueMgr.BTNS btn) { if (btn == DialogueMgr.BTNS.Btn1) { JoinMemberInfo memInfo = new JoinMemberInfo(); UpdateMemberInfoEvent event1 = null; //memInfo.Photo; //memInfo.MemberID memInfo.MemberName = SetName; memInfo.MemberEmail = UserMgr.UserInfo.memberEmail; Debug.Log("send Team code : " + SetTeamCode); memInfo.FavoBB = SetTeamCode; if (GalleryCheck) { memInfo.MemImage = UserMgr.UserInfo.memberEmail; if (Setimagebyte == null) { Setimagebyte = UserMgr.UserInfo.Textures.EncodeToPNG(); } memInfo.PhotoBytes = Setimagebyte; Setimagebyte = null; GalleryCheck = false; } event1 = new UpdateMemberInfoEvent(new EventDelegate(this, "Set")); NetMgr.UpdateMemberInfo(memInfo, event1, UtilMgr.IsTestServer(), false); } }
public void NextClicked() { if (CheckNickConfirmed()) { mMemInfo = new JoinMemberInfo(); mMemInfo.MemberEmail = ""; //transform.FindChild ("InputEmail").GetComponent<UIInput> ().value; mMemInfo.MemberName = transform.FindChild("InputNick").GetComponent <UIInput> ().value; mMemInfo.MemberPwd = ""; //transform.FindChild ("InputPwd").GetComponent<UIInput> ().value; mMemInfo.MemImage = ""; //preprocess mMemInfo.Photo = mImgPath; mMemInfo.PhotoBytes = ImageBate; // gameObject.SetActive(false); // mSelectTeam.GetComponent<ScriptSelectTeam>().Init(mMemInfo); // mSelectTeam.GetComponent<ScriptSelectTeam>().SetTeam(""); // mSelectTeam.GetComponent<ScriptSelectTeam>().GoNext(); // // PlayerPrefs.SetString(Constants.PrefEmail, mMemInfo.MemberEmail); // PlayerPrefs.SetString(Constants.PrefPwd, mMemInfo.MemberPwd); // GetComponentInParent<ScriptTitle>().mProfileEvent = // new GetProfileEvent(new EventDelegate(this, "CompletedJoin")); // NetMgr.JoinMember(mMemInfo, GetComponentInParent<ScriptTitle>().mProfileEvent, UtilMgr.IsTestServer(), true); CompletedJoin(); } else { DialogueMgr.ShowDialogue(mJoinError, "닉네임 중복 체크가 필요합니다.", DialogueMgr.DIALOGUE_TYPE.Alert, null, null, null, null); } }
void ReceivedChecking() { if(mCheckEvent.Response.code == 0){ DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrCheckNick"), UtilMgr.GetLocalText("StrNickDuplicated"), DialogueMgr.DIALOGUE_TYPE.Alert, null); return; } mUpdateEvent = new UpdateMemberInfoEvent(new EventDelegate(ReceivedUpdate)); JoinMemberInfo memInfo = new JoinMemberInfo(); memInfo.MemberName = mNick; NetMgr.UpdateMemberInfo(memInfo, mUpdateEvent, false, true); }
public UpdateMemberInfoRequest(JoinMemberInfo memInfo) { Dictionary <string, object> dic = new Dictionary <string, object> (); #if (UNITY_EDITOR) dic.Add("osType", 1); dic.Add("version", UnityEditor.PlayerSettings.bundleVersion); #elif (UNITY_ANDROID) dic.Add("osType", 1); dic.Add("version", Application.version); #else dic.Add("osType", 2); dic.Add("version", Application.version); #endif // Debug.Log("memInfo.MemberName is "+memInfo.MemberName); dic.Add("memSeq", UserMgr.UserInfo.memSeq); if (memInfo.MemberName != null && memInfo.MemberName.Length > 0) { dic.Add("nick", memInfo.MemberName); } if (memInfo.Photo != null && memInfo.Photo.Length > 0) { dic.Add("file", "profile.png"); } AddField("param", Newtonsoft.Json.JsonConvert.SerializeObject(dic)); if (memInfo.Photo != null && memInfo.Photo.Length > 0) { if (File.Exists(memInfo.Photo)) { Debug.Log("a file exists : " + memInfo.Photo); byte[] bytes = File.ReadAllBytes(memInfo.Photo); AddBinaryData("file", bytes, "profile.png", "image/png"); } else { Debug.Log("a file not found : " + memInfo.Photo); } } // if (memInfo.PhotoBytes != null && memInfo.PhotoBytes.Length > 0) { // Debug.Log("a file exists : "+memInfo.PhotoBytes); // byte[] bytes = memInfo.PhotoBytes; // AddBinaryData("file", bytes, "profile.png", "image/png"); // } else{ // Debug.Log("a file not found : "+memInfo.PhotoBytes); // } }
void UploadFile() { Debug.Log("file name is " + mTempFile); if (mTempFile == null || mTempFile.Length < 1) { return; } mProfileEvent = new GetProfileEvent(new EventDelegate(ReceivedProfile)); JoinMemberInfo memberInfo = new JoinMemberInfo(); memberInfo.Photo = mTempFile; NetMgr.UpdateMemberInfo(memberInfo, mProfileEvent, false, true); }
void ReceivedChecking() { if (mCheckEvent.Response.code == 0) { DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrCheckNick"), UtilMgr.GetLocalText("StrNickDuplicated"), DialogueMgr.DIALOGUE_TYPE.Alert, null); return; } mUpdateEvent = new UpdateMemberInfoEvent(new EventDelegate(ReceivedUpdate)); JoinMemberInfo memInfo = new JoinMemberInfo(); memInfo.MemberName = mNick; NetMgr.UpdateMemberInfo(memInfo, mUpdateEvent, false, true); }
public UpdateMemberInfoRequest(JoinMemberInfo memInfo) { Dictionary<string, object> dic = new Dictionary<string, object> (); #if(UNITY_EDITOR) dic.Add("osType", 1); dic.Add("version", UnityEditor.PlayerSettings.bundleVersion); #elif(UNITY_ANDROID) dic.Add("osType", 1); dic.Add("version", Application.version); #else dic.Add("osType", 2); dic.Add("version", Application.version); #endif // Debug.Log("memInfo.MemberName is "+memInfo.MemberName); dic.Add ("memSeq", UserMgr.UserInfo.memSeq); if(memInfo.MemberName != null && memInfo.MemberName.Length > 0) dic.Add ("nick", memInfo.MemberName); if (memInfo.Photo != null && memInfo.Photo.Length > 0) dic.Add("file", "profile.png"); AddField("param", Newtonsoft.Json.JsonConvert.SerializeObject(dic)); if (memInfo.Photo != null && memInfo.Photo.Length > 0) { if(File.Exists(memInfo.Photo)){ Debug.Log("a file exists : "+memInfo.Photo); byte[] bytes = File.ReadAllBytes(memInfo.Photo); AddBinaryData("file", bytes, "profile.png", "image/png"); } else{ Debug.Log("a file not found : "+memInfo.Photo); } } // if (memInfo.PhotoBytes != null && memInfo.PhotoBytes.Length > 0) { // Debug.Log("a file exists : "+memInfo.PhotoBytes); // byte[] bytes = memInfo.PhotoBytes; // AddBinaryData("file", bytes, "profile.png", "image/png"); // } else{ // Debug.Log("a file not found : "+memInfo.PhotoBytes); // } }
public void SetMemberInfoOut() { JoinMemberInfo memInfo = new JoinMemberInfo(); UpdateMemberInfoEvent event1 = null; //memInfo.Photo; //memInfo.MemberID memInfo.MemberName = SetName; memInfo.MemberEmail = UserMgr.UserInfo.memberEmail; Debug.Log("send Team code : " + SetTeamCode); memInfo.FavoBB = SetTeamCode; if (GalleryCheck) { memInfo.MemImage = UserMgr.UserInfo.memberEmail; memInfo.PhotoBytes = Setimagebyte; GalleryCheck = false; } event1 = new UpdateMemberInfoEvent(new EventDelegate(this, "Set")); NetMgr.UpdateMemberInfo(memInfo, event1, UtilMgr.IsTestServer(), false); }
public void NextClicked() { string value = CheckValidation(); if (value == null) { mMemInfo = new JoinMemberInfo(); mMemInfo.MemberEmail = transform.FindChild("InputEmail").GetComponent <UIInput> ().value; mMemInfo.MemberName = transform.FindChild("InputNick").GetComponent <UIInput> ().value; mMemInfo.MemberPwd = transform.FindChild("InputPwd").GetComponent <UIInput> ().value; mMemInfo.MemImage = ""; //preprocess mMemInfo.Photo = mImgPath; gameObject.SetActive(false); mSelectTeam.GetComponent <ScriptSelectTeam>().Init(mMemInfo); } else { DialogueMgr.ShowDialogue("join error", value, DialogueMgr.DIALOGUE_TYPE.Alert, null, null, null); } }
public UpdateMemberInfoRequest(JoinMemberInfo memInfo) { Dictionary <string, object> dic = new Dictionary <string, object> (); dic.Add("memSeq", UserMgr.UserInfo.memSeq); dic.Add("memName", memInfo.MemberName); dic.Add("memEmail", memInfo.MemberEmail); dic.Add("memImage", memInfo.MemImage); dic.Add("favoBB", memInfo.FavoBB); // AddField ("param", JsonFx.Json.JsonWriter.Serialize (dic)); AddField("param", Newtonsoft.Json.JsonConvert.SerializeObject(dic)); if (memInfo.Photo != null && memInfo.Photo.Length > 0) { if (File.Exists(memInfo.Photo)) { Debug.Log("a file exists : " + memInfo.Photo); byte[] bytes = File.ReadAllBytes(memInfo.Photo); AddBinaryData("file", bytes, "profile.png", "image/png"); } else { Debug.Log("a file not found : " + memInfo.Photo); } } if (memInfo.PhotoBytes != null && memInfo.PhotoBytes.Length > 0) { Debug.Log("a file exists : " + memInfo.PhotoBytes); byte[] bytes = memInfo.PhotoBytes; AddBinaryData("file", bytes, "profile.png", "image/png"); } else { Debug.Log("a file not found : " + memInfo.PhotoBytes); } }
public JoinMemberRequest(JoinMemberInfo memInfo) { Dictionary<string, object> dic = new Dictionary<string, object> (); dic.Add("memberEmail", memInfo.MemberEmail); // dic.Add ("memberEmail", memInfo.MemberID); dic.Add ("memberName", memInfo.MemberName); dic.Add ("osType", memInfo.OsType); dic.Add ("registType", memInfo.RegistType); dic.Add ("memberPwd", memInfo.MemberPwd); dic.Add ("memUID", memInfo.MemUID); dic.Add ("memImage", memInfo.MemImage); dic.Add("favoBB", memInfo.FavoBB); dic.Add("deviceID", memInfo.DeviceID); // AddField ("param", JsonFx.Json.JsonWriter.Serialize (dic)); AddField("param", Newtonsoft.Json.JsonConvert.SerializeObject(dic)); if (memInfo.Photo != null && memInfo.Photo.Length > 0) { if(File.Exists(memInfo.Photo)){ Debug.Log("a file exists : "+memInfo.Photo); byte[] bytes = File.ReadAllBytes(memInfo.Photo); AddBinaryData("file", bytes, "profile.png", "image/png"); } else{ Debug.Log("a file not found : "+memInfo.Photo); } } if (memInfo.PhotoBytes != null && memInfo.PhotoBytes.Length > 0) { Debug.Log("a file exists : "+memInfo.PhotoBytes); byte[] bytes = memInfo.PhotoBytes; AddBinaryData("file", bytes, "profile.png", "image/png"); } else{ Debug.Log("a file not found : "+memInfo.PhotoBytes); } }
void DialogueHandler(DialogueMgr.BTNS btn) { if (btn == DialogueMgr.BTNS.Btn1) { JoinMemberInfo memInfo = new JoinMemberInfo(); UpdateMemberInfoEvent event1 = null; //memInfo.Photo; //memInfo.MemberID memInfo.MemberName = SetName; memInfo.MemberEmail = UserMgr.UserInfo.memberEmail; Debug.Log("send Team code : " + SetTeamCode); memInfo.FavoBB = SetTeamCode; if (GalleryCheck) { memInfo.MemImage = UserMgr.UserInfo.memberEmail; memInfo.PhotoBytes = Setimagebyte; GalleryCheck = false; } event1 = new UpdateMemberInfoEvent(new EventDelegate(this, "Set")); NetMgr.UpdateMemberInfo(memInfo, event1, UtilMgr.IsTestServer(), false); SettingPage.GetComponent <ProfileSetting>().Save(); } }
public static void UpdateMemberInfo(JoinMemberInfo memInfo, BaseEvent baseEvent, bool isTest, bool bShowLoading) { Instance.webAPIUploadProcessEvent(new UpdateMemberInfoRequest(memInfo), baseEvent, isTest, bShowLoading); }
public void Init(JoinMemberInfo memInfo) { // gameObject.SetActive (true); mMemInfo = memInfo; IsGuest = false; }
public static void JoinMember(JoinMemberInfo memInfo, BaseEvent baseEvent) { Instance.webAPIUploadProcessEvent (new JoinMemberRequest (memInfo), baseEvent); }
void UploadFile() { Debug.Log("file name is "+mTempFile); if(mTempFile == null || mTempFile.Length < 1){ return; } mProfileEvent = new GetProfileEvent(new EventDelegate(ReceivedProfile)); JoinMemberInfo memberInfo = new JoinMemberInfo(); memberInfo.Photo = mTempFile; NetMgr.UpdateMemberInfo(memberInfo, mProfileEvent, false, true); }
public void Init(JoinMemberInfo memInfo) { gameObject.SetActive(true); mMemInfo = memInfo; }