/// <summary>
        /// Next Button receives calibration value,
        /// sends patient data (limit values), calibration and zero value,
        /// stops receiving zero value and shows Measurement Window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Next_B_Click(object sender, RoutedEventArgs e)
        {
            //Receive
            calData = controller.GetCalVal();

            //Calibration value
            double a = 0;

            // Get calibration value
            foreach (var data in calData)
            {
                a = data.A;
            }

            //Send limit values, calibration value and zero value
            controller.SendRPiData(Convert.ToInt32(sysULimit_TB.Text), Convert.ToInt32(sysLLimit_TB.Text), Convert.ToInt32(diaULimit_TB.Text), Convert.ToInt32(diaLLimit_TB.Text), Convert.ToInt32(meanLLimit_TB.Text), Convert.ToInt32(meanULimit_TB.Text), Convert.ToString(socSecNb_TB.Text), a, zeroVal);

            //Measurement Window
            measurementWindow = new MeasurementWindow(controller, mwWindow, dataWindow);

            //Stop receive zero value
            IsZeroActive = false;

            //Close Data Window
            this.Close();

            //Show Measurement Window
            measurementWindow.Show();
        }
Esempio n. 2
0
        /// <summary>
        /// Emergency Pop Up Constructor
        /// </summary>
        /// <param name="mw"></param>
        /// <param name="cr"></param>
        /// <param name="ms"></param>
        public EmergencyPopUp(MainWindow mw, Controller cr, MeasurementWindow ms)
        {
            InitializeComponent();

            //Windows
            controller        = cr;
            this.mw           = mw;
            measurementWindow = ms;
        }
        /// <summary>
        /// Data Window Constructor
        /// </summary>
        /// <param name="mw"></param>
        /// <param name="cr"></param>
        /// <param name="ms"></param>
        public DataWindow(MainWindow mw, Controller cr, MeasurementWindow ms)
        {
            InitializeComponent();

            //Windows
            mwWindow          = mw;
            controller        = cr;
            measurementWindow = ms;

            //True boolean
            IsZeroActive = !IsZeroActive;

            //Running task
            if (IsZeroActive)
            {
                Task.Factory.StartNew(ReceiveZeroValue);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Start Button continues the blood pressure measurement
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Start_B_Click(object sender, RoutedEventArgs e)
        {
            //CPR
            string cpr = CPR_tb.Text;

            //Measurement Window
            measurementWindow = new MeasurementWindow(controller, mw, dataWindow);

            //Send Emergency Data
            controller.SendEemergencydata(0, 0, 0, 0, 0, 0, cpr, 0, 0);

            //Hide Emergency Pop Up
            this.Hide();

            //Hide Main Window
            mw.Hide();

            //Shows Measurement Window
            measurementWindow.ShowDialog();
        }