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 MainWindow()
        {
            InitializeComponent();
            sLabwareSettingFileName = xmlFolder + "\\labwareSettings.xml";
            sPipettingFileName      = xmlFolder + "\\pipettingSettings.xml";
            maxSampleCount          = int.Parse(ConfigurationManager.AppSettings[stringRes.maxSampleCount]);
            string s = "";

            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;
            }

            using (StreamReader sr = new StreamReader(sLabwareSettingFileName))
            {
                s = sr.ReadToEnd();
            }
            //labwareSettings = Utility.Deserialize<LabwareSettings>(s);
            plasmaMaxCount = int.Parse(ConfigurationManager.AppSettings["PlasmaMaxCount"]);
            buffyMaxCount  = int.Parse(ConfigurationManager.AppSettings["BuffyMaxCount"]);
            using (StreamReader sr = new StreamReader(sPipettingFileName))
            {
                s = sr.ReadToEnd();
            }

            try
            {
                pipettingSettings = Utility.Deserialize <PipettingSettings>(s);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public MainWindow()
        {
            InitializeComponent();
            sLabwareSettingFileName = xmlFolder + "\\labwareSettings.xml";
            sPipettingFileName = xmlFolder + "\\pipettingSettings.xml";
            maxSampleCount = int.Parse(ConfigurationManager.AppSettings[stringRes.maxSampleCount]);
            string s = "";
            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;
            }

            using (StreamReader sr = new StreamReader(sLabwareSettingFileName))
            {
                s = sr.ReadToEnd();
            }
            //labwareSettings = Utility.Deserialize<LabwareSettings>(s);
            plasmaMaxCount = int.Parse(ConfigurationManager.AppSettings["PlasmaMaxCount"]);
            buffyMaxCount = int.Parse(ConfigurationManager.AppSettings["BuffyMaxCount"]);
            using (StreamReader sr = new StreamReader(sPipettingFileName))
            {
                s = sr.ReadToEnd();
            }
            
            try
            {
                pipettingSettings = Utility.Deserialize<PipettingSettings>(s);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
 public SolutionSettings()
 {
     pipettingSettings = new PipettingSettings();
     labwareSettings = new LabwareSettings();
 }
Exemple #5
0
 public SolutionSettings()
 {
     pipettingSettings = new PipettingSettings();
     labwareSettings   = new LabwareSettings();
 }