private void radarClick(object sender, RoutedEventArgs e)//雷达
        {
            try
            {
                listType            = _listType.radar;
                AIS.IsChecked       = false;
                radar.IsChecked     = false;
                fuse.IsChecked      = false;
                login.IsChecked     = false;
                operation.IsChecked = false;
                alarm.IsChecked     = false;
                device.IsChecked    = false;

                radar.IsChecked = true;
                long startTime = dataTime()[0]; //开始时间
                long endTime   = dataTime()[1]; //结束时间

                AISList.Visibility       = Visibility.Collapsed;
                radarList.Visibility     = Visibility.Visible;
                fuseList.Visibility      = Visibility.Collapsed;
                userLoginList.Visibility = Visibility.Collapsed;
                operateList.Visibility   = Visibility.Collapsed;
                alarmList.Visibility     = Visibility.Collapsed;
                deviceList.Visibility    = Visibility.Collapsed;
                radarp = new dataAnadll.RadarDataProvider((uint)startTime, (uint)endTime);

                List <dataAnadll.FUS_ICD_MySql.RdDetectMsg_SS> list;
                radarp.GetPageNum(out PageIndex.Total);
                PageIndex.Current = 1;

                radarDataList.Clear();
                for (int j = 0; j < PageIndex.Total; j++)
                {
                    radarp.GetPage(j + 1, out list);
                    for (int i = 0; i < list.Count; i++)
                    {
                        radarData radarTarget = new radarData();
                        radarTarget.radarID   = list[i].PardPara.ucRadarID.ToString();
                        radarTarget.number    = list[i].radar_count;
                        radarTarget.distance  = list[i].ulTargetDis;
                        radarTarget.longitude = list[i].dLongti;
                        radarTarget.latitude  = list[i].dLati;
                        radarTarget.angle     = list[i].ulTargetCourse;
                        radarTarget.north     = list[i].dNorthCourse;
                        radarTarget.speed     = list[i].ulTargetSpeed;
                        radarTarget.time      = (GetTime((list[i].lFoundTime).ToString())).ToString();

                        radarDataList.Add(radarTarget);
                    }
                }
                radarList.DataContext = radarDataList;
            }
            catch (Exception ee)
            {
            }
        }
        void changeContent(_listType type, int currentPage)
        //将表格的内容进行切换
        {
            try
            {
                PageIndex.Current = currentPage;

                switch (type)
                {
                case _listType.alarm:
                    List <dataAnadll.AlarmLog> list;
                    alarmp.GetPage(currentPage, out list);
                    alarmDataList.Clear();
                    for (int i = 0; i < list.Count; i++)
                    {
                        alarmData alarmTarget = new alarmData();

                        string a = "";

                        if (list[i].alarm_area_num == 201)
                        {
                            a = alarmType[0];
                        }
                        else if (list[i].alarm_area_num == 202)
                        {
                            a = alarmType[1];
                        }
                        else if (list[i].alarm_area_num == 203)
                        {
                            a = alarmType[2];
                        }
                        else if (list[i].alarm_area_num >= 210 && list[i].alarm_area_num <= 215)
                        {
                            a = alarmType[3];
                        }
                        else if (list[i].alarm_area_num >= 220 && list[i].alarm_area_num <= 225)
                        {
                            a = alarmType[4];
                        }
                        else if (list[i].alarm_area_num == 255)
                        {
                            a = alarmType[5];
                        }
                        alarmTarget.DisplayNumber = (i + (PageIndex.Current - 1) * 1000).ToString();
                        alarmTarget.alarmNumber   = a;
                        alarmTarget.time          = list[i].time.ToString();
                        alarmTarget.radarNumber   = list[i].radar_batch_id.ToString();
                        alarmTarget.radarNumber2  = list[i].radar_batch_id2.ToString();   //告警日志添加雷达2 批号

                        alarmTarget.IMO = list[i].ais_batch_id.ToString();
                        switch (list[i].alarm_type)
                        {
                        case 1:
                            alarmTarget.alarmString = "驶入";
                            break;

                        case 2:
                            alarmTarget.alarmString = "驶出";
                            break;

                        default:
                            alarmTarget.alarmString = "未知报警";
                            break;
                        }
                        switch (list[i].country)
                        {
                        case 412:
                        case 413:
                            alarmTarget.country = "中国";
                            break;

                        case 574:
                        case 576:
                            alarmTarget.country = "越南";
                            break;

                        case 533:
                            alarmTarget.country = "马拉西亚";
                            break;

                        default:
                            alarmTarget.country = "其他";
                            break;
                        }

                        alarmTarget.Atrrib = state[list[i].iff_attrib];
                        alarmDataList.Add(alarmTarget);
                    }
                    alarmList.DataContext = alarmDataList;
                    break;

                case _listType.ais:
                    List <dataAnadll.FUS_ICD_MySql.AISMsg_SS> list_ais;
                    aisp.GetPage(currentPage, out list_ais);
                    AISDataList.Clear();
                    for (int i = 0; i < list_ais.Count; i++)
                    {
                        AISData AISTarget = new AISData();

                        AISTarget.boatName   = list_ais[i].cName;
                        AISTarget.IMO        = list_ais[i].ulIMO;
                        AISTarget.MMSI       = list_ais[i].ulRecoCode;
                        AISTarget.call       = list_ais[i].cCall_ID;
                        AISTarget.country    = list_ais[i].country;
                        AISTarget.longitude  = list_ais[i].dLong;
                        AISTarget.latitude   = list_ais[i].dLat;
                        AISTarget.angle      = list_ais[i].fDirectCourse;
                        AISTarget.speed      = list_ais[i].fDirectSpeed;
                        AISTarget.time       = (GetTime((list_ais[i].ulTime).ToString())).ToString();
                        AISTarget.trackState = list_ais[i].ucSailStatus;
                        AISTarget.high       = list_ais[i].fMaxDeep;
                        AISTarget.people     = list_ais[i].ulCount;
                        AISTarget.destance   = list_ais[i].cDestination;

                        AISDataList.Add(AISTarget);
                    }
                    AISList.DataContext = AISDataList;
                    break;

                case _listType.dev:

                    List <dataAnadll.SystemLog> list_dev;
                    devp.GetPage(currentPage, out list_dev);
                    deviceDataList.Clear();
                    for (int i = 0; i < list_dev.Count; i++)
                    {
                        deviceData deviceTarget = new deviceData();

                        deviceTarget.number       = i.ToString();
                        deviceTarget.ip           = list_dev[i].machine_IP.ToString();
                        deviceTarget.device       = list_dev[i].machine_Name.ToString();
                        deviceTarget.networkState = this.type[list_dev[i].machine_Network];
                        deviceTarget.workState    = this.type[list_dev[i].machine_Workstate];
                        deviceTarget.time         = list_dev[i].machine_time.ToString();
                        deviceTarget.other        = list_dev[i].reason.ToString();

                        deviceDataList.Add(deviceTarget);
                    }
                    deviceList.DataContext = deviceDataList;
                    break;

                case _listType.fus:
                    List <dataAnadll.FUS_ICD_MySql.FusTarget_SS> list_fus;
                    fusp.GetPage(currentPage, out list_fus);
                    fuseDataList.Clear();
                    for (int i = 0; i < list_fus.Count; i++)
                    {
                        fuseData fuseTarget = new fuseData();
                        fuseTarget.number = list_fus[i].lFusBatchID;
                        fuseTarget.time   = (GetTime((list_fus[i].lTime).ToString())).ToString();
                        string a = "";
                        if (list_fus[i].FusDataType == "2")
                        {
                            a = mix[0];
                        }
                        else if (list_fus[i].FusDataType == "3")
                        {
                            a = mix[1];
                        }
                        else if (list_fus[i].FusDataType == "100")
                        {
                            a = mix[2];
                        }
                        fuseTarget.type            = a;
                        fuseTarget.dataNumber      = list_fus[i].SrcNum;
                        fuseTarget.longitude       = list_fus[i].dLongti;
                        fuseTarget.latitude        = list_fus[i].dLati;
                        fuseTarget.angle           = list_fus[i].dNorthCourse;
                        fuseTarget.name            = list_fus[i].cName;
                        fuseTarget.call            = list_fus[i].cCall_ID;
                        fuseTarget.country         = list_fus[i].country;
                        fuseTarget.Atrrbi          = state[Convert.ToInt32(list_fus[i].ucIFFAttrib)];
                        fuseTarget.high            = list_fus[i].fMaxDeep;
                        fuseTarget.people          = list_fus[i].ulCount;
                        fuseTarget.IMO             = list_fus[i].ulAISBatchID;
                        fuseTarget.radar_batch_id  = list_fus[i].ulRdbatchID;
                        fuseTarget.radar_batch_id2 = list_fus[i].ulOpticalID;
                        fuseDataList.Add(fuseTarget);
                    }

                    fuseList.DataContext = fuseDataList;
                    break;

                case _listType.radar:
                    List <dataAnadll.FUS_ICD_MySql.RdDetectMsg_SS> list_rd;
                    radarp.GetPage(currentPage, out list_rd);
                    radarDataList.Clear();
                    for (int i = 0; i < list_rd.Count; i++)
                    {
                        radarData radarTarget = new radarData();
                        radarTarget.radarID   = list_rd[i].PardPara.ucRadarID.ToString();
                        radarTarget.number    = list_rd[i].lTargetNo;
                        radarTarget.distance  = list_rd[i].ulTargetDis;
                        radarTarget.longitude = list_rd[i].dLongti;
                        radarTarget.latitude  = list_rd[i].dLati;
                        radarTarget.angle     = list_rd[i].ulTargetCourse;
                        radarTarget.north     = list_rd[i].dNorthCourse;
                        radarTarget.speed     = list_rd[i].ulTargetSpeed;
                        // if (list_rd[i].radar_count == 70.ToString())
                        {
                            //   radarTarget.time = list_rd[i].lFoundTime;
                        }
                        //  else
                        {
                            radarTarget.time = (GetTime((list_rd[i].lFoundTime).ToString())).ToString();
                        }

                        radarDataList.Add(radarTarget);
                    }
                    radarList.DataContext = radarDataList;
                    break;

                case _listType.ope1:
                    List <dataAnadll.OperationLog> list_ope1;
                    opep.GetPage(currentPage, out list_ope1);
                    loginDataList.Clear();
                    for (int i = 0; i < list_ope1.Count; i++)
                    {
                        loginData loginTarget = new loginData();

                        loginTarget.logNumber = (i + (PageIndex.Current - 1) * 1000).ToString();
                        loginTarget.userName  = list_ope1[i].UserName.ToString();
                        loginTarget.operate   = list_ope1[i].OptionName;
                        loginTarget.time      = list_ope1[i].OptionTime.ToString();
                        loginTarget.result    = list_ope1[i].Result.ToString();
                        loginTarget.other     = list_ope1[i].Note;
                        loginTarget.ip        = list_ope1[i].IP.ToString();
                        loginTarget.type      = logType[list_ope1[i].LogType].ToString();
                        loginDataList.Add(loginTarget);
                    }
                    userLoginList.DataContext = loginDataList;
                    break;

                case _listType.ope2:
                    List <dataAnadll.OperationLog> list_ope2;
                    opep.GetPage(currentPage, out list_ope2);
                    operateDataList.Clear();
                    for (int i = 0; i < list_ope2.Count; i++)
                    {
                        operateData operateTarget = new operateData();

                        operateTarget.logNumber = (i + (PageIndex.Current - 1) * 1000).ToString();
                        operateTarget.userName  = list_ope2[i].UserName.ToString();
                        operateTarget.operate   = list_ope2[i].OptionName.ToString();
                        operateTarget.time      = list_ope2[i].OptionTime.ToString();
                        operateTarget.result    = list_ope2[i].Result;
                        operateTarget.other     = list_ope2[i].Note.ToString();
                        operateTarget.ip        = list_ope2[i].IP.ToString();
                        operateTarget.type      = logType[list_ope2[i].LogType].ToString();

                        operateDataList.Add(operateTarget);
                    }
                    operateList.DataContext = operateDataList;
                    break;
                }
            }
            catch (Exception ee)
            {
            }
        }