public MainWindow() { InitializeComponent(); string exePath = ""; try { sLabwareSettingFileName = xmlFolder + "\\labwareSettings.xml"; sPipettingFileName = xmlFolder + "\\pipettingSettings.xml"; //sTubeSettingsFileName = xmlFolder + stringRes.tubeSettingFileName; exePath = Utility.GetExeFolder() + "Biobanking.exe"; Configuration config = ConfigurationManager.OpenExeConfiguration(exePath); Utility.WriteExecuteResult(false, "result.txt"); maxSampleCount = int.Parse(config.AppSettings.Settings[stringRes.maxSampleCount].Value); string s = ""; plasmaMaxCount = int.Parse(config.AppSettings.Settings["PlasmaMaxCount"].Value); buffyMaxCount = int.Parse(config.AppSettings.Settings["BuffyMaxCount"].Value); if (!File.Exists(sLabwareSettingFileName)) { SetInfo("LabwareSettings xml does not exist! at : " + sLabwareSettingFileName, Colors.Red); return; } if (!File.Exists(sPipettingFileName)) { SetInfo("PipettingSettings xml does not exist! at : " + sPipettingFileName, Colors.Red); return; } s = File.ReadAllText(sPipettingFileName); pipettingSettings = Utility.Deserialize <PipettingSettings>(s); s = File.ReadAllText(sLabwareSettingFileName); labwareSettings = Utility.Deserialize <LabwareSettings>(s); buffyStandalone = pipettingSettings.buffyStandalone; } catch (Exception ex) { MessageBox.Show(ex.Message + exePath); } }
public SolutionSettings() { pipettingSettings = new PipettingSettings(); labwareSettings = new LabwareSettings(); }