private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     //加载图片
     if (LanguageUtils.IsChainese())
     {
         title_pic.Source = new BitmapImage(new Uri(@"\view\Images\bdl.PNG", UriKind.Relative));
         title_pic.Height = 198.4;
     }
     else
     {
         //TODO 英文图片
         title_pic.Source = new BitmapImage(new Uri(@"\view\Images\design.png", UriKind.Relative));
         title_pic.Height = 257;
     }
     try
     {
         if (SetterDAO.getSetter() != null)
         {
             if (SetterDAO.getSetter().Set_Unique_Id != "" && SetterDAO.getSetter().Set_Unique_Id != null)//判断是否激活
             {
                 Status.Content = LanguageUtils.GetCurrentLanuageStrByKey("SettingsView.Activated");
                 Color color = Color.FromArgb(255, 2, 200, 5);
                 Status.Foreground     = new SolidColorBrush(color);
                 BtnActivite.IsEnabled = false;
             }
         }
     }
     catch (InvalidOperationException ee)
     {
     }
     setterList = setterDao.ListAll();
     try { Pk_Set_Id = setterList[0].Pk_Set_Id; }
     catch (ArgumentOutOfRangeException ee)
     {
     }
     try
     {
         List <Auther> AutherList = new List <Auther>();
         auther = authDAO.GetAuther(auth_level);
         AutherList.Add(auther);
         ((this.FindName("DataGrid1")) as DataGrid).ItemsSource = AutherList;
     }
     catch (Exception ee) { }
     try
     {
         DeviceSetList = deviceSetDAO.ListAll();
         ((this.FindName("ComboBox_Device")) as ComboBox).ItemsSource = DeviceSetList;//系列
         int Dset_Id = (int)ComboBox_Device.SelectedValue;
         DeviceSortList = deviceSortDAO.GetDeviceSortBySet(Dset_Id);
         ((this.FindName("DataGrid2")) as DataGrid).ItemsSource = DeviceSortList;//类型
     }
     catch (Exception ee)
     {
     }
 }
예제 #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int    reValue = System.Convert.ToInt32(value);
            string sex;

            if (reValue == 1)
            {
                sex = LanguageUtils.GetCurrentLanuageStrByKey("SearchSubjectView.M");
            }
            else
            {
                sex = LanguageUtils.GetCurrentLanuageStrByKey("SearchSubjectView.F");
            }
            return(sex);
        }
        public InputManualMvaluation()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            this.MaxHeight        = SystemParameters.WorkArea.Size.Height;
            this.MaxWidth         = SystemParameters.WorkArea.Size.Width;


            List <String> list = new List <string>
            {
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other")
            };

            stand_tools_selected.ItemsSource         = list;
            time_up_other_selected.ItemsSource       = list;
            walk5_tools_selected.ItemsSource         = list;
            walk5_fastest_tools_selected.ItemsSource = list;
            walk10_tools_selected.ItemsSource        = list;
            walk6_tools_selected.ItemsSource         = list;
            step2_tools_selected.ItemsSource         = list;

            stand_tools_selected2.ItemsSource = new List <string>
            {
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.RightFrontal"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.RightLateral"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.LeftFrontal"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.LeftLateral"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.BothFrontal"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.BothLateral")
            };

            walk10_comboBox.ItemsSource = new List <string>
            {
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Normal"),
                LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.utmost")
            };
            walk10_comboBox.SelectedIndex = 0;
        }
예제 #4
0
        //	重写基类的方法,当消息到达时触发,这里收到消息后,在控制台输出收到的内容,并原样返回了客户端
        public override void ChannelRead(IChannelHandlerContext context, object message)
        {
            var buffer = message as BodyStrongMessage;

            //BodyStrongMessage response = new BodyStrongMessage();
            //response.Sequence = buffer.Sequence > Int32.MaxValue - 1 ? 0 : buffer.Sequence + 1;
            if (buffer.MessageType != BodyStrongMessage.Types.MessageType.Heaerbeatresp)
            {
                return;
            }
            switch (buffer.HeartbeatResponse.ResponseType)
            {
            //延长使用时间,注意区分9999和一般时间
            case HeartbeatResponse.Types.ResponseType.Addusetime:
                TcpHeartBeatUtils.AddUseTime(buffer.HeartbeatResponse);
                break;

            //正常心跳不做处理
            case HeartbeatResponse.Types.ResponseType.Nomal:
                break;

            //上锁
            case HeartbeatResponse.Types.ResponseType.Lock:

                TcpHeartBeatUtils.LockUse(buffer.HeartbeatResponse);
                App.Current.Dispatcher.Invoke(new Action(() =>
                {
                    MessageBoxX.Info(LanguageUtils.GetCurrentLanuageStrByKey("App.Locked"));
                    System.Environment.Exit(0);
                }));
                break;

            //解锁
            case HeartbeatResponse.Types.ResponseType.Unlock:
                TcpHeartBeatUtils.UnLockUse(buffer.HeartbeatResponse);
                break;
            }
        }
