Esempio n. 1
0
        private void bgw_DoWorkForOneAll(object sender, DoWorkEventArgs e)
        {
            e.Result = string.Empty;

            ErrorCodes error = ClientUtils.TryLoginOneAll(UserPlugin.Current, PluginBase.Current);

            if (error != ErrorCodes.OK)
            {
                LoginBtn.Invoke(new Action(() => e.Result = CheckResult(error)));
            }
        }
Esempio n. 2
0
 private void loggedIn()
 {
     m_facebookManager.SetLoggedinUser();
     LoginBtn.Invoke(new Action(() => LoginBtn.Enabled = false));
     changeComponentVisabilty(m_ControlsToChangeVisibility);
     pictureBox1.LoadAsync(m_facebookManager.GetProfilePicture());
     LoginBtn.Invoke(new Action(() => LoginBtn.Text = string.Format(
                                    "Hello, {0}.",
                                    m_facebookManager.GetProfileName())));
     new Thread(initAlbumsListBox).Start();
     new Thread(initFriendsListBox).Start();
     new Thread(initOptionalFriendsForRelationshipListBox).Start();
     new Thread(initFeedsListBox).Start();
 }
Esempio n. 3
0
        private void LogoutBtn_Click_(object sender, EventArgs e)
        {
            changeComponentVisabilty(m_ControlsToChangeVisibility);
            Control[] extraControls = new Control[] { panelFriendData, flowLayoutPanelPicturs };
            changeComponentVisabilty(extraControls);
            if (webBrowserGoogleFriend.Visible == true)
            {
                webBrowserGoogleFriend.Visible = false;
            }

            LoginBtn.Invoke(new Action(() => LoginBtn.Enabled = true));
            LoginBtn.Invoke(new Action(() => LoginBtn.Text    = "Login"));
            FacebookService.Logout(m_Observable.NotifyAll);
        }
Esempio n. 4
0
        private void bgw_DoWork(object sender, DoWorkEventArgs e)
        {
            e.Result = string.Empty;

            KeyValuePair <string, string> credentials = (KeyValuePair <string, string>)e.Argument;
            string username = credentials.Key;
            string password = credentials.Value;

            ErrorCodes error = ClientUtils.TryLogin(UserPlugin.Current, username, password, PluginBase.Current);

            if (error != ErrorCodes.OK)
            {
                LoginBtn.Invoke(new Action(() => e.Result = CheckResult(error)));
            }
        }