Ejemplo n.º 1
0
    static bool CompileTable(string path, out bool hasDoneCompile)
    {
        hasDoneCompile = false;
        var excelName = Path.GetFileNameWithoutExtension(path);

        if (cachedEntityInfos == null)
        {
            FlushTableAttrInfo();
        }
        var entityInfo = cachedEntityInfos.Find(
            i => i.EntityName.Equals(Config.EntityPrefix + excelName)
            );
        TableCompiler compiler = new TableCompiler(path);

        if (compiler.NeedCompile(entityInfo))
        {
            compiler.Compile();
            if (!compiler.CompileSuccess)
            {
                foreach (var msg in compiler.ErrorMessage)
                {
                    Debug.LogError(msg);
                }
                return(false);
            }
            Debug.Log(string.Format("Cmopiled table {0}", excelName));
            hasDoneCompile = true;
        }
        return(true);
    }
Ejemplo n.º 2
0
        /// <summary>
        /// 終了する
        /// </summary>
        public void End()
        {
            this.isOver = true;

            // Workerを開放する
            this.refreshSpellOverlaysWorker?.Stop();
            this.refreshTickerOverlaysWorker?.Stop();
            this.detectLogsWorker?.Abort();
            this.syncHotbarWorker?.Abort();

            this.refreshSpellOverlaysWorker  = null;
            this.refreshTickerOverlaysWorker = null;
            this.detectLogsWorker            = null;
            this.syncHotbarWorker            = null;

            this.backgroudWorker?.Stop();
            this.backgroudWorker?.Dispose();
            this.backgroudWorker = null;

            // ログバッファを開放する
            if (this.LogBuffer != null)
            {
                this.LogBuffer.Dispose();
                this.LogBuffer = null;
            }

            // Windowを閉じる
            SpellsController.Instance.ClosePanels();
            TickersController.Instance.CloseTelops();
            SpellsController.Instance.ExecuteClosePanels();
            TickersController.Instance.ExecuteCloseTelops();

            // 設定を保存する
            Settings.Default.Save();
            Settings.Default.DeInit();

            SpellPanelTable.Instance.Save();
            SpellTable.Instance.Save();
            TickerTable.Instance.Save();
            TagTable.Instance.Save();

            // サウンドコントローラを停止する
            SoundController.Instance.End();

            // テーブルコンパイラを停止する
            TableCompiler.Instance.End();
            TableCompiler.Free();

            // FFXIVのスキャンを停止する
            XIVPluginHelper.Instance.End();
            XIVPluginHelper.Free();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 終了する
        /// </summary>
        public void End()
        {
            this.isOver = true;

            // 戦闘分析を開放する
            CombatAnalyzer.Default.Denitialize();

            // Workerを開放する
            this.refreshSpellOverlaysWorker?.Stop();
            this.refreshTickerOverlaysWorker?.Stop();
            this.detectLogsWorker?.Abort();

            this.refreshSpellOverlaysWorker  = null;
            this.refreshTickerOverlaysWorker = null;
            this.detectLogsWorker            = null;

            this.backgroudWorker?.Stop();
            this.backgroudWorker?.Dispose();
            this.backgroudWorker = null;

            // ログバッファを開放する
            if (this.LogBuffer != null)
            {
                this.LogBuffer.Dispose();
                this.LogBuffer = null;
            }

            // Windowを閉じる
            SpellsController.Instance.ClosePanels();
            TickersController.Instance.CloseTelops();
            SpellsController.Instance.ExecuteClosePanels();
            TickersController.Instance.ExecuteCloseTelops();

            // 設定を保存する
            Settings.Default.Save();
            SpellTimerTable.Instance.Save();
            OnePointTelopTable.Instance.Save();

            // サウンドコントローラを停止する
            SoundController.Instance.End();

            // テーブルコンパイラを停止する
            TableCompiler.Instance.End();
            TableCompiler.Free();

            // FFXIVのスキャンを停止する
            FFXIVPlugin.Instance.End();
            FFXIVPlugin.Free();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 開始する
        /// </summary>
        public void Begin()
        {
            this.isOver = false;

            // FFXIVのスキャンを開始する
            FFXIVPlugin.Initialize();
            FFXIVPlugin.Instance.Start();

            // ログバッファを生成する
            this.LogBuffer = new LogBuffer();

            // テーブルコンパイラを開始する
            TableCompiler.Initialize();
            TableCompiler.Instance.Begin();

            // 戦闘分析を初期化する
            CombatAnalyzer.Default.Initialize();

            // サウンドコントローラを開始する
            SoundController.Instance.Begin();

            // Overlayの更新スレッドを開始する
            this.BeginOverlaysThread();

            // ログ監視タイマを開始する
            this.detectLogsWorker = new ThreadWorker(() =>
            {
                this.DetectLogsCore();
            },
                                                     0,
                                                     nameof(this.detectLogsWorker));

            // Backgroudスレッドを開始する
            this.backgroudWorker           = new System.Timers.Timer();
            this.backgroudWorker.AutoReset = true;
            this.backgroudWorker.Interval  = 5000;
            this.backgroudWorker.Elapsed  += (s, e) =>
            {
                this.BackgroundCore();
            };

            this.detectLogsWorker.Run();
            this.backgroudWorker.Start();
        }
Ejemplo n.º 5
0
 public SheetCompiler(ISheet sheet, TableCompiler compiler)
 {
     _sheet         = sheet;
     _tableCompiler = compiler;
 }