예제 #5
0
        public SymptomInfoDTO(SymptomInfo symptomInfo)
        {
            this.TI_ID      = symptomInfo.Fk_TI_Id;
            this.ID         = symptomInfo.Pk_SI_Id;
            this.Create     = symptomInfo.Gmt_Create.Value;
            this.CareInfo   = symptomInfo.SI_CareInfo;
            this.Inquiry    = symptomInfo.SI_Inquiry;
            this.WaterInput = symptomInfo.SI_WaterInput;
            this.Join       = symptomInfo.SI_IsJoin == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Yes") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.No");

            this.Pre_Pressure   = symptomInfo.SI_Pre_HighPressure + " / " + symptomInfo.SI_Pre_LowPressure;
            this.Pre_AnimalHeat = symptomInfo.SI_Pre_AnimalHeat;
            if (symptomInfo.SI_Pre_Pulse != -1)
            {
                this.Pre_Pulse = symptomInfo.SI_Pre_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
            }
            else
            {
                this.Pre_Pulse = "";
            }
            this.Pre_HeartRate = symptomInfo.SI_Pre_HeartRate;

            this.Suf_AnimalHeat = symptomInfo.SI_Suf_AnimalHeat;
            this.Suf_HeartRate  = symptomInfo.SI_Suf_HeartRate;
            if (symptomInfo.SI_Suf_Pulse != -1)
            {
                this.Suf_Pulse = symptomInfo.SI_Suf_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
            }
            else
            {
                this.Suf_Pulse = "";
            }
            this.Suf_Pressure = symptomInfo.SI_Suf_HighPressure + " / " + symptomInfo.SI_Suf_LowPressure;
            List <string> inquiryList = new List <string>();

            this.DateStr = symptomInfo.Gmt_Create.ToString();
            //翻译问卷票
            foreach (string inquiry in symptomInfo.SI_Inquiry.Split(new char[] { ',' }))
            {
                if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Janguidness"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Janguidness"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Diarrhea"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Diarrhea"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Wamble"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Wamble"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.BeingBreathless"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.BeingBreathless"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.CoughAndPhlegm"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.CoughAndPhlegm"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Fever"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Fever"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Stomachache"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Stomachache"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.APoorAppetite"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.APoorAppetite"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Constipation"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Constipation"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Dizziness"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Dizziness"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Headache"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Headache"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Other"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Other"));
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.NotApplicable"))
                {
                    inquiryList.Add(LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.NotApplicable"));
                }
            }
            Inquiry = string.Join(",", inquiryList.ToArray());
        }
예제 #6
0
 public SymptomInfoExcelVO(SymptomInfo si)
 {
     this.Gmt_Create        = (DateTime)si.Gmt_Create;
     this.SI_Pre_Pressure   = si.SI_Pre_HighPressure + "/" + si.SI_Pre_LowPressure;
     this.SI_Pre_HeartRate  = si.SI_Pre_HeartRate;
     this.SI_Pre_Pulse      = si.SI_Pre_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
     this.SI_Pre_AnimalHeat = si.SI_Pre_AnimalHeat;
     this.SI_Suf_Pressure   = si.SI_Suf_HighPressure + "/" + si.SI_Suf_LowPressure;
     this.SI_Suf_HeartRate  = si.SI_Suf_HeartRate;
     this.SI_Suf_Pulse      = si.SI_Suf_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
     this.SI_Suf_AnimalHeat = si.SI_Suf_AnimalHeat;
     string[] inquirys = Regex.Split(si.SI_Inquiry, ",");
     foreach (string str in inquirys)
     {
         //1. 身体疲倦
         if (LanguageUtils.EqualsResource(str, "VitalInfoView.Janguidness"))
         {
             this.SI_Tired = 1;
         }
         //2.腹泻
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Diarrhea"))
         {
             this.SI_Diarrhoea = 1;
         }
         //3.摇晃
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Wamble"))
         {
             this.SI_Shake = 1;
         }
         //4. 心跳、气喘
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.BeingBreathless"))
         {
             this.SI_Asthma = 1;
         }
         //5. 咳嗽、有痰
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.CoughAndPhlegm"))
         {
             this.SI_Phlegm = 1;
         }
         //6. 发烧
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Fever"))
         {
             this.SI_Fever = 1;
         }
         //7. 胸部、肚子痛
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Stomachache"))
         {
             this.SI_Stomach = 1;
         }
         //8. 没有食欲
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.APoorAppetite"))
         {
             this.SI_NoAppetite = 1;
         }
         //9. 持续便秘
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Constipation"))
         {
             this.SI_Constipation = 1;
         }
         //10. 感到头晕
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Dizziness"))
         {
             this.SI_Dizzy = 1;
         }
         //11. 头痛
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Headache"))
         {
             this.SI_Headache = 1;
         }
         //12.其他
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Other"))
         {
             this.SI_Other = 1;
         }
         //13.没有相关症状
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.NotApplicable"))
         {
             this.SI_NoSymptoms = 1;
         }
     }
     this.SI_IsJoin     = si.SI_IsJoin == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.No") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Yes");
     this.SI_WaterInput = si.SI_WaterInput;
     this.SI_CareInfo   = si.SI_CareInfo;
 }
