コード例 #1
0
ファイル: SharpTuner.cs プロジェクト: maraudingeats/SharpTune
 public void PopulateAvailableDevices()
 {
     AvailableDevices = new AvailableDevices();
     if (Directory.Exists(Settings.Default.EcuFlashDefRepoPath) && (Directory.GetDirectories(Settings.Default.EcuFlashDefRepoPath).Length > 0 || Directory.GetFiles(Settings.Default.EcuFlashDefRepoPath).Length < 1))
     {
         Trace.WriteLine("Loading definitions from: " + Settings.Default.EcuFlashDefRepoPath);
         AvailableDevices.Populate(Settings.Default.EcuFlashDefRepoPath);
     }
     else
     {
         if (!Directory.Exists(Settings.Default.EmbeddedDefRepoPath))
         {
             Directory.CreateDirectory(Settings.Default.EmbeddedDefRepoPath);
         }
         if (Directory.GetFiles(Settings.Default.EmbeddedDefRepoPath).Length < 1)
         {
             CopyEmbeddedDefs();
         }
         Trace.WriteLine("Loading definitions from: " + Settings.Default.EmbeddedDefRepoPath);
         AvailableDevices.Populate(Settings.Default.EmbeddedDefRepoPath);
     }
 }