private ChatEditor GetEditorFromQuery() { var editor = new ChatEditor(true); if (Request.QueryString.AllKeys.Contains("IsArchive")) { editor.IsArchive = Request.QueryString["IsArchive"].ToBool(); } if (Request.QueryString.AllKeys.Contains("StartDate")) { editor.StartDate = Request.QueryString["StartDate"].ToDate("dd.MM.yyyy HH:mm"); } if (Request.QueryString.AllKeys.Contains("EndDate")) { editor.EndDate = Request.QueryString["EndDate"].ToDate("dd.MM.yyyy HH:mm"); } if (Request.QueryString.AllKeys.Contains("ChatID")) { editor.ChatID = Request.QueryString["ChatID"].ToNullInt(); } editor.InitProps(); return(editor); }
public static void OpenWizard() { currentSettings = ChatSettings.Load(); currentSettings.WizardDone = true; EditorUtility.SetDirty(currentSettings); ChatEditor editor = (ChatEditor)EditorWindow.GetWindow(typeof(ChatEditor), false, "Photon Chat"); editor.minSize = editor.preferredSize; editor.mailOrAppId = currentSettings.AppId; }
public PartialViewResult Editor(FormCollection collection) { var editor = new ChatEditor(true); editor.IsPost = true; editor.IsArchive = collection["IsArchive"].ToBool(); editor.StartDate = collection["StartDate"].ToDate("dd.MM.yyyy HH:mm"); editor.EndDate = collection["EndDate"].ToDate("dd.MM.yyyy HH:mm"); editor.InitProps(); return(PartialView(editor)); }
public bool RegisterByEmail(AccountServiceRequest request, Action <AccountServiceResponse> callback = null, Action <string> errorCallback = null) { if (request == null) { Debug.LogError("Registration request is null"); return(false); } ChatEditor.StartCoroutine( ChatEditor.HttpPost(GetUrlWithQueryStringEscaped(request), RequestHeaders, null, s => { if (string.IsNullOrEmpty(s)) { if (errorCallback != null) { errorCallback("Server's response was empty. Please register through account website during this service interruption."); } } else { AccountServiceResponse ase = this.ParseResult(s); if (ase == null) { if (errorCallback != null) { errorCallback("Error parsing registration response. Please try registering from account website"); } } else if (callback != null) { callback(ase); } } }, e => { if (errorCallback != null) { errorCallback(e); } }) ); return(true); }