예제 #7
0
        public TrainExcelVO(TrainComprehensive tc)
        {
            this.Gmt_Create = (DateTime)tc.Gmt_Create;
            //腿部推蹬机
            if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.HorizontalLegPress"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.HorizontalLegPress");
            }
            //坐姿划船机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.Rowing"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.Rowing");
            }
            //身体伸展弯曲机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.TorsoFlexion"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.TorsoFlexion");
            }
            //腿部伸展弯曲机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.LegExtension"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.LegExtension");
            }
            //腿部内外展机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.HipAbduction"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.HipAbduction");
            }
            //胸部推举机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.ChestPress"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.ChestPress");
            }
            this.dp_groupcount = tc.dp_groupcount;
            this.dp_groupnum   = tc.dp_groupnum;
            this.dp_relaxtime  = tc.dp_relaxtime;
            this.dp_weight     = tc.dp_weight;
            this.dp_moveway    = DataCodeCache.GetInstance().GetCodeDValue(DataCodeTypeEnum.MoveWay, tc.dp_moveway + "");

            if (tc.PR_SportStrength == "10" || tc.PR_SportStrength == "9")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("困难", "Difficult");
            }
            else if (tc.PR_SportStrength == "8" || tc.PR_SportStrength == "7")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("有点困难", "A little difficult");
            }
            else if (tc.PR_SportStrength == "6" || tc.PR_SportStrength == "5")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("轻松", "Relaxed");
            }
            else if (tc.PR_SportStrength == "4" || tc.PR_SportStrength == "3")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("很轻松", "Easy");
            }
            else if (tc.PR_SportStrength == "2" || tc.PR_SportStrength == "1")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("非常轻松", "Very easy");
            }
            else
            {
                this.PR_SportStrength = "";
            }

            this.PR_Time              = tc.PR_Time2 - tc.PR_Time1;
            this.PR_Distance          = tc.PR_Distance;
            this.PR_CountWorkQuantity = tc.PR_CountWorkQuantity;
            this.PR_Cal            = tc.PR_Cal;
            this.PR_Index          = tc.PR_Index;
            this.PR_FinishGroup    = tc.PR_FinishGroup;
            this.PR_Evaluate       = DataCodeCache.GetInstance().GetCodeDValue(DataCodeTypeEnum.Evaluate, tc.PR_Evaluate + "");
            this.PR_Memo           = tc.PR_Memo;
            this.PR_AttentionPoint = tc.PR_AttentionPoint;
            this.PR_UserThoughts   = tc.PR_UserThoughts;
        }
        private void Btn_Activate(object sender, RoutedEventArgs e)
        {
            //InputNonPublicInformationPassword
            InputNonPublicInformationPassword passwordInput = new InputNonPublicInformationPassword
            {
                Owner                 = Window.GetWindow(this),
                ShowActivated         = true,
                ShowInTaskbar         = false,
                WindowStartupLocation = WindowStartupLocation.CenterScreen
            };

            passwordInput.ShowDialog();
            if (ProtocolConstant.USB_SUCCESS == 0) //u盘成功读取 破解状态为0
            {                                      //获取mac地址
                StringBuilder stringBuilder = new StringBuilder();
                //string strMac = CommUtil.GetMacAddress();
                // List<string> Macs = CommUtil.GetMacByWMI();
                List <string> Macs = CommUtil.GetMacByIPConfig();
                foreach (string mac in Macs)
                {
                    string prefix = "物理地址. . . . . . . . . . . . . : ";
                    string Mac    = mac.Substring(prefix.Length - 1);
                    stringBuilder.Append(Mac);
                }
                //Console.WriteLine("==================="+stringBuilder.ToString());
                //MessageBox.Show("===================" + stringBuilder.ToString());
                entity.Setter setter = new entity.Setter();
                //mac地址先变为byte[]再aes加密
                byte[] byteMac = Encoding.GetEncoding("GBK").GetBytes(stringBuilder.ToString());
                byte[] AesMac  = AesUtil.Encrypt(byteMac, ProtocolConstant.USB_DOG_PASSWORD);
                //存入数据库
                //setter.Set_Unique_Id = Encoding.GetEncoding("GBK").GetString(AesMac);
                setter.Set_Unique_Id = ProtocolUtil.BytesToString(AesMac);

                /*AES解密
                 * byte[] a = ProtocolUtil.StringToBcd(setter.Set_Unique_Id);
                 * byte[] b = AesUtil.Decrypt(a, ProtocolConstant.USB_DOG_PASSWORD);
                 * Console.WriteLine(Encoding.GetEncoding("GBK").GetString(b));*/
                //默认照片路径,激活时获取(路径中不要有汉字)
                string basePath = System.AppDomain.CurrentDomain.BaseDirectory;
                string path     = ConfigurationManager.AppSettings["PicPath"];
                setter.Set_PhotoLocation = basePath + path;
                setter.Set_Language      = 1;
                //默认备份路径,激活时获取
                setter.Back_Up      = basePath + @"BackUp\";
                setter.Set_Language = 1;
                //设置版本号
                setter.Set_Version = CommUtil.GetCurrentVersion();
                if (!Directory.Exists(@setter.Set_PhotoLocation))
                {
                    Directory.CreateDirectory(@setter.Set_PhotoLocation);//不存在就创建目录
                }

                /*if (Directory.Exists(@setter.Set_PhotoLocation)) {  //存在就删除
                 *  Directory.Delete(@setter.Set_PhotoLocation, true);
                 *  Directory.CreateDirectory(@setter.Set_PhotoLocation);
                 * }*/
                SetterDAO.InsertOneMacAdress(setter);
                //注释的部分为添加多个mac地址
                // List<entity.Setter> ListMac = CommUtil.GetMacByWMI();
                // SetterDAO.InsertMacAdress(ListMac);



                Status.Content = LanguageUtils.GetCurrentLanuageStrByKey("SettingsView.Activated");
                Color color = Color.FromArgb(255, 2, 200, 5);
                Status.Foreground     = new SolidColorBrush(color);
                BtnActivite.IsEnabled = false;
            }
            else
            {
                MessageBoxX.Error(LanguageUtils.ConvertLanguage("激活失败", "Activation fails"));
            }
        }
