Esempio n. 1
0
 public void Handle(KataAttemptAbandonedEvent message)
 {
     if (KataTimer == null)
     {
         return;
     }
     KataTimer.StopTimer();
     if (KataraiApp != null)
     {
         KataraiApp.SetAttemptAbandoned();
     }
 }
Esempio n. 2
0
        private void Bootstrap()
        {
            _kataraiApp = new KataraiApp();

            var mainWindow = Current.MainWindow as Views.MainWindow;

            if (mainWindow == null)
            {
                return;
            }

            var playerNotifier = GetPlayerNotifier(mainWindow);

            if (playerNotifier == null)
            {
                return;
            }

            _playerNotifier = playerNotifier;

            mainWindow.ViewModel.KataraiApp     = _kataraiApp;
            mainWindow.ViewModel.PlayerNotifier = _playerNotifier;

            _playerNotifier.DisplayMessage("Welcome to Katarai",
                                           "Katarai is a tool to help you do code katas. In this version the supported katas are Roy Osherove’s String Calculator kata." +
                                           "To the katas, select Practice from the System Tray menu – Katarai will open Visual Studio with a prepared solution to get you started and will track your progress as you code." +
                                           Environment.NewLine + Environment.NewLine +
                                           "Why is TDD important? It allows us to break the negative feedback loop and maintain a constant cost of change." +
                                           "Only by actively driving down the defects in our code are we able to deliver new functionality, and modify existing functionality with a reasonably constant cost of change." +
                                           Environment.NewLine + Environment.NewLine +
                                           "To configure Katarai’s options click Show Window in the System Tray menu." + Environment.NewLine +
                                           Environment.NewLine +
                                           "To view your previous kata attempt statistics, use the Statistics menu in the System Tray menu."
                                           );

            StartSplunkLogging();

            StartReminderTimer();
            StartMonitorTimer();
            StartGameMonitor();

            StartFileMonitor();
        }