/// <summary> /// Gets the session with browser /// </summary> /// <returns>SessionInfo with info about user session. Null - if login failed</returns> public SessionInfo GetSession() { this.OnLog("Creating login wnd..."); BrowserAuthorization wnd = new BrowserAuthorization(); wnd.Permissions = this.Permissions; wnd.AppId = this.AppId; wnd.ShowDialog(); if (wnd.LoginInfoReceived) { this.OnLog("Authorization successed!"); return wnd.si; } else { this.OnLog("Authorization failed!"); return null; } }
/// <summary> /// Gets the session with browser /// </summary> /// <returns>SessionInfo with info about user session. Null - if login failed</returns> public SessionInfo GetSession() { this.OnLog("Creating login wnd..."); BrowserAuthorization wnd = new BrowserAuthorization(); wnd.Permissions = this.Permissions; wnd.AppId = this.AppId; wnd.ShowDialog(); if (wnd.LoginInfoReceived) { this.OnLog("Authorization successed!"); return(wnd.si); } else { this.OnLog("Authorization failed!"); return(null); } }