private void add_Message(toolMessage toolMessage) { if (popMessages.IsOpen == false) { popMessages.IsOpen = true; } stackMessages.Children.Add(toolMessage); }
public void msgAnnulled(int NumberOfRecords) { toolMessage toolMessage = new toolMessage(toolMessage.msgType.msgAnnulled); toolMessage.longMessage = NumberOfRecords + " number of records Anulled."; toolMessage.btnClose_Click += toolMessage.closeMsgBox; add_Message(toolMessage); }
/// <summary> /// Warning messages are used when you have a non-fatal message for the user. /// Examples such as Validation, Out of Stock Messages, etc. /// </summary> /// <param name="msg">Warning Message</param> /// <remarks>Further Action should not be taken, until Warning is resolved.</remarks> public void msgWarning(string msg) { toolMessage toolMessage = new toolMessage(toolMessage.msgType.msgWarning); if (msg != string.Empty) { toolMessage.longMessage = msg; } toolMessage.btnClose_Click += toolMessage.closeMsgBox; add_Message(toolMessage); }
/// <summary> /// Error messages are used when you have a Fatal Error Message for the user. /// Examples such as Conexion Timeout, . /// </summary> /// <param name="err">System Error Message</param> /// <remarks>Further Action should not be taken, until Error is resolved.</remarks> public void msgError(Exception err, string string_msg = default(string)) { toolMessage popupMsg = new toolMessage(toolMessage.msgType.msgError); //popupMsg._ex = err; if (err != null) { popupMsg.longMessage = err.Message; } popupMsg.btnClose_Click += popupMsg.closeMsgBox; add_Message(popupMsg); }
private void remove_Message(toolMessage toolMessage) { stackMessages.Children.Remove(toolMessage); }
/// <summary> /// Question that needs User Input before code can continue. /// Simple Yes / No Buttons will appear. /// </summary> /// <param name="question">Question to be Asked.</param> /// <remarks>Questions should be writen in Simple Language. Use few words and clear meanings.</remarks> public void msgQuestion(string question) { toolMessage popupMsg = new toolMessage(toolMessage.msgType.msgQuestion); add_Message(popupMsg); }