Example #1
0
        static void Main(string[] args)
        {
            var input = args?.AsEnumerable() ?? Enumerable.Empty <string>();

            FileInfo?inputFile = null;

            if (input.Any() && input.First() is { } path&& path.Contains("."))
            {
                inputFile = new FileInfo(path);
                input     = input.Skip(1);
            }

            if (inputFile == null)
            {
                ui.GetFile(MigotoData.D3DX, MigotoData.D3DX, inputFile, out inputFile);
            }

            loadedData.GetColumnSelection(input);

            if (inputFile != null)
            {
                if (inputFile.Extension == MigotoData.D3DX)
                {
                    if (GetD3DXPath(inputFile, out inputFile))
                    {
                        loadedData.GetMetadata(inputFile);
                    }
                }
                else if (inputFile.Extension == FrameAnalysis.Extension && GetValidLog(inputFile, out inputFile))
                {
                    OutputLog(loadedData, inputFile);
                    LogFunctions(inputFile);
                    return;
                }
            }

            while (ui.GetInfo("mode of operation", out var func))
            {
                switch (func.ToLower())
                {
                case "manual":
                    if (GetValidLog(null, out var logFile) && logFile != null)
                    {
                        LogFunctions(logFile);
                    }
                    break;

                case "auto":
                    if (GetD3DXPath(inputFile, out inputFile))
                    {
                        WatchFolder(inputFile);
                    }
                    break;
                }
            }
        }