private void HandleDragDrop(object sender, DragEventArgs e)
 {
     var data = e.Data.GetData(DataFormats.FileDrop);
     if (data != null && data is string[])
     {
         string[] filenames = data as string[];
         if (filenames.Length == 0)
             return;
         new Thread(() =>
         {
             var analyzer = new SvcAnalyzer();
             analyzer.Progress += HandleAnalyzerProgress;
             analyzer.Analyze(null, filenames);
             UpdateLabel("Done, waiting...");
         }).Start();
     }
 }
Ejemplo n.º 2
0
        private void HandleDragDrop(object sender, DragEventArgs e)
        {
            var data = e.Data.GetData(DataFormats.FileDrop);

            if (data != null && data is string[])
            {
                string[] filenames = data as string[];
                if (filenames.Length == 0)
                {
                    return;
                }
                new Thread(() =>
                {
                    var analyzer       = new SvcAnalyzer();
                    analyzer.Progress += HandleAnalyzerProgress;
                    analyzer.Analyze(null, filenames);
                    UpdateLabel("Done, waiting...");
                }).Start();
            }
        }
Ejemplo n.º 3
0
 static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         foreach (var filename in args)
         {
             if (!File.Exists(filename))
             {
                 Console.WriteLine("File " + filename + " does not exist");
                 return;
             }
         }
         var analyzer = new SvcAnalyzer();
         analyzer.Progress += HandleAnalyzerProgress;
         analyzer.Analyze(null, args);
     }
     else
     {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new SvcAnalyzerDropper());
     }
 }