Esempio n. 1
0
        public void ParseLogFile(FileInfo fileInfo)
        {
            try
            {
                _messageBus.SendMessage(new LogMessage($"Start parsing {fileInfo.Name}"));

                var sharedValues = _localLogParserFactory().ParseLog(fileInfo.FullName);
                var herosLog     = new EncounterLog(sharedValues.Target, null, fileInfo.FullName);
                _logFileConverter.ConvertLog(herosLog, sharedValues);
                _messageBus.SendMessage(new NewEncounterMessage(herosLog));
                _messageBus.SendMessage(new LogMessage($"Finished parsing {fileInfo.Name}"));

                if (bool.Parse(Settings.Default.UseRaidHeros))
                {
                    _messageBus.SendMessage(new LogMessage($"Creating Html for {fileInfo.Name}"));
                    Task.Run(() =>
                    {
                        _htmlFileWatcherFactory().CreateRaidHerosFile(herosLog);
                    });
                }
            }
            catch (Exception exception)
            {
                _messageBus.SendMessage(new LogMessage(exception.ToString()));
            }
        }
Esempio n. 2
0
 public EncounterReportForm(EncounterLog log, Encounter enc)
 {
     this.InitializeComponent();
     Application.Idle += new EventHandler(this.Application_Idle);
     this.fReport      = log.CreateReport(enc, true);
     this.fEncounter   = enc;
     if (this.fEncounter.MapID == Guid.Empty)
     {
         this.ReportBtn.DropDownItems.Remove(this.ReportMovement);
     }
     this.update_report();
     this.update_mvp();
 }