protected virtual void Constructor(string key, FBClient client, string type) { Type = type; Key = key; Client = client; Load(); }
private async static void InstantiateFBClient() { FBClient client = new FBClient(); string email = "*****@*****.**"; string password = "******"; // Login with username and password var logged_in = await client.DoLogin(email, password); // Check login was successful if (logged_in) { List <FB_Thread> threads = await client.fetchThreadList(); List <FB_Message> messages = await client.FetchThreadMessages(threads.First().uid); //Send a message to myself var msg_uid = await client.SendMessage("Hi me!", thread_id : client.GetUserUid()); if (msg_uid != null) { Console.WriteLine("Message sent: {0}", msg_uid); } // Do logout await client.DoLogout(); } else { Console.WriteLine("Error logging in"); } }
private bool InGroup() { dynamic request = FBClient.Get(AUCSFBId + "/Members"); bool paging = true; while (paging) { foreach (dynamic member in request.data) { if (member.id == UserFBId) { return(true); } } if (request.paging != null && request.paging.next != null) { request = FBClient.Get(request.paging.next); } else { paging = false; } } return(false); }
private void CreateNewUser(bool confirmed) { Member newMember = new Member(); newMember.RowKey = UserFBId; newMember.Confirmed = confirmed; dynamic fbuser = FBClient.Get(UserFBId); newMember.Name = fbuser.name; CloudTable table = TableClient.GetTableReference("Members"); TableOperation tableOperation = TableOperation.Insert(newMember); table.Execute(tableOperation); }
private static bool LogToMessanger() { if (client == null) { client = new FBClient(); } string email = "*****@*****.**"; string password = "******"; // Login with username and password Task <bool> logged_in = client.DoLogin(email, password); logged_in.Wait(); return(logged_in.Result); }
private void b_Enter_Click(object sender, EventArgs e) { FBClient Client = new FBClient(Program.BaseConnectionString); string SQL = qryUserPassword; SQL = SQL.Replace(":username", "'" + tB_Login.Text + "'"); DataTable dt = Client.QueryRecordsList(SQL); #region Тимчасово, щоб не вводити пароль try { Program.UserContext = new idocEmployee(dt.Rows[0]["empid"].ToString(), Client); } catch { } Program.LogonisOk = true; Close(); #endregion /* * if (dt != null && dt.Rows.Count > 0) * { * Program.UserContext = new idocEmployee(dt.Rows[0]["empid"].ToString(), Client); * Program.LogonisOk = Program.UserContext.UserPassword == tB_Password.Text; * * if (Program.LogonisOk) * { * Close(); * } * else * { * MessageBox.Show("Неправильний пароль"); * tB_Password.SelectAll(); * tB_Password.Focus(); * } * } * else * { * MessageBox.Show("Неправильний пароль"); * tB_Password.SelectAll(); * tB_Password.Focus(); * } */ }
public CustomersGridController(SourceGrid.Grid grid, FBClient client) { Client = client; Grid = grid; }
public idocDocument(FBClient client, string type) { Constructor("", client, type); }
public idocDocument(int key, FBClient client, string type) { Constructor(key.ToString(), client, type); }
public idocDocument(string key, FBClient client, string type) { Constructor(key, client, type); }
public idocOrderState(int key, FBClient client) : base(key, client, "idocOrderState") { }
public idocEmployee(int key, FBClient client) : base(key, client, "idocEmployee") { }
protected override void Constructor(string key, FBClient client, string type) { MainForm = new EmployeeForm(this); base.Constructor(key, client, type); }
public idocCustomer(FBClient client) : base("", client, "idocCustomer") { }
public idocCustomer(int key, FBClient client) : base(key, client, "idocCustomer") { }
public idocCustomer(string key, FBClient client) : base(key, client, "idocCustomer") { }
public OrderStatesGridController(SourceGrid.Grid grid, DataTable dt, string key, FBClient client) { Client = client; Grid = grid; }
public idocOrderState(FBClient client) : base("", client, "idocOrderState") { }
public idocEmployee(string key, FBClient client) : base(key, client, "idocEmployee") { }
public EmployeesGridController(SourceGrid.Grid grid, FBClient client) { Client = client; Grid = grid; }
public idocEmployee(FBClient client) : base("", client, "idocEmployee") { }
public idocWindowOrder(int key, FBClient client) : base(key, client, "idocWindowOrder") { }
public idocWindowOrder(FBClient client) : base("", client, "idocWindowOrder") { }
public idocOrderState(string key, FBClient client) : base(key, client, "idocOrderState") { }