예제 #9
0
        /// <summary>
        /// 应用启动的时候生命周期
        /// </summary>
        /// <param name="ex"></param>
        protected override void OnStartup(StartupEventArgs ex)
        {
            //全局异常处理机制,UI异常
            Current.DispatcherUnhandledException += App_OnDispatcherUnhandledException;
            //全局异常处理机制,线程异常
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            //加载语言
            LanguageUtils.SetLanguage();

            //启动netty,用于与设备端通信
            Thread th = new Thread(() =>
            {
                try
                {
                    logger.Info("线程启动成功");
                    NettyLuncher.getInstance().Start().Wait();
                }
                catch (AggregateException ee)
                {
                    App.Current.Dispatcher.Invoke(new Action(() =>
                    {
                        MessageBoxX.Info(LanguageUtils.GetCurrentLanuageStrByKey("App.PortOccupy"));
                        System.Environment.Exit(0);
                    }));
                }
            });

            th.Start();


            //启动远程更新
            Thread updateTh = new Thread(() =>
            {
                try
                {
                    Thread.Sleep(1000 * 8);
                    Dictionary <string, string> param = new Dictionary <string, string>();

                    param.Add("version", CommUtil.GetCurrentVersion());
                    var result = HttpSender.GET(HttpSender.URL_UPDATE, param);
                    if (string.IsNullOrEmpty(result))
                    {
                        return;
                    }
                    var info = JsonTools.DeserializeJsonToObject <VersionInfo>(result);
                    if (info == null || info.update == false)
                    {
                        return;
                    }

                    info.language = LanguageUtils.IsChainese() ? 1 : 0;
                    App.Current.Dispatcher.Invoke(new Action(() =>
                    {
                        Boolean dr = MessageBoxX.Question(LanguageUtils.GetCurrentLanuageStrByKey("App.UpdateInfo"));
                        if (dr == true)
                        {
                            Process.Start("AutoUpdater.exe", info.GetProcessString());
                            Environment.Exit(0);
                        }
                    }));
                }
                catch (Exception exc)
                {
                    Console.WriteLine(exc.ToString());
                    return;
                }
            });

            updateTh.Start();



            //大数据线程

            Thread bdth = new Thread(() =>
            {
                try
                {
                    SetterDAO setterDao = new SetterDAO();
                    AuthDAO authDAO     = new AuthDAO();
                    while (true)
                    {
                        if (setterDao.ListAll().Count != 1)
                        {
                            //不激活不开启
                            Thread.Sleep(1000 * 15);
                            continue;
                        }
                        if (authDAO.ListAll().Count == 1)
                        {
                            //Console.WriteLine("-----------------boom shakalaka--------------");
                            //只有admin,不创建用户,不开启,睡个15s
                            Thread.Sleep(1000 * 15);
                            continue;
                        }
                        try
                        {
                            BigDataOfficer bigDataOfficer = new BigDataOfficer();
                            bigDataOfficer.Run();
                            //int heartBeatRate = (int)CommUtil.GetBigDataRate();
                            Thread.Sleep(1000 * 60);
                            //Console.WriteLine("-----------------boom");
                        }
                        catch (Exception e)
                        {
                            logger.Error("大数据线程失败:" + e.StackTrace);
                            Console.WriteLine("大数据线程失败:" + e.Message);
                        }
                    }
                }
                catch (Exception exct)
                {
                    Console.WriteLine(exct.ToString());
                }
            });

            bdth.Start();

            //心跳线程
            Thread hbth = new Thread(() =>
            {
                ProtoBufSocket socket = null;
                try
                {
                    socket = new ProtoBufSocket();
                    socket.Connect();
                }
                catch (Exception exception)
                {
                    Console.WriteLine("连接失败:" + exception.StackTrace);
                    TcpHeartBeatUtils.WriteLogFile("连接失败:" + exception.StackTrace);
                }

                while (true)
                {
                    try
                    {
                        BodyStrongMessage bodyStrongMessage = new BodyStrongMessage
                        {
                            MessageType = BodyStrongMessage.Types.MessageType.Heaerbeatreq,
                            //可能为null
                            HeartbeatRequest = TcpHeartBeatUtils.GetHeartBeatByCurrent()
                        };

                        socket.SendMessage(bodyStrongMessage);
                        Console.WriteLine("发送msg!!");
                        //Thread.Sleep(5000);
                    }
                    catch (Exception eee)
                    {
                        Console.WriteLine("发送msg失败" + eee.StackTrace);
                        TcpHeartBeatUtils.WriteLogFile("发送msg失败" + eee.StackTrace);
                    }
                    finally
                    {
                        Thread.Sleep(5000);
                    }
                }
            });

            hbth.Start();

            base.OnStartup(ex);
        }
