상속: System.Windows.Forms.Form
예제 #1
0
        private void frmFacebook_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(GlobalSetting.FacebookAccessToken.Trim()))
            {
                // open the Facebook Login Dialog and ask for user permissions.
                var fbLoginDlg = new frmFaceBookLogin(AppId, ExtendedPermissions);
                fbLoginDlg.ShowDialog();

                // The user has taken action, either allowed/denied or cancelled the authorization,
                // which can be known by looking at the dialogs FacebookOAuthResult property.
                // Depending on the result take appropriate actions.
                TakeLoggedInAction(fbLoginDlg.FacebookOAuthResult);
            }

            //Load language
            lblMessage.Text = GlobalSetting.LangPack.Items["frmFacebook.lblMessage"];
            btnClose.Text   = GlobalSetting.LangPack.Items["frmFacebook.btnClose"];
            lblStatus.Text  = string.Format(GlobalSetting.LangPack.Items["frmFacebook._StatusBegin"],
                                            btnUpload.Text);
            lblPercent.Text = "";
        }
예제 #2
0
        private void frmFacebook_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(GlobalSetting.FacebookAccessToken.Trim()))
            {
                // open the Facebook Login Dialog and ask for user permissions.
                var fbLoginDlg = new frmFaceBookLogin(AppId, ExtendedPermissions);
                fbLoginDlg.ShowDialog();

                // The user has taken action, either allowed/denied or cancelled the authorization,
                // which can be known by looking at the dialogs FacebookOAuthResult property.
                // Depending on the result take appropriate actions.
                TakeLoggedInAction(fbLoginDlg.FacebookOAuthResult);
            }

            //Load language
            lblMessage.Text = GlobalSetting.LangPack.Items["frmFacebook.lblMessage"];
            btnClose.Text = GlobalSetting.LangPack.Items["frmFacebook.btnClose"];
            lblStatus.Text = string.Format(GlobalSetting.LangPack.Items["frmFacebook._StatusBegin"],
                                            btnUpload.Text);
            lblPercent.Text = "";
        }