public void StartTask() { if (this.connection.State.Equals(HubConnectionState.Disconnected)) { Signal signal = new Signal(); signal.Start(uri); this.connection = signal.getConnection(); } if (GetStatus()) { foreach (string id in this.context.getUniqueIds(GetRuns() ?? Enumerable.Empty <string>().ToArray())) { this.filepath = (this.instrument.storagepath + "\\" + id.Substring(0, 6)); if (!new DirectoryInfo(this.filepath).Exists) { Directory.CreateDirectory(this.filepath); } if (GetRaw(id)) { if (GetLog(id)) { RunMod newrun = GetRun(id); newrun.directoryPath = this.filepath; newrun.fileName = id + "_RAW.txt"; this.context.addRun(newrun); } } } } }
public IActionResult ViewRaw(int runid) { RunMod run = _context.getRun(runid); return(View(new Nugget() { run = run })); }
public IActionResult runPage(int runid) { LogModel graph = new LogModel(); RunMod run = new RunMod(); try { graph = new LogModel().parseFile(_context.getRawPath(runid).Replace("RAW", "LOG").Replace("json", "txt")); run = _context.getRun(runid); } catch { } //LogModel graph = new LogModel().parseFile(@"C:\Users\griff\Downloads\LOG_20191227_142654__CP53.txt"); return(View(new Nugget() { logmodel = graph, run = run })); }
public void addRun(RunMod run) { Add(run); SaveChanges(); }