Esempio n. 1
0
 private static void HandleEvent(KillSwitchEvent killSwitchEvent, ISession session)
 {
     if (killSwitchEvent.RequireStop)
     {
         Logger.Write(killSwitchEvent.Message, LogLevel.Warning);
         Logger.Write(session.Translation.GetTranslation(TranslationString.RequireInputText), LogLevel.Warning);
     }
     else
         Logger.Write(killSwitchEvent.Message, LogLevel.Info, ConsoleColor.White);
 }
Esempio n. 2
0
 private void HandleEvent(KillSwitchEvent killSwitchEvent, ISession session)
 {
     Logger.Write($"KillSwitch: {killSwitchEvent.Message}. ShouldStop: {killSwitchEvent.RequireStop} ", LogLevel.Warning);
     if (killSwitchEvent.RequireStop)
     {
         this.gui.UIThread(() =>
         {
             this.gui.pause($"KillSwitch: {killSwitchEvent.Message}.");
         });
     }
 }