예제 #1
0
        private void signin_Click(object sender, RoutedEventArgs e)
        {
            username = this.textBox.Text.Trim();
            var           url = flow.GetAuthorizeUrl(username);
            BrowserWindow bw  = new BrowserWindow(url);

            bw.Owner = this;
            if (bw.ShowDialog() == true)
            {
                OAuthData.token = bw.Token;
            }

            GetData();
        }
예제 #2
0
        public void DoLogin(string name)
        {
            username = username.Trim();
            var           url = flow.GetAuthorizeUrl(username);
            BrowserWindow bw  = new BrowserWindow(url);

            //bw.Owner = this;
            if (bw.ShowDialog() == true)
            {
                if (!string.IsNullOrWhiteSpace(bw.Token))
                {
                    OAuthData.token = bw.Token;
                }
                this.token = bw.Token;
                this._appUser.IsAuthenticated = true;
                this._appUser.UserName        = username;
            }
        }