private void logInToFB() { if (string.IsNullOrEmpty(fbEmail) || string.IsNullOrEmpty(fbPassword)) { Invoke((MethodInvoker) delegate { FacebookPanel.Show(); }); } else { Browser.FrameLoadEnd += Browser_FacebookLoaded; Browser.Load("https://www.facebook.com"); } }
private void FBLogin_Click(object sender, EventArgs e) { if (FBEmail.Text.Trim().Length > 0 && FBPassword.Text.Trim().Length > 0) { fbEmail = Cryptography.Encrypt(FBEmail.Text); fbPassword = Cryptography.Encrypt(FBPassword.Text); File.WriteAllText(fbDataFile, fbEmail + "||" + fbPassword); FacebookPanel.Hide(); logInToFB(); } }