private void buttonBar1_ItemClick(object sender, Janus.Windows.ButtonBar.ItemEventArgs e) { if (e.Item.Key == "itNhapGiaoHo") { frmGiaoHo frm = new frmGiaoHo(); ShowForm(frm); } else if (e.Item.Key == "itNhapGiaoDan") { frmGiaoDanList frm = new frmGiaoDanList(); ShowForm(frm); } else if (e.Item.Key == "itNhapGiaDinh") { frmGiaDinhList frm = new frmGiaDinhList(); ShowForm(frm); } else if (e.Item.Key == "itNhapGiaoXu") { frmGiaoXu frm = new frmGiaoXu(); ShowForm(frm); } else if (e.Item.Key == "itSoBiTich") { frmDotBiTichList frm = new frmDotBiTichList(); ShowForm(frm); } else if (e.Item.Key == "itThongKeChung") { frmThongKeChung frm = new frmThongKeChung(); ShowForm(frm); } else if (e.Item.Key == "itLuuTruGiaoDan") { frmGiaoDanLuuTruList frm = new frmGiaoDanLuuTruList(); ShowForm(frm); } else if (e.Item.Key == "itLuuTruGiaDinh") { frmGiaDinhLuuTruList frm = new frmGiaDinhLuuTruList(); ShowForm(frm); } else if (e.Item.Key == "itTimGiaoDan") { frmTimGiaoDan.ShowDialog(); } else if (e.Item.Key == "itTimGiaDinhCuaGiaoDan") { frmTimGiaDinh.ShowDialog(); } else if (e.Item.Key == "itTimThayThe") { frmReplace.ShowDialog(); } else if (e.Item.Key == "itKiemTraGiaoDan") { frmKiemTraGiaoDanList frm = new frmKiemTraGiaoDanList(); ShowForm(frm); } else if (e.Item.Key == "itKiemTraGiaDinh") { frmKiemTraGiaDinhList frm = new frmKiemTraGiaDinhList(); ShowForm(frm); } }
private void LoadFunction(string key) { if (key == "itNhapGiaoHo") { frmGiaoHo frm = new frmGiaoHo(); ShowForm(frm); } else if (key == "itNhapGiaoDan") { frmGiaoDanList frm = new frmGiaoDanList(); ShowForm(frm); } else if (key == "itNhapGiaDinh") { frmGiaDinhList frm = new frmGiaDinhList(); ShowForm(frm); } else if (key == "itNhapGiaoXu") { frmGiaoXu frm = new frmGiaoXu(); ShowForm(frm); } else if (key == "itSoBiTich") { frmDotBiTichList frm = new frmDotBiTichList(); ShowForm(frm); } else if (key == "itThongKeChung") { frmThongKeChung frm = new frmThongKeChung(); ShowForm(frm); } else if (key == "itLuuTruGiaoDan") { frmGiaoDanLuuTruList frm = new frmGiaoDanLuuTruList(); ShowForm(frm); } else if (key == "itLuuTruGiaDinh") { frmGiaDinhLuuTruList frm = new frmGiaDinhLuuTruList(); ShowForm(frm); } else if (key == "itTimGiaoDan") { frmTimGiaoDan.ShowDialog(); } else if (key == "itTimGiaDinhCuaGiaoDan") { frmTimGiaDinh.ShowDialog(); } else if (key == "itTimThayThe") { frmReplace.ShowDialog(); } else if (key == "itKiemTraGiaoDan") { frmKiemTraGiaoDanList frm = new frmKiemTraGiaoDanList(); ShowForm(frm); } else if (key == "itKiemTraGiaDinh") { frmKiemTraGiaDinhList frm = new frmKiemTraGiaDinhList(); ShowForm(frm); } else if (key == "itKiemTraPhienBan") { GxCheckVersion checkVersion = new GxCheckVersion(); checkVersion.Alert = true; checkVersion.OnFinished += new EventHandler(checkVersion_OnFinished); checkVersion.Execute(); } else if (key == "itAboutUs") { frmAbout frm = new frmAbout(); frm.ShowDialog(); } else if (key == "itGopY") { //frmGopY frm = new frmGopY(); //frm.ShowDialog(); try { //System.Diagnostics.Process.Start(Memory.AppPath + "HuongDan.Doc"); if (Memory.IsConnectionAvailable()) { frmHelp frmHelp = new frmHelp(); string helpKey = "http://forum.qlgx.net/gopy"; ShowThongTinOnline(helpKey, true); } else { MessageBox.Show("Bạn không có kết nối internet, vì thế không sử dụng được chức năng này. Bạn có thể liên hệ với tác giả qua email " + GxConstants.EMAIL + "\n Xin chân thành cảm ơn!"); } } catch (Exception) { } } else if (key == "itHuongDan") { menuItem10_Click(this, EventArgs.Empty); } else if (key == "itRaoHonPhoi") { frmRaoHonPhoiList frm = new frmRaoHonPhoiList(); ShowForm(frm); } else if (key == "itChuanHoaDuLieuGiaoDan") { chuanHoaDuLieu(ProcessOptions.AutoUpperFirstCharGiaoDan); } else if (key == "itChuanHoaDuLieuGiaDinh") { chuanHoaDuLieu(ProcessOptions.AutoUpperFirstCharGiaDinh); } else if (key == "itChuyenHoGiaoDan") { frmChuyenHoGiaoDan frm = new frmChuyenHoGiaoDan(); ShowForm(frm); } else if (key == "itChuyenHoGiaDinh") { frmChuyenHoGiaDinh frm = new frmChuyenHoGiaDinh(); ShowForm(frm); } else if (key == "itGiaoLy") { GiaoLy.frmKhoiGiaoLyList frm = new GiaoLy.frmKhoiGiaoLyList(); ShowForm(frm); } else if (key == "itThongTinOnline") { //Check message from website start if (Memory.IsConnectionAvailable()) { GxKiemTraThongBao kiemTraThongBao = new GxKiemTraThongBao(); kiemTraThongBao.OnFinished += new EventHandler(kiemTraThongBao_OnFinished1); ThreadStart threadStart = new ThreadStart(kiemTraThongBao.Execute); Thread thread = new Thread(threadStart); thread.Start(); } else { MessageBox.Show("Bạn không có kết nối internet", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } //Check message from website end } else if (key == "itLapBiTichTuDong") { frmTaoDotBiTich frm = new frmTaoDotBiTich(); frm.ShowDialog(); } else if (key == "itBieuDo") { frmBieuDo frm = new frmBieuDo(); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); } }