private void addDataFile() { string brainRoot = outputText.Text + "/BrainResult"; foreach (string deviceFolder in Directory.GetFileSystemEntries(brainRoot)) { foreach (string orderID in Directory.GetFileSystemEntries(deviceFolder)) { WriteFile wfile = new WriteFile(orderID); wfile.BrainToNBrain(); } } }
public ArrayList listAllOrder() { ArrayList pathes = new ArrayList(); string r_p = userChoosePath + "/" + rootFolder; foreach (string fname in Directory.GetFileSystemEntries(r_p)) { foreach (string lname in Directory.GetFileSystemEntries(fname)) { string cli = lname + "/Client.txt"; if (File.Exists(cli)) { WriteFile wFile = new WriteFile(lname); JSONObject item = wFile.readClient(); pathes.Add(item); } } } return pathes; }
public ArrayList listAllOrder() { ArrayList pathes = new ArrayList(); string r_p = userChoosePath + "/" + rootFolder; foreach (string fname in Directory.GetFileSystemEntries(r_p)) { foreach (string lname in Directory.GetFileSystemEntries(fname)) { string cli = lname + "/Client.txt"; if (File.Exists(cli)) { WriteFile wFile = new WriteFile(lname); JSONObject item = wFile.readClient(); pathes.Add(item); } } } return(pathes); }
private void setRange(ArrayList fr, ArrayList lr, ArrayList nr) { this.fDataes = fr; this.lDataes = lr; this.nDataes = nr; WriteFile writeFile = new WriteFile(outPath); writeFile.FFTQuery(WriteFile.FFTResultFile, WriteFile.FFT , nr, fr, lr); writeFile.FFTQuery(WriteFile.NormResultFile, WriteFile.FFTNorm, nr, fr, lr); }
private void stopTimer() { stopWorker(); time = 0; brainReceiver.stop(); if (!configManager.getIsTest()) { ChromeUtils.closeChrome(); this.Close(); ShowExDialog.show("第三步、測試單字", Properties.Resources.test); DoTest doTest = new DoTest(configManager); doTest.Show(); doTest.Location = new Point(0, 0); ChromeUtils.openChrome(ChromeUtils.testURL + configManager.getOrderID()); } else { WindowsMediaPlayer newMedia = new WindowsMediaPlayer(); newMedia.URL = @"sound.mp3"; newMedia.controls.play(); if (configManager.getIsClient()) { WriteFile writeFile = new WriteFile(this.runPath); writeFile.clientSave(configManager); this.Close(); BrainChart view = new BrainChart(this.runPath,false,true); view.Show(); } else { HttpWorker httpWorker = new HttpWorker(HttpWorker.orderFinish, httpResponse); JSONObject form = new JSONObject(); form.setString("orderID", configManager.getOrderID()); httpWorker.setData(form); httpWorker.httpWorker(); WaitDialog.show(); } } }
private void sectionReciver(ArrayList sectionList) { string over_time = DateTime.Now.ToString("yyyy/MM/dd/ HH:mm:ss"); WriteFile writeFile = new WriteFile(runPath); writeFile.NoFFTWrite(sectionList, over_time); ArrayList fft_resource = FFTList(sectionList); writeFile.FFTWrite(fft_resource, over_time); }
private void brainReiverCallback(BrainManager manager) { string over_time = DateTime.Now.ToString("yyyy/MM/dd/ HH:mm:ss"); int numRow = manager.getStreamLog().Count / 513; WriteFile.writeFinishCode(runPath + "/" + "streamLog.csv", startTime, over_time, manager.getStreamLog(), 513, numRow, null); WriteFile.writeFinishCode(runPath + "/" + "dataLog.csv", startTime, over_time, manager.getDataLog(), 512, numRow, fftTitleItem()); WriteFile.writeFinishCode(runPath + "/" + "Brain.csv", "", "", manager.getBrainList(), 1, numRow, brashTitleItem()); WriteFile wr = new WriteFile(runPath); wr.BrainToNBrain(); }