private bool EmptyFields(bool User, bool Pass) { if (User | Pass) { string Title = "Input Error"; string Text = "Fields Username and/or Password is empty. Enter your username and password"; StaticVariables.GetNewMessageWindow(this, Title, Text, Brushes.OrangeRed).ShowDialog(); return(false); } return(true); }
public void SendMessage(string From, string To, string MessageText, string MessageSubject, Window MainWindow) { Message = new MailMessage(From, To, MessageSubject, MessageText); try { SMTP.Send(Message); StaticVariables.GetNewMessageWindow(MainWindow, "Success", "Your email has been sent!", Brushes.GreenYellow).ShowDialog(); } catch (Exception E) { WindowCollection WC = MainWindow.OwnedWindows; StaticVariables.GetNewMessageWindow(MainWindow, "Sending Error", E.Message, Brushes.DarkRed).ShowDialog(); } }