예제 #10
0
        //按钮:文档输出
        private void Output_Document(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.SaveFileDialog sfd = new Microsoft.Win32.SaveFileDialog
            {
                Filter = LanguageUtils.ConvertLanguage("Excel表格(*.xlsx)|*.xlsx", "Excel Sheet (*.xlsx)|*.xlsx")
            };
            //设置默认文件类型显示顺序
            sfd.FilterIndex = 1;
            //保存对话框是否记忆上次打开的目录
            sfd.RestoreDirectory = true;

            if (selectUser != null)
            {
                if (is_signinformationrecord.IsChecked == true)
                {
                    sfd.FileName = selectUser.User_Name + "-" + LanguageUtils.GetCurrentLanuageStrByKey("SubjectInfoView.VitalHistory") + "-" + DateTime.Now.ToString("yyyyMMddHHmm") + ".xlsx";
                }
                if (is_trainingrecord.IsChecked == true)
                {
                    sfd.FileName = selectUser.User_Name + "-" + LanguageUtils.GetCurrentLanuageStrByKey("SubjectInfoView.TrainingHistory") + "-" + DateTime.Now.ToString("yyyyMMddHHmm") + ".xlsx";
                }
                if (is_physicalevaluation.IsChecked == true)
                {
                    sfd.FileName = selectUser.User_Name + "-" + LanguageUtils.GetCurrentLanuageStrByKey("SubjectInfoView.PhysicalEvaluationHistory") + "-" + DateTime.Now.ToString("yyyyMMddHHmm") + ".xlsx";
                }
            }

            if (sfd.ShowDialog() == true)
            {
                //此处做你想做的事 ...=ofd.FileName;
                //获取当前
                try
                {
                    if (is_signinformationrecord.IsChecked == true)
                    {
                        //导出症状信息记录
                        if (selectUser != null)
                        {
                            //获取用户症状信息
                            List <SymptomInfo> lists = new SymptomService().GetByUserId(selectUser);
                            if (lists.Count > 0)
                            {
                                List <object> symptomInfoDtos = new List <object>();
                                foreach (SymptomInfo symptomInfo in lists)
                                {
                                    symptomInfoDtos.Add(new SymptomInfoExcelVO(symptomInfo));
                                }

                                //存放信息导出的列名
                                if (LanguageUtils.IsChainese())
                                {
                                    string[] colNames = { "训练日期", "血压(前)", "脉搏(前)", "心率(前)", "体温(前)", "血压(后)", "脉搏(后)", "心率(后)", "体温(后)", "身体倦怠", "腹泻", "摇晃", "心跳、气喘", "咳嗽、有痰", "发烧", "胸部、肚子痛", "没有食欲", "持续便秘", "感到头晕", "头痛", "其他", "没有相关症状", "是否参加", "水分摄取", "看护记录" };
                                    ExcelUtil.GenerateOrdinaryExcel(sfd.FileName.ToString(), selectUser, ExcelUtil.ToDataTable("症状信息记录", colNames, symptomInfoDtos));
                                }
                                else
                                {
                                    string[] colNames = { "Training date", "Blood pressure (front)", "Pulse (front)", "Heart rate (front)", "Body temperature (front)", "Blood pressure (after)", "Pulse (after)", "Heart rate (after)", "Body temperature (after)", "Physical exhaustion", "Diarrhea", "Shake", "Heartbeat, asthma", "Cough with phlegm", "Fever", "Chest and stomach pain", "No appetite", "Continuous constipation", "Feeling dizzy", "Headache", "Other", "No related symptoms", "Whether to participate", "Moisture intake", "Care record" };
                                    ExcelUtil.GenerateOrdinaryExcel(sfd.FileName.ToString(), selectUser, ExcelUtil.ToDataTable("Symptom information record", colNames, symptomInfoDtos));
                                }
                            }
                            else
                            {
                                MessageBoxX.Warning(LanguageUtils.ConvertLanguage("抱歉,没有数据", "Sorry, No Data!"));
                            }
                        }
                    }
                    else if (is_trainingrecord.IsChecked == true)
                    {
                        //导出训练记录
                        if (selectUser != null)
                        {
                            List <TrainComprehensive> lists = new ExcelService().ListTrainExcekVOByUserId(selectUser.Pk_User_Id);
                            if (lists.Count > 0)
                            {
                                List <object> excelLists = new List <object>();
                                foreach (TrainComprehensive trainComprehensive in lists)
                                {
                                    excelLists.Add(new TrainExcelVO(trainComprehensive));
                                }
                                //Console.WriteLine(lists.ToString());
                                //存放信息导出的列名
                                if (LanguageUtils.IsChainese())
                                {
                                    string[] colNames = { "实施日期", "使用器械", "组数", "组的个数", "组间隔休息时间", " 砝码", "移乘方法", "自觉运动强度", "时间(秒)", " 距离(mm)", "总工作量(J)", "热量(cal)", "指数", "已完成组数", "时机、姿势", "备忘", "注意点", "利用者感想" };
                                    ExcelUtil.GenerateOrdinaryExcel(sfd.FileName.ToString(), selectUser, ExcelUtil.ToDataTable("训练记录", colNames, excelLists));
                                }
                                else
                                {
                                    string[] colNames = { "Date", "Device name", "Groups", "Number", "Break time", " Weights", "Transfer method", "Conscious exercise intensity", "Time (seconds)", " Distance (mm)", "Total workload (J)", "Calories (cal)", "Index", "Completed groups", "Timing, posture", "Remark", "Be careful", "User feelings" };
                                    ExcelUtil.GenerateOrdinaryExcel(sfd.FileName.ToString(), selectUser, ExcelUtil.ToDataTable("Training record", colNames, excelLists));
                                }
                            }
                            else
                            {
                                MessageBoxX.Warning(LanguageUtils.ConvertLanguage("抱歉,没有数据", "Sorry, No Data!"));
                            }
                        }
                    }
                    else if (is_physicalevaluation.IsChecked == true)
                    {
                        //导出体力评价记录
                        if (selectUser != null)
                        {
                            List <PhysicalPower> lists = new ExcelService().ListPhysicalPowerExcelVO(selectUser.Pk_User_Id);
                            if (lists.Count > 0)
                            {
                                List <object> excelLists = new List <object>();
                                foreach (PhysicalPower physicalPower in lists)
                                {
                                    excelLists.Add(new PhysicaleExcelVO(physicalPower));
                                }

                                //存放信息导出的列名
                                if (LanguageUtils.IsChainese())
                                {
                                    string[] colNames = { "日期", "身高", "体重", "握力", "睁眼单脚站立", "功能性前伸", "坐姿体前屈", "time&up go", "5m步行-通常", "5m步行-最快", "10m步行", "6分钟步行", "2分钟踏步", "2分钟抬腿", "使用用者感想", "工作人员感想" };

                                    ExcelUtil.GenerateOrdinaryExcel(sfd.FileName.ToString(), selectUser,
                                                                    ExcelUtil.ToDataTable("体力评价记录", colNames, excelLists));
                                }
                                else
                                {
                                    string[] colNames = { "Date", "High", "Weight", "Grip", "Wink stand on one foot", "Functional reach", "Sitting body flexion", "time&up go", "5m walk - usually", "5m walk - fastest", "10m walk", "6 minutes walk", "2 String step", "2 minutes leg lift", "User experience", "Staff feelings" };

                                    ExcelUtil.GenerateOrdinaryExcel(sfd.FileName.ToString(), selectUser,
                                                                    ExcelUtil.ToDataTable("Physical Assessment Record", colNames, excelLists));
                                }
                            }
                            else
                            {
                                MessageBoxX.Warning(LanguageUtils.ConvertLanguage("抱歉,没有数据", "Sorry, No Data!"));
                            }
                        }
                    }
                }
                catch (IOException ex)
                {
                    MessageBoxX.Warning(LanguageUtils.ConvertLanguage("文件被占用,请先关闭文件", "The file is occupied. Please close the file first"));
                    return;
                }
                catch (Exception ex)
                {
                    Console.WriteLine("生成普通Excel异常");
                    return;
                }
            }
        }
