public static void CauseError(string msg, string button, ErrorButtonCallback cb)
        {
            errorMessage handler = new errorMessage();

            handler.Error(msg);
            handler.ShowButton(button, cb);
            handler.ShowDialog();
        }
        public static void CauseError(string msg, string title, string firstButton, string secondButton,
                                      ErrorButtonCallback cb)
        {
            errorMessage handler = new errorMessage();

            handler.Error(msg);
            handler.ShowButton(secondButton, cb);
            handler.ChangeFirstButton(firstButton);
            handler.ChangeTitle(title);
            handler.ShowDialog();
        }
 public void ShowButton(string buttonText, ErrorButtonCallback callback)
 {
     errorbutton.Visibility = Visibility.Visible;
     errorbutton.Content    = buttonText;
     cb = callback;
 }