public BerryMonitorControl(MaximizeDelegate maxD, MaximizeDelegate minD, String ip = "NaN", String name = "NaN")
        {
            _maximize = maxD;
            _minimize = minD;
            _alarmList = new Queue<AlarmEntity>();
            InitializeComponent();
            IP = ip;
            PatientName = name;
            Title = ip + " (" + name + ")";
            this.Dock = DockStyle.Fill;
            _isMaximized = false;

            _hrAlarmUpper = 100;
            _hrAlarmLower = 70;
            _spo2AlarmLower = 95;
            _respAlarmUpper = 100;
            _respAlarmLower = 50;
        }
示例#2
0
 protected override void Page_Load(object sender, System.EventArgs e)
 {
     base.Page_Load(sender, e);
     RegisterResource();
     BuildToolBar();
     Edit += new EditDelegate(DoEdit);
     Minimize += new MinimizeDelegate(DoMinimize);
     Maximize += new MaximizeDelegate(DoMaximize);
     Load += new LoadDelegate(DoLoad);
     Create += new CreateDelegate(DoCreate);
     Close += new CloseDelegate(DoClose);
 }
示例#3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterResource();
     BuildToolBar();
     if(Edit != null)
        Edit += new EditDelegate(DoEdit);
     if(Minimize != null)
        Minimize += new MinimizeDelegate(DoMinimize);
     if(Maximize != null)
        Maximize += new MaximizeDelegate(DoMaximize);
     if(Load != null)
        Load += new LoadDelegate(DoLoad);
     if(Create != null)
        Create += new CreateDelegate(DoCreate);
     if(Close != null)
        Close += new CloseDelegate(DoClose);
 }
示例#4
0
        private void showMonitor(int n)
        {
            int i, j, k;
            tableLayoutPanelMain.Controls.Clear();
            switch (n)
            {
                case 1:
                    this.RowNum = 1;
                    this.ColumnNum = 1;
                    break;
                case 2:
                    this.RowNum = 2;
                    this.ColumnNum = 1;
                    break;
                case 4:
                    this.RowNum = 2;
                    this.ColumnNum = 2;
                    break;
                case 6:
                    this.RowNum = 2;
                    this.ColumnNum = 3;
                    break;
                default:
                    break;
            }

            /*创建显示控件*/
            MaximizeDelegate max = new MaximizeDelegate(this.maximize), min = new MaximizeDelegate(this.minimize);
            for (j = 0, k = 0; j < RowNum && k < _config.BerryDevices.Count; ++j)
            {
                for (i = 0; i < ColumnNum; ++i)
                {
                    if (k < _config.BerryDevices.Count)
                    {
                        BerryMonitorControl monitor = new BerryMonitorControl(max, min, _config.BerryDevices[k].IP, _config.BerryDevices[k].Name);
                        tableLayoutPanelMain.Controls.Add(monitor, i, j);
                        /*检查当前是否有应在本控件内显示的连接*/
                        if (_sensors.ContainsKey(_config.BerryDevices[k].IP))
                        {
                            BerrySensor sensor = _sensors[_config.BerryDevices[k].IP];
                            Log log = _logs[_config.BerryDevices[k].IP];
                            setSensorEventHandler(sensor, log, monitor, _config.BerryDevices[k]);
                            monitor.OnConnect();
                        }
                        k++;
                    }
                    else
                        break;
                }
            }
            ///*未显示的控件对应的连接应该关闭*/
            //while (k < _config.BerryDevices.Count)
            //{
            //    if (_sensors.ContainsKey(_config.BerryDevices[k].IP))
            //    {
            //        _sensors[_config.BerryDevices[k].IP].Close();
            //    }
            //    ++k;
            //}
        }