예제 #11
0
        public NewTrainExcelVO(NewTrainComprehensive tc)
        {
            this.Gmt_Create = (DateTime)tc.Gmt_Create;
            //坐式划船机
            if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.Rowing"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.Rowing");
            }
            //坐式推胸机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.ChestPress"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.ChestPress");
            }
            //腿部推蹬机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.HorizontalLegPress"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.HorizontalLegPress");
            }
            //腹肌训练机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.AbdominalMuscleTraining"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.AbdominalMuscleTraining");
            }
            //三头肌训练机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.TricepsTraining"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.TricepsTraining");
            }
            //腿部外弯机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.LegAbduction"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.LegAbduction");
            }
            //腿部内弯机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.LegInturn"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.LegInturn");
            }
            //蝴蝶机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.ButterflyMachine"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.ButterflyMachine");
            }
            //反向蝴蝶机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.ReverseButterflyMachine"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.ReverseButterflyMachine");
            }
            //坐式背部伸展机
            else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.SittingBackExtender"))
            {
                this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.SittingBackExtender");
            }
            this.dp_groupcount = tc.dp_groupcount;
            this.dp_groupnum   = tc.dp_groupnum;
            this.dp_relaxtime  = tc.dp_relaxtime;
            this.dp_moveway    = DataCodeCache.GetInstance().GetCodeDValue(DataCodeTypeEnum.MoveWay, tc.dp_moveway + "");

            if (tc.PR_SportStrength == "10" || tc.PR_SportStrength == "9")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("困难", "Difficult");
            }
            else if (tc.PR_SportStrength == "8" || tc.PR_SportStrength == "7")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("有点困难", "A little difficult");
            }
            else if (tc.PR_SportStrength == "6" || tc.PR_SportStrength == "5")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("轻松", "Relaxed");
            }
            else if (tc.PR_SportStrength == "4" || tc.PR_SportStrength == "3")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("很轻松", "Easy");
            }
            else if (tc.PR_SportStrength == "2" || tc.PR_SportStrength == "1")
            {
                this.PR_SportStrength = LanguageUtils.ConvertLanguage("非常轻松", "Very easy");
            }
            else
            {
                this.PR_SportStrength = "";
            }

            this.PR_Finish_Time  = tc.PR_finish_time;
            this.PR_Energy       = tc.PR_Energy;
            this.PR_Finish_Num   = tc.PR_finish_num;
            this.PR_UserThoughts = tc.PR_UserThoughts;
        }
