public DataQuery()
        {
            try
            {
                InitializeComponent();

                StartTime.PreviewMouseDown += EmptyState;
                EndTime.PreviewMouseDown   += EmptyState;
                StartTime.SetTime           = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1, 0, 0, 0);
                EndTime.SetTime             = DateTime.Now;

                DataQueryPageNumber dqpn = new DataQueryPageNumber();
                pageNumber.DataContext = dqpn;

                PageIndex          = new _PageIndex();
                AISList.Visibility = Visibility.Visible;
                starttime          = GetTimeStamp(new DateTime(1970, 1, 1));
                endtime            = GetTimeStamp(new DateTime(2099, 1, 1));
                aisp = new dataAnadll.AISDataProvider((uint)starttime, (uint)endtime);
                List <dataAnadll.FUS_ICD_MySql.AISMsg_SS> list;
                aisp.GetPageNum(out PageIndex.Total);
                aisp.GetFirtstPage(out list);
                PageIndex.Current = 1;
                AISDataList.Clear();
                for (int i = 1; i < list.Count; i++)
                {
                    AISData AIS = new AISData();

                    AIS.boatName = list[i].cName;
                    AIS.IMO      = list[i].ulIMO;
                    AIS.MMSI     = list[i].ulRecoCode;
                    AIS.call     = list[i].cCall_ID;
                    AIS.country  = list[i].country;

                    AIS.longitude  = list[i].dLong;
                    AIS.latitude   = list[i].dLat;
                    AIS.angle      = list[i].fDirectCourse;
                    AIS.speed      = list[i].fDirectSpeed;
                    AIS.time       = (GetTime((list[i].ulTime).ToString())).ToString();
                    AIS.trackState = list[i].ucSailStatus;
                    AIS.high       = list[i].fMaxDeep;
                    AIS.people     = list[i].ulCount;
                    AIS.destance   = list[i].cDestination;
                    AISDataList.Add(AIS);
                }
                AISList.DataContext = AISDataList;
            }
            catch (Exception ee)
            {
            }
        }
        private void AISClick(object sender, RoutedEventArgs e)//AIS
        {
            try
            {
                listType = _listType.ais;


                AIS.IsChecked       = false;
                radar.IsChecked     = false;
                fuse.IsChecked      = false;
                login.IsChecked     = false;
                operation.IsChecked = false;
                alarm.IsChecked     = false;
                device.IsChecked    = false;

                AIS.IsChecked = true;
                long startTime = dataTime()[0] + 28800; //开始时间
                long endTime   = dataTime()[1] + 28800; //结束时间
                int  pages     = 0;
                AISList.Visibility       = Visibility.Visible;
                radarList.Visibility     = Visibility.Collapsed;
                fuseList.Visibility      = Visibility.Collapsed;
                userLoginList.Visibility = Visibility.Collapsed;
                operateList.Visibility   = Visibility.Collapsed;
                alarmList.Visibility     = Visibility.Collapsed;
                deviceList.Visibility    = Visibility.Collapsed;
                aisp = new dataAnadll.AISDataProvider((uint)startTime, (uint)endTime);
                List <dataAnadll.FUS_ICD_MySql.AISMsg_SS> list;

                aisp.GetPageNum(out PageIndex.Total);
                PageIndex.Current = 1;
                aisp.GetFirtstPage(out list);
                AISDataList.Clear();
                for (int i = 0; i < list.Count; i++)
                {
                    AISData AISTarget = new AISData();

                    AISTarget.boatName = list[i].cName;
                    AISTarget.IMO      = list[i].ulIMO;
                    AISTarget.MMSI     = list[i].ulRecoCode;
                    AISTarget.call     = list[i].cCall_ID;
                    AISTarget.country  = list[i].country;

                    AISTarget.longitude  = list[i].dLong;
                    AISTarget.latitude   = list[i].dLat;
                    AISTarget.angle      = list[i].fDirectCourse;
                    AISTarget.speed      = list[i].fDirectSpeed;
                    AISTarget.time       = (GetTime((list[i].ulTime).ToString())).ToString();
                    AISTarget.trackState = list[i].ucSailStatus;
                    AISTarget.high       = list[i].fMaxDeep;
                    AISTarget.people     = list[i].ulCount;
                    AISTarget.destance   = list[i].cDestination;

                    AISDataList.Add(AISTarget);
                }
                AISList.DataContext = AISDataList;
                currentPage.Text    = PageIndex.Current.ToString();
                totalPages.Text     = PageIndex.Total.ToString();
                numberRule.Max      = PageIndex.Total;
            }
            catch (Exception ee)
            {
            }
        }