private void endPageClick(object sender, RoutedEventArgs e)//末页
        {
            if (allPage == 0)
            {
                MessageBoxX.Show("提示", "还没有进行查询");
                return;
            }
            if (currectPage == allPage)
            {
                MessageBoxX.Show("提示", "已经到尾页");
                return;
            }
            linkageList.Clear();
            List <Capture> dataList = new List <Capture>();

            captureData.GetLastPage(out dataList);//初始化最后一页数据
            currectPage = allPage;
            for (int i = 0; i < dataList.Count; i++)
            {
                LinkageTarget lt = new LinkageTarget
                {
                    ID        = i,
                    StartTime = dataList[i].linkage_start.ToString(),
                    EndTime   = dataList[i].linkage_end.ToString(),
                    Target    = dataList[i].target_Id.ToString(),
                    Number    = dataList[i].Ship_number,
                    ImagePath = dataList[i].picture_path,
                };
                linkageList.Add(lt);
            }
            LinkageListView.DataContext = linkageList;
            currentPage.Text            = currectPage.ToString();
        }
        private void chooseClick(object sender, RoutedEventArgs e)//时间确定
        {
            string start = StartTime.year.Text + StartTime.month.Text + StartTime.day.Text + " " + StartTime.hour.Text + StartTime.minute.Text + StartTime.second.Text;
            string end   = EndTime.year.Text + EndTime.month.Text + EndTime.day.Text + " " + EndTime.hour.Text + EndTime.minute.Text + EndTime.second.Text;

            try
            {
                linkStart = Convert.ToDateTime(start); //string转datatime(end)

                linkEnd = Convert.ToDateTime(end);     //string转datatime(end)
                if (DateTime.Compare(linkStart, linkEnd) >= 0)
                {
                    MessageBoxX.Show("提示", "选择的时间段不合法");
                    return;
                }
            }
            catch
            {
                MessageBoxX.Show("提示", "选择的时间格式不合法");
                return;
            }
            captureData = new SeleCaptureProvider(linkStart, linkEnd, 20);//联动事件查询事件
            captureData.GetPageNum(out allPage);
            rule.Max = allPage;
            List <Capture> dataList = new List <Capture>();

            try
            {
                captureData.GetPage(1, out dataList);//初始化第一页数据
                currectPage = 1;
            }
            catch (Exception ex)
            {
                MessageBoxX.Show("提示", ex.Message);
            }
            linkageList.Clear();
            for (int i = 0; i < dataList.Count; i++)
            {
                LinkageTarget lt = new LinkageTarget
                {
                    ID        = i,
                    StartTime = dataList[i].linkage_start.ToString(),
                    EndTime   = dataList[i].linkage_end.ToString(),
                    Target    = dataList[i].target_Id.ToString(),
                    Number    = dataList[i].Ship_number,
                    ImagePath = dataList[i].picture_path,
                };
                linkageList.Add(lt);
            }
            LinkageListView.DataContext = linkageList;
            totalPages.Text             = allPage.ToString();//显示所有页数
            currentPage.Text            = currectPage.ToString();
        }
        private void changeToPageClick(object sender, RoutedEventArgs e)//跳转到某页
        {
            if (allPage == 0)
            {
                MessageBoxX.Show("提示", "还没有进行查询");
                return;
            }
            int toPage = 1;

            try
            {
                toPage = (int)double.Parse(pageNumber.Text);//跳转到的页码
            }
            catch
            {
                MessageBoxX.Show("提示", "跳转的页码不合法");
                pageNumber.Text = currectPage.ToString();
                return;
            }
            if (toPage <= allPage && toPage >= 1)
            {
                currectPage = toPage;
                linkageList.Clear();
                List <Capture> dataList = new List <Capture>();
                captureData.GetPage(toPage, out dataList);//初始化对应页数据
                for (int i = 0; i < dataList.Count; i++)
                {
                    LinkageTarget lt = new LinkageTarget
                    {
                        ID        = i,
                        StartTime = dataList[i].linkage_start.ToString(),
                        EndTime   = dataList[i].linkage_end.ToString(),
                        Target    = dataList[i].target_Id.ToString(),
                        Number    = dataList[i].Ship_number,
                        ImagePath = dataList[i].picture_path,
                    };
                    linkageList.Add(lt);
                }
                LinkageListView.DataContext = linkageList;
            }
            else
            {
                MessageBoxX.Show("提示", "跳转的页码不合法");
                pageNumber.Text = currectPage.ToString();
                return;
            }
            currentPage.Text = toPage.ToString();
        }