예제 #12
0
        private void Load_Data()
        {
            l1.Content = user.User_Name;
            l2.Content = user.Pk_User_Id;
            implementation_date.Content = physicaleDto.Gmt_Create.ToString();
            PhysicalPower physicalPower = new PhysicalPowerDAO().Load(physicaleDto.ID);

            //身高
            string[] ppHigh = Regex.Replace(physicalPower.PP_High, @"param\d", "").Split(new char[] { ',' });
            height_first.Text = ppHigh[1];
            if (LanguageUtils.EqualsResource(ppHigh[3], "PhysicalEvaluationFormView.Picture(front/lateral)"))
            {
                height_condition.IsChecked = true;
            }
            height_duty.Text = ppHigh[4];

            //体重
            string[] ppWeight = Regex.Replace(physicalPower.PP_Weight, @"param\d", "").Split(new char[] { ',' });
            weight_first.Text = ppWeight[1];
            if (ppWeight[3] != "")
            {
                weight_condition.IsChecked = true;
                weight_condition_text.Text = ppWeight[3].Split(new char[] { ':' })[1];
            }
            weight_duty.Text = ppWeight[4];

            //握力
            string[] ppGrip = Regex.Replace(physicalPower.PP_Grip, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppGrip[0], "PhysicalEvaluationFormView.L"))
            {
                grip_left.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppGrip[0], "PhysicalEvaluationFormView.R"))
            {
                grit_right.IsChecked = true;
            }

            grip_first.Text  = ppGrip[1];
            grip_second.Text = ppGrip[2];
            if (LanguageUtils.EqualsResource(ppGrip[3], "PhysicalEvaluationFormView.Standing"))
            {
                grid_stand.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppGrip[3], "PhysicalEvaluationFormView.Seated"))
            {
                grid_sit.IsChecked = true;
            }

            grip_duty.Text = ppGrip[4];


            //睁眼单脚站立
            string[] ppEyeOpenStand = Regex.Replace(physicalPower.PP_EyeOpenStand, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppEyeOpenStand[0], "PhysicalEvaluationFormView.L"))
            {
                stand_left.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppEyeOpenStand[0], "PhysicalEvaluationFormView.R"))
            {
                stand_right.IsChecked = true;
            }
            stand_first.Text  = ppEyeOpenStand[1];
            stand_second.Text = ppEyeOpenStand[2];
            if (LanguageUtils.EqualsResource(ppEyeOpenStand[3], "PhysicalEvaluationFormView.nosupport"))
            {
                stand_nosupport.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppEyeOpenStand[3], "PhysicalEvaluationFormView.Supportedbyassistance"))
            {
                stand_support.IsChecked = true;
            }
            else if (ppEyeOpenStand[3] != "")
            {
                string[] strings = ppEyeOpenStand[3].Split(new char[] { '(' });
                stand_toolsupport.IsChecked = true;
                string stand2 = strings[1].Substring(0, strings[1].Length - 1);
                //第一个框
                if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.T-Kane"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
                }
                else if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.Qtr-Cane"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
                }
                else if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.Walker"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
                }
                else if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.Other"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
                }
                //第二个框
                if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.RightFrontal"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.RightFrontal");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.RightLateral"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.RightLateral");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.LeftFrontal"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.LeftFrontal");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.LeftLateral"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.LeftLateral");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.BothFrontal"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.BothFrontal");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.BothLateral"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.BothLateral");
                }
            }

            stand_duty.Text = ppEyeOpenStand[4];

            //功能性前伸
            string[] ppFunctionProtract = Regex.Replace(physicalPower.PP_FunctionProtract, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppFunctionProtract[0], "PhysicalEvaluationFormView.Bothhands"))
            {
                protrack_twohands.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppFunctionProtract[0], "PhysicalEvaluationFormView.L"))
            {
                protrack_left.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppFunctionProtract[0], "PhysicalEvaluationFormView.R"))
            {
                protrack_right.IsChecked = true;
            }

            protrack_first.Text  = ppFunctionProtract[1];
            protrack_second.Text = ppFunctionProtract[2];
            if (LanguageUtils.EqualsResource(ppFunctionProtract[3], "PhysicalEvaluationFormView.Difficulttorisearmstoshoulder(ShoulderFlex)"))
            {
                protrack_curvature.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppFunctionProtract[3], "PhysicalEvaluationFormView.SeatedPosition"))
            {
                protrack_sit.IsChecked = true;
            }

            protrack_duty.Text = ppFunctionProtract[4];

            //坐姿体前屈
            string[] ppSitandReach = Regex.Replace(physicalPower.PP_SitandReach, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppSitandReach[0], "PhysicalEvaluationFormView.L"))
            {
                c17.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppSitandReach[0], "PhysicalEvaluationFormView.R"))
            {
                c18.IsChecked = true;
            }

            c_first.Text  = ppSitandReach[1];
            c_second.Text = ppSitandReach[2];
            if (LanguageUtils.EqualsResource(ppSitandReach[3], "PhysicalEvaluationFormView.KneeFlexion"))
            {
                c19.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppSitandReach[3], "PhysicalEvaluationFormView.NoKneeFlexion"))
            {
                c20.IsChecked = true;
            }
            c_duty.Text = ppSitandReach[4];

            //Time UP & GO
            string[] ppTimeUpGo = Regex.Replace(physicalPower.PP_TimeUpGo, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppTimeUpGo[0], "PhysicalEvaluationFormView.Basic"))
            {
                c21.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[0], "PhysicalEvaluationFormView.Modified"))
            {
                c22.IsChecked = true;
            }
            time_first.Text  = ppTimeUpGo[1];
            time_second.Text = ppTimeUpGo[2];
            if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Independent"))
            {
                c23.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Walker"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Other"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppTimeUpGo[3] != "")
            {
                c25.IsChecked = true;
                text1.Text    = ppTimeUpGo[3];
            }
            time_duty.Text = ppTimeUpGo[4];


            //5m步行,通常
            string[] ppWalk5MileGeneral = Regex.Replace(physicalPower.PP_Walk5MileGeneral, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[0], "PhysicalEvaluationFormView.Basic"))
            {
                c26.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[0], "PhysicalEvaluationFormView.Modified"))
            {
                c27.IsChecked = true;
            }
            five1_first.Text  = ppWalk5MileGeneral[1];
            five1_second.Text = ppWalk5MileGeneral[2];
            if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Independent"))
            {
                c28.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Walker"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Other"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk5MileGeneral[3] != "")
            {
                c30.IsChecked = true;
                text2.Text    = ppWalk5MileGeneral[3];
            }
            five1_duty.Text = ppWalk5MileGeneral[4];

            //5m步行,最快
            string[] ppWalk5MileFast = Regex.Replace(physicalPower.PP_Walk5MileFast, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppWalk5MileFast[0], "PhysicalEvaluationFormView.Basic"))
            {
                c31.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[0], "PhysicalEvaluationFormView.Modified"))
            {
                c32.IsChecked = true;
            }

            five2_first.Text  = ppWalk5MileFast[1];
            five2_second.Text = ppWalk5MileFast[2];
            if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Independent"))
            {
                c33.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Walker"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Other"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk5MileFast[3] != "")
            {
                c35.IsChecked = true;
                text3.Text    = ppWalk5MileFast[3];
            }

            five2_duty.Text = ppWalk5MileFast[4];

            //10m步行
            string[] ppWalk10Mile = Regex.Replace(physicalPower.PP_Walk10Mile, @"param\d", "").Split(new char[] { ',' });
            string   methodStr    = "";

            if (ppWalk10Mile[0].Contains("通常") || ppWalk10Mile[0].Contains("Normal"))
            {
                methodStr = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Normal");
            }
            else if (ppWalk10Mile[0].Contains("最快") || ppWalk10Mile[0].Contains("utmost"))
            {
                methodStr = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.utmost");
            }
            method.Text = methodStr;
            if (ppWalk10Mile[0].Contains("基本方法") || ppWalk10Mile[0].Contains("Basic"))
            {
                c36.IsChecked = true;
            }
            else if (ppWalk10Mile[0].Contains("常规外方法") || ppWalk10Mile[0].Contains("Modified"))
            {
                c37.IsChecked = true;
            }

            ten_first.Text  = ppWalk10Mile[1];
            ten_second.Text = ppWalk10Mile[2];
            if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Independent"))
            {
                c38.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Walker"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Other"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk10Mile[3] != "")
            {
                c40.IsChecked = true;
                text4.Text    = ppWalk10Mile[3];
            }

            ten_duty.Text = ppWalk10Mile[4];

            //6分钟步行
            string[] ppWalk6Minute = Regex.Replace(physicalPower.PP_Walk6Minute, @"param\d", "").Split(new char[] { ',' });
            six_first.Text  = ppWalk6Minute[1];
            six_second.Text = ppWalk6Minute[2];
            if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Independent"))
            {
                c43.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Walker"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Other"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk6Minute[3] != "")
            {
                c45.IsChecked = true;
                text5.Text    = ppWalk6Minute[3];
            }

            six_duty.Text = ppWalk6Minute[4];

            //2分钟踏步
            string[] ppStep2Minute = Regex.Replace(physicalPower.PP_Step2Minute, @"param\d", "").Split(new char[] { ',' });
            two_first.Text  = ppStep2Minute[1];
            two_second.Text = ppStep2Minute[2];
            if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Independent"))
            {
                c46.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Walker"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Other"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppStep2Minute[3] != "")
            {
                c48.IsChecked = true;
                text6.Text    = ppStep2Minute[3];
            }

            two_duty.Text = ppStep2Minute[4];

            //2分钟抬腿
            string[] ppLegRaise2Minute = Regex.Replace(physicalPower.PP_LegRaise2Minute, @"param\d", "").Split(new char[] { ',' });
            twoleg_first.Text  = ppLegRaise2Minute[1];
            twoleg_second.Text = ppLegRaise2Minute[2];
            if (LanguageUtils.EqualsResource(ppLegRaise2Minute[3], "PhysicalEvaluationFormView.Standing"))
            {
                c49.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppLegRaise2Minute[3], "PhysicalEvaluationFormView.Seated"))
            {
                c50.IsChecked = true;
            }

            twoleg_duty.Text = ppLegRaise2Minute[4];

            //使用者感想
            string ppUserMemo = physicalPower.PP_UserMemo;

            user_think.Text = ppUserMemo;

            //工作人员感想
            string ppWorkerMemo = physicalPower.PP_WorkerMemo;

            worker_think.Text = ppWorkerMemo;
        }