Esempio n. 1
0
 private void _addToolButton_Click(object sender, EventArgs e)
 {
     using (var extAdder = new FileExtensionAdder())
     {
         var dialogRes = extAdder.ShowDialog(this);
         if (dialogRes != DialogResult.OK)
         {
             var fileExt = extAdder.GetFileExtension();
             var fileProvider = new FileProvider();
             var persister = new FileExtensionPersister(fileProvider);
             persister.SaveFileExtensions(fileExt);
         }
     }
 }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            var logger = LogManager.GetCurrentClassLogger();
            logger.Trace("Main():");
            for (var i = 0; i < args.Length; i++)
                logger.Trace(string.Format("  {0}: {1}", i, args[i]));

            var processExecuter = new ProcessExecuter();
            var messageDisplayer = new FormDisplayer();
            var fileProvider = new FileProvider();
            var fileExtPersister = new FileExtensionPersister(fileProvider);
            var fileExtLocator = new FileExtensionLocator(fileExtPersister, new BuiltInFileExtensions());
            var clp = new CommandLineParser(processExecuter, messageDisplayer, fileExtLocator);
            clp.Parse(args);
        }