/// <summary> /// 询问提示提示 /// </summary> /// <param name="txtMessage"></param> /// <param name="txtTitle"></param> /// <returns></returns> public static DialogResult ShowBoxIf(string txtMessage) { newMessageBox = new YKMessageBox(); newMessageBox.Text = "删除确认"; newMessageBox.lblMessage.Text = txtMessage; return(newMessageBox.ShowDialog()); }
/// <summary> /// 提示内容及标题 /// </summary> /// <param name="txtMessage"></param> /// <param name="txtTitle"></param> /// <returns></returns> public static void ShowBox(string txtMessage, string txtTitle) { newMessageBox = new YKMessageBox(); newMessageBox.Text = txtTitle; newMessageBox.lblMessage.Text = txtMessage; newMessageBox.btnCancel.Visible = false; newMessageBox.ShowDialog(); }
/// <summary> /// 提示异常内容 /// </summary> /// <param name="txtMessage"></param> /// <returns></returns> public static void ShowBoxException(string txtMessage, Exception ex) { _ex = ex; newMessageBox = new YKMessageBox(); newMessageBox.Text = "异常错误"; newMessageBox.lblMessage.Text = txtMessage; newMessageBox.btnCancel.Visible = false; newMessageBox.btnSent.Visible = true; newMessageBox.ShowDialog(); }
/// <summary> /// 删除提示 /// </summary> /// <param name="txtMessage"></param> /// <param name="txtTitle"></param> /// <returns></returns> public static DialogResult ShowBoxDel(string txtMessage) { newMessageBox = new YKMessageBox(); newMessageBox.Text = "删除确认"; if (string.IsNullOrEmpty(txtMessage)) { txtMessage = "确认要删除本条记录吗?"; } newMessageBox.lblMessage.Text = txtMessage; return(newMessageBox.ShowDialog()); }
private void tstxtTopN_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) { if (tstxtTopN.Text.Trim().Length == 0) { YKMessageBox.ShowBox("请输入要显示的条数!"); return; } if (!FZYK.Com.YKPageValidate.IsNumber(tstxtTopN.Text.Trim())) { YKMessageBox.ShowBox("输入必须是正整数!"); return; } _topN = Convert.ToInt32(tstxtTopN.Text.Trim()); tsbtnShowTop.Text = "显示前" + _topN + "行"; FZYK.Com.YKFileOperate.IniWriteValue("SearchTopN", "SearchTopN", _topN.ToString()); ShowTopN(); } }