public void ShowHelp(string helpKey) { frmHelp frm = new frmHelp(); frm.SetHelp(helpKey); ShowForm(frm); }
public void OnUpdateFinished(object sender, EventArgs e) { try { if (Program.frmMain.InvokeRequired) { EventHandler d = new EventHandler(OnUpdateFinished); Program.frmMain.Invoke(d, new object[] { sender, e }); } else { Program.frmMain.Enabled = true; frmHelp frm = new frmHelp(); frm.SetHelp("thong_tin_cap_nhat"); frm.WindowState = FormWindowState.Normal; frm.Show(); Program.frmMain.ShowHelp("thong_tin_cap_nhat"); } } catch { } }
private void ShowThongTinOnline(string message, bool showMessage) { try { if (message.Trim() != "") { frmHelp frm = new frmHelp(); frm.AllowShowMessage = false; if (frm.SetHelp(message)) { ShowForm(frm, false); } } else { if (showMessage) { MessageBox.Show("Không có thông tin nào", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception) { } }
private void menuItem10_Click(object sender, EventArgs e) { try { //System.Diagnostics.Process.Start(Memory.AppPath + "HuongDan.Doc"); frmHelp frmHelp = new frmHelp(); string helpKey = "index"; foreach (Control frm in FATabStrip.SelectedItem.Controls) { if (frm is frmBase && !(frm is frmHelp)) { helpKey = (frm as frmBase).HelpKey; break; } } frmHelp.SetHelp(helpKey); frmHelp.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Lỗi Exception (frmMain, menuItem10_Click)", MessageBoxButtons.OK, MessageBoxIcon.Error); } }