예제 #1
0
        static void Main(string[] args) => Source.LogError(() =>
        {
            if (args.Length <= 0)
            {
                return;
            }

            _ = Logger.ObserveTaskException();
            Source.LogInfo(Source.Assembly);
            Source.LogInfo($"[ {args.Join(" ")} ]");

            var ss = new SettingFolder();
            ss.Load();

            if (ss.Value.AlphaFS)
            {
                Io.Configure(new AlphaFS.IoController());
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var src  = new Request(args);
            var view = new ProgressWindow();

            switch (src.Mode)
            {
            case Mode.Compress:
                Show(view, new CompressViewModel(src, ss));
                break;

            case Mode.Extract:
                if (IsBurst(src, ss))
                {
                    Burst(src);
                }
                else
                {
                    Show(view, new ExtractViewModel(src, ss));
                }
                break;

            default:
                break;
            }
        });