public void SelectFile(IMainWin win) { Cache.IncUserActionCounter(); OpenFileDialog dlg = new OpenFileDialog { DefaultExt = ".txt", Filter = "TXT Files (*.txt)|*.txt" }; bool?success = dlg.ShowDialog(); if (success == true) { var circuit = CircuitFactory.GetFromFile(dlg.FileName); if (circuit.success) { win.SpawnResultWindow(dlg.FileName, circuit.circuit); } else { Console.WriteLine(circuit.error); win.SetErrorText(circuit.error); } } }
public SerialRFTagReader(IMainWin mainWin, string commPort, int baud) { this.mainWin = mainWin; SerialDecoder decoder = new SerialDecoder(250); commMgr = new SerialCommManager(decoder, commPort, baud); }