public void sendFromTinycad(string currentFile, string directory) { String tempList = null; double matchP = 0.0; ///gets from tinycad, the current schematic file and directory /// //readAllTinyCadNetlistFiles(directory); if (currentFile.Length < 2) { //MessageBox.Show("Null"); return; } //MessageBox.Show(String.Concat("File is ", currentFile, "\tDirectory = ", System.IO.Path.GetFullPath(directory))); //String currentFileName = currentFile.Split(new char [] {'\\'}); String currentFileName = currentFile.Replace(".dsn", ".net"); String currentDirName = System.IO.Path.GetFullPath(directory); readAllTinyCadNetlistFiles(currentDirName); //MessageBox.Show("returned from readAllTiny.."); for (int i = 0; i < namesFiles.Count; i++) { if (currentFileName != namesFiles[i]) { matchP = matchPercent(namesFiles[i], currentFileName); //MessageBox.Show("returned from matchPercent"); percentages.Add(matchP); tempList = String.Concat(tempList, namesFiles[i], " -> match = ", matchP.ToString(), "\n"); names.Add(namesFiles[i]); } } MessageLogWindow mlw = new MessageLogWindow(tempList, names, percentages); mlw.Show(); }
public void sendFromTinycad(string currentFile, string directory) { String tempList = null; double matchP = 0.0; ///gets from tinycad, the current schematic file and directory /// //readAllTinyCadNetlistFiles(directory); if (currentFile.Length < 2) { //MessageBox.Show("Null"); return; } //MessageBox.Show(String.Concat("File is ", currentFile, "\tDirectory = ", System.IO.Path.GetFullPath(directory))); //String currentFileName = currentFile.Split(new char [] {'\\'}); String currentFileName = currentFile.Replace(".dsn",".net"); String currentDirName = System.IO.Path.GetFullPath(directory); readAllTinyCadNetlistFiles(currentDirName); //MessageBox.Show("returned from readAllTiny.."); for (int i = 0; i < namesFiles.Count; i++) { if (currentFileName != namesFiles[i]) { matchP = matchPercent(namesFiles[i], currentFileName); //MessageBox.Show("returned from matchPercent"); percentages.Add(matchP); tempList = String.Concat(tempList, namesFiles[i], " -> match = ", matchP.ToString(), "\n"); names.Add(namesFiles[i]); } } MessageLogWindow mlw = new MessageLogWindow(tempList,names,percentages); mlw.Show(); }