Example #1
0
        private void SeeExperimantalData(object parametr)
        {
            CashWindow    cw  = new CashWindow();
            CashViewModel cVM = cw.Resources["VM"] as CashViewModel;

            if (cVM != null)
            {
                if (File.Exists(m_fileNameToGetData))
                {
                    XDocument xDoc = XDocument.Load(m_fileNameToGetData);

                    IEnumerable <DataPresenter> data = from i in xDoc.Element("Мыши").Elements("Мышь")
                                                       select new DataPresenter
                    {
                        ImagePath   = i.Element("ПутьКИзображению").Value,
                        Description = String.Format("Mouse number: {0}\nOrgan: {1}\nInjected dose (mg/kg): {2}\nCurrent concentration (mg/kg): {3}\nTime interval (hh:mm:ss): {4}",
                                                    i.Element("Номер").Value, i.Element("Орган").Value, i.Element("ВведённаяДоза").Value, i.Element("ТекущаяКонцентрация").Value, i.Element("ПрошедшееВремя").Value)
                    };

                    foreach (var item in data)
                    {
                        cVM.Data.Add(item);
                    }
                }
            }

            cw.Show();
        }
Example #2
0
        private void SeeControlSampleData(object parametr)
        {
            CashWindow    cw  = new CashWindow();
            CashViewModel cVM = cw.Resources["VM"] as CashViewModel;

            if (cVM != null)
            {
                foreach (var item in this.ControlSamplesData)
                {
                    cVM.Data.Add(item);
                }
            }

            cw.Show();
        }