Exemplo n.º 1
0
        private void ShowInfo_OnClick(object sender, RoutedEventArgs e)
        {
            Button button                 = sender as Button;
            double longtitute             = double.Parse(Longtitute.Text);
            double lattitute              = double.Parse(Lattitute.Text);
            IEnumerable <GeoPoint> points = new List <GeoPoint>
            {
                new GeoPoint(longtitute, lattitute)
            };

            switch (button.Content.ToString())
            {
            case "查询2G结果":
                Info2G.ItemsSource = null;
                Info2G.ItemsSource = DCTestService.Query2GFileRecords(points, 0.03);
                break;

            case "查询3G结果":
                Info3G.ItemsSource = null;
                Info3G.ItemsSource = DCTestService.Query3GFileRecords(points, 0.03);
                break;

            case "查询4G结果":
                Info4G.ItemsSource = null;
                Info4G.ItemsSource = DCTestService.Query4GFileRecords(points, 0.03);
                break;
            }
        }
Exemplo n.º 2
0
 public static void UpdateCoverageInfos(IEnumerable <IGeoPointReadonly <double> > points,
                                        double range)
 {
     FileRecords2GList = DCTestService.Query2GFileRecords(points, range).ToList();
     FileRecords3GList = DCTestService.Query3GFileRecords(points, range).ToList();
     FileRecords4GList = DCTestService.Query4GFileRecords(points, range).ToList();
 }
Exemplo n.º 3
0
        public ActionResult List()
        {
            TestListViewModel viewModel = new TestListViewModel
            {
                AreaTestDateList = DCTestService.QueryTestDateInfos().ToList(),
                TownList         = towns
            };

            return(View(viewModel));
        }
Exemplo n.º 4
0
        public IEnumerable <DtFileInfo> GetByKeyword(string district, string keyword, string type = "")
        {
            IEnumerable <CsvFilesInfo> result = DCTestService.QueryDtFileInfos(district, keyword, type);

            return(result.Select(x => new DtFileInfo
            {
                TestDate = (x.TestDate ?? DateTime.Today).ToShortDateString(),
                Type = x.DataType.Trim(),
                Name = x.CsvFileName.Trim()
            }));
        }
Exemplo n.º 5
0
        public ActionResult FileRecords4G(string fileName)
        {
            FileRecordsRepository.Update4GList(DCTestService.Query4GFileRecords(fileName).ToList());
            TestFileRecordsViewModel viewModel = new TestFileRecordsViewModel
            {
                CenterX  = FileRecordsRepository.FileRecords4GList.Average(x => x.BaiduLongtitute),
                CenterY  = FileRecordsRepository.FileRecords4GList.Average(x => x.BaiduLattitute),
                FileName = fileName
            };

            return(View(viewModel));
        }
Exemplo n.º 6
0
        public IEnumerable <string> Get(string town, string type)
        {
            IEnumerable <string> filesList = DCTestService.QueryRasterInfos(town, type).Select(x =>
                                                                                               type == "2G"
                    ? x.CsvFilesName2G.Trim()
                    : (type == "3G" ? x.CsvFilesName3G.Trim() : x.CsvFilesName4G.Trim()));
            List <string> result = new List <string>();

            foreach (string files in filesList)
            {
                result.AddRange(files.Split(';'));
            }
            return(result.Distinct());
        }
Exemplo n.º 7
0
 public IEnumerable <AreaTestDate> Get()
 {
     return(DCTestService.QueryTestDateInfos().ToList());
 }