コード例 #1
0
 public void AddBattleWatcher(BattleWatcher watcher)
 {
     Watcher    = watcher;
     Combatants = new Dictionary <string, CombatantFightInfo>();
     if (Visible)
     {
         Watcher.OnBattleEndEvent    += OnBattleEndEvent;
         Watcher.OnBattleUpdateEvent += OnBattleUpdateEvent;
     }
     overlayFlowLayoutPanel.FlowDirection = FlowDirection.TopDown;
 }
コード例 #2
0
        private void FileUploadButton_Click(object sender, EventArgs e)
        {
            if (logFileUploadDialog.ShowDialog() == DialogResult.OK)
            {
                SetUploadFileName(logFileUploadDialog.SafeFileName);
                CharacterName       = GetCharacterName(logFileUploadDialog.SafeFileName);
                _overlay.PlayerName = CharacterName;

                FileWatcher fileWatcher       = new FileWatcher(logFileUploadDialog.FileName, logFileUploadDialog.SafeFileName);
                Thread      fileWatcherThread = new Thread(() => fileWatcher.Start());
                fileWatcherThread.Start();

                BattleWatcher battleWatcher       = new BattleWatcher(fileWatcher, CharacterName);
                Thread        battleWatcherThread = new Thread(() => battleWatcher.Start());
                battleWatcherThread.Start();

                PetWatcher petWatcher       = new PetWatcher(fileWatcher, battleWatcher, CharacterName);
                Thread     petWatcherThread = new Thread(() => petWatcher.Start());
                petWatcherThread.Start();

                _overlay.AddBattleWatcher(battleWatcher);
            }
        }