private void FeedbackButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         FeedbackView pop = new FeedbackView();
         pop.WindowStartupLocation = WindowStartupLocation.CenterScreen;
         pop.Show();
     }
     catch (Exception exception)
     {
         ErrorViewModel.Save(exception, GetType(), additionalInformation: Logger.Instance.getLoggedMessages());
     }
 }
        /// <summary>
        /// hits when window is closed.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Closed(object sender, EventArgs e)
        {
            try
            {
                Logger.Instance.logMessage("main window closed.", LoggerEnum.message);
                PolicyViewModel.Instance.savePolicyToXml();
                var result = MessageBox.Show("Please help us improve the scoreboard, take a few minutes and submit some feedback to us. Can you spare a few minutes and send some feedback to us?", "Feedback wanted!", MessageBoxButton.YesNo);
                if (result == MessageBoxResult.Yes)
                {
                    FeedbackView pop = new FeedbackView();
                    pop.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    pop.ShowDialog();
                }
                Logger.Instance.logMessage("scoreboard closed", LoggerEnum.message);
                if (_WebServer != null)
                    _WebServer.Stop();

                ScoreboardCrashed.ClosedProperly();

                Application.Current.Shutdown();
            }
            catch (Exception exception)
            {
                ErrorViewModel.Save(exception, GetType(), additionalInformation: Logger.Instance.getLoggedMessages());
            }
        }