private void Main_Load(object sender, EventArgs e) { Session s = sess_dao.getSession("login"); if (s.login_status.Equals(1) || s.save_login_status.Equals(1)) { home_button.BackColor = Color.Transparent; home_button_ascent.BackColor = Color.Transparent; home_icon.Enabled = false; home_label.Enabled = false; home_button.Enabled = false; feeds_button.BackColor = Color.FromArgb(255, 255, 255); feeds_button_ascent.BackColor = Color.FromArgb(33, 150, 243); showControl("feeds"); feeds_icon.Enabled = true; feeds_label.Enabled = true; feeds_button.Enabled = true; chat_icon.Enabled = true; chat_label.Enabled = true; chat_button.Enabled = true; profile_icon.Enabled = true; profile_label.Enabled = true; profile_button.Enabled = true; } else { home_button.BackColor = Color.FromArgb(255, 255, 255); home_button_ascent.BackColor = Color.FromArgb(33, 150, 243); feeds_icon.Enabled = false; feeds_label.Enabled = false; feeds_button.Enabled = false; chat_icon.Enabled = false; chat_label.Enabled = false; chat_button.Enabled = false; profile_icon.Enabled = false; profile_label.Enabled = false; profile_button.Enabled = false; hideControl(); showControl("home"); } }
private void Chat_Load(object sender, EventArgs e) { dataGridView1.ClearSelection(); constr = app_class.get_constr(); create_btn_pchat(); Session s = sess_dao.getSession("login"); if (s.login_email != "" || s.login_email != null) { sync_data(s.login_email); } load.Start(); }
private void Profile_Load(object sender, EventArgs e) { Session s = sess_dao.getSession("login"); if (s.login_status.Equals(1) || s.save_login_status.Equals(1)) { User u = user_dao.getUser(s.login_email); if (u != null) { label_user_bio.Text = u.bio; label_user_name.Text += u.name; label_user_email.Text += u.email; label_user_gender.Text += u.gender; label_user_dob.Text += u.dob.ToString().Substring(0, u.dob.ToString().IndexOf(" ")); login_user[0] = u.name; login_user[1] = u.email; login_user[2] = u.password; login_user[3] = u.bio; } } }