예제 #1
0
        private void listLeft_ItemActivate(object sender, EventArgs e)
        {
            if (listLeft.SelectedItems.Count < 1) { return; }

            for (int i = 0; i < listLeft.Items.Count; i++)
                listLeft.Items[i].Font = new Font("Microsoft Sans Serif", 11, FontStyle.Regular);
            listLeft.SelectedItems[0].Font = new Font("Microsoft Sans Serif", 11, FontStyle.Bold);
            listLeft.SelectedItems[0].Focused = false;

            splitP.Panel2.Controls.Clear();
            Form frm = new Form();

            switch(listLeft.SelectedItems[0].Text)
            {
                case "Trang chủ":
                    frm = new Home();
                    break;
                case "vieclam24h (Tìm việc)":
                    frm = new frmVieclam24TimViec();
                    break;
                case "vieclam24h (NTD)":
                    frm = new frmVieclam24hNTD();
                    break;
                case "thongtincongty.com":
                    frm = new frmThongTinCongTy();
                    break;
                case "ctyvietnam.com":
                    frm = new frmCtyvietnam();
                    break;
                case "danhbadoanhnghiep.vn":
                    frm = new frmDanhbadoanhnghiep();
                    break;
                case "thuongmai.vn":
                    frm = new frmThuongMaiVN();
                    break;
                case "trangvangvietnam.com":
                    frm = new frmTrangVangVN();
                    break;
                case "vieclam.tv (Tìm việc làm)":
                    frm = new frmVieclamtvTimViec();
                    break;
                case "vieclam.tv (Ứng viên)":
                    frm = new frmVieclamtvUngVien();
                    break;
                case "vieclam.tv (NTD)":
                    frm = new frmVieclamtvNTD();
                    break;
            }

            if (string.IsNullOrEmpty(frm.Name)) { return; }
            listLeft.SelectedItems[0].Selected = false;
            Application.DoEvents();

            frm.TopLevel = false;
            splitP.Panel2.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock = DockStyle.Fill;
            frm.Show();
        }
예제 #2
0
        private void frmMain_Shown(object sender, EventArgs e)
        {
            Form frm =  new Home();
            frm.TopLevel = false;
            splitP.Panel2.Controls.Clear();
            splitP.Panel2.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock = DockStyle.Fill;
            frm.Show();

            Application.DoEvents();
            CheckUpdate();
        }