예제 #1
0
 public static bool ConnectAPI(API Api = 0)
 {
     if ((int)Api == 1)
     {
         BIS.ChangeAPI(SelectAPI.ControlConsole);
         return(BIS.ConnectTarget());
     }
     return(BIS.ConnectTarget());
 }
예제 #2
0
        public static bool Reconnect()
        {
            bool connect = false;

            if (BIS.GetCurrentAPI() == SelectAPI.TargetManager)
            {
                connect = Connect();
            }
            return(connect);
        }
예제 #3
0
 private static byte GetNodeColor(BIS.Library.NodeColor nodeColor)
 {
     switch (nodeColor)
     {
         case BIS.Library.NodeColor.Black:
             return NodeColor.Black;
         case BIS.Library.NodeColor.Red:
             return NodeColor.Red;
         default:
             throw new ArgumentException();
     }
 }
예제 #4
0
 /// <summary>
 /// 确定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" || textBox2.Text != "" || textBox3.Text != "" || textBox4.Text != "" || textBox5.Text != "" || textBox6.Text != "" || textBox7.Text != "" || textBox8.Text != "" || textBox9.Text != "")
     {
         try
         {
             TimeSpan t   = new TimeSpan();
             Random   rd  = new Random();
             DateTime dt1 = Convert.ToDateTime(dtStart.Value.ToString("yyyy/MM/dd HH:mm"));
             DateTime dt2 = Convert.ToDateTime(dtEnd.Value.ToString("yyyy/MM/dd HH:mm"));
             int      JGs = Convert.ToInt32(jiange);
             t = dt2 - dt1;
             string NIBPS; //收缩压
             string NIBPD; //舒张压
             string RRC;   //呼吸
             //int HR;//心率
             string Pulse; //脉搏
             string SpO2;  //血氧
             string ETCO2; //呼吸二氧化碳
             string TEMP;  //温度
             string BIS;   //bis
             string cvp;
             int    X = (t.Days * 24 * 60 + t.Hours * 60 + t.Minutes) / JGs;
             for (int i = 0; i <= X; i++)
             {
                 NIBPS = textBox1.Text;
                 NIBPD = textBox2.Text;
                 RRC   = textBox3.Text;
                 //HR = new Random().Next(31, 35);
                 Pulse = textBox4.Text;
                 SpO2  = textBox5.Text;
                 ETCO2 = textBox6.Text;
                 TEMP  = textBox7.Text;
                 BIS   = textBox8.Text;
                 cvp   = textBox9.Text;
                 if (bll.GetPointSingle(Mzjldid, dt1).Rows.Count == 0)
                 {
                     int result = bll.AddPoint(Mzjldid, dt1, NIBPS.ToString(), NIBPD.ToString(), RRC.ToString(), Pulse.ToString(), SpO2.ToString(), ETCO2.ToString(), BIS.ToString(), TEMP.ToString(), cvp);
                 }
                 //else
                 //    MessageBox.Show("该时间点数据已存在,不能重复添加");
                 dt1 = dt1.AddMinutes(JGs);
             }
             MessageBox.Show("设置完成");
             this.Close();
         }
         catch (Exception ex)
         {
             MessageBox.Show("设置失败!请重试!");
         }
     }
     else
     {
         MessageBox.Show("如果没有数据请填写0");
     }
 }
예제 #5
0
 public static void TMAPI()
 {
     BIS.ChangeAPI(SelectAPI.TargetManager);
 }
예제 #6
0
 public static void CCAPI()
 {
     BIS.ChangeAPI(SelectAPI.ControlConsole);
 }
예제 #7
0
 public static bool Attach()
 {
     return(BIS.AttachProcess());
 }
예제 #8
0
 public static bool Connect()
 {
     return(BIS.ConnectTarget());
 }