Пример #1
0
        static void Main(string[] args)
        {
            var config = Loader.Load() ?? new Config();

            var path = new EditableString
            {
                Value = config.LastPath ?? string.Empty
            };

            path.Input("Enter path to data");

            config.LastPath = path.Value;
            Loader.Save(config);

            var logic = new CommandLineLogic(config, path.Value);

            logic.Run();
        }
Пример #2
0
        static void Main(string[] args)
        {
            var config = Loader.Load() ?? new Config();

            var fbd = new FolderBrowserDialog {
                SelectedPath = config.LastPath ?? string.Empty
            };

            if (fbd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            config.LastPath = fbd.SelectedPath;
            Loader.Save(config);

            var logic = new CommandLineLogic(config, fbd.SelectedPath);

            logic.Run();
        }