public frmTimKiem(IGuiTinNhan gui_tin_nhan) { InitializeComponent(); _guiTinNhan = gui_tin_nhan; ControlPlus.MovieFormWhenMouseDownControl(controlBoxFlat1, this.Handle); ControlPlus.MovieFormWhenMouseDownControl(controlBoxFlat1.lblFormText, this.Handle); panTimKiemThoiGianDangNhap.DataBindings.Add("Enabled", chkTimNguoiMoiDangNhap, "Checked"); _duLieuTimKiem = gui_tin_nhan.TaoDuLieuTimKiem(); foreach (var noio in _duLieuTimKiem.NoiO) { cbbNoiO.Items.Add(noio.Value); } foreach (var tinhtrang in _duLieuTimKiem.TinhTrangHonNhan) { cbbTinhTrangHonNhan.Items.Add(tinhtrang); } foreach (var gtinh in _duLieuTimKiem.GioiTinh) { cbbGioiTinh.Items.Add(gtinh.Value); } cbbTinhTrangHonNhan.DisplayMember = "TenTinhTrang"; cbbGioiTinh.SelectedIndex = 0; cbbNoiO.SelectedIndex = 0; cbbTinhTrangHonNhan.SetItemChecked(0, true); }
public void CaiDatTrang(TrangWeb trang) { _trang = trang; _db = new DatabaseManager(trang); for (int i = 0; i < _db.DanhSachNoiDung.Count; i++) { this.ThemNoiDung(_db.DanhSachTieuDe[i], _db.DanhSachNoiDung[i]); } if (_db.DanhSachNoiDung.Count == 0) { this.ThemNoiDung(); } Program.XayRaLoi += Program_XayRaLoi; thongTinTaiKhoan_GuiBindingSource.DataSource = _db.DanhSachNguoiGui; thongTinTaiKhoan_TimKiemBindingSource.DataSource = _db.DanhSachNguoiNhan; grbTimKiem.Text = _db.PhienTimKiem; lblSoLuongKetQua.Text = string.Format("Số lượng kết quả: {0}", thongTinTaiKhoan_TimKiemBindingSource.Count); switch (trang) { case TrangWeb.WebTreTho: _guiTinNhan = new GuiTinNhanWebTreTho(); break; } }
public void CaiDatTrang(TrangWeb trang) { _trang = trang; _db = new DatabaseManager(trang); for (int i = 0; i < _db.DanhSachNoiDung.Count; i++) { this.ThemNoiDung(_db.DanhSachTieuDe[i], _db.DanhSachNoiDung[i]); } if (_db.DanhSachNoiDung.Count == 0) { this.ThemNoiDung(); } Program.XayRaLoi += Program_XayRaLoi; thongTinTaiKhoan_GuiBindingSource.DataSource = _db.DanhSachNguoiGui; thongTinTaiKhoan_TimKiemBindingSource.DataSource = _db.DanhSachNguoiNhan; grbTimKiem.Text = _db.PhienTimKiem; lblSoLuongKetQua.Text = string.Format("Số lượng kết quả: {0}", thongTinTaiKhoan_TimKiemBindingSource.Count); switch (trang) { case TrangWeb.HenHo2: _guiTinNhan = new HenHo2(); break; case TrangWeb.DuyenSo: _guiTinNhan = new DuyenSo(); radCheDo2.Checked = true; this.AnTieuDe(); break; case TrangWeb.VietNamCupid: _guiTinNhan = new VietNamCupid(); break; case TrangWeb.LikeYou: _guiTinNhan = new LikeYou(); this.AnTieuDe(); break; case TrangWeb.HenHoKetBan: _guiTinNhan = new HenHoKetBan(); break; case TrangWeb.TimBanGai: _guiTinNhan = new TimBanGai(); break; case TrangWeb.eHenHo: _guiTinNhan = new ehenho(); (_guiTinNhan as ehenho).TimThayKetQua += (danh_sach) => { _danhSach = new BindingList <ThongTinTaiKhoan>(danh_sach.ToList()); XuLyDaLuong.ChangeText(lblSoLuongKetQua, $"Số lượng kết quả: {_danhSach.Count}", Color.Black); }; break; } }
public FormTimKiem(IGuiTinNhan gui_tin_nhan, DatabaseManager db) { InitializeComponent(); _guiTinNhan = gui_tin_nhan; _db = db; }
public static void DangNhap(this ThongTinTaiKhoan tk, IGuiTinNhan thaotacweb) { thaotacweb.DangNhap(ref tk); }
public static async Task DangNhapAsync(this ThongTinTaiKhoan tk, IGuiTinNhan thaotacweb) { await thaotacweb.DangNhapAsync(tk); }