コード例 #1
0
        /// <summary>
        /// 构建
        /// </summary>
        /// <param name="time"></param>
        /// <returns></returns>
        public string [] Build(Time time)
        {
            var urlModels = BuildWithUrlDirectory(new List <String>(UrlModels));

            urlModels = BuildWithProductType(urlModels);
            urlModels = ELMarkerReplaceService.BuildWithTime(urlModels, time);
            urlModels = BuildWithSourceName(urlModels);
            urlModels = BuildWithSiteNames(urlModels);
            urlModels = RemoveRedundancy(urlModels);

            return(urlModels.ToArray());
        }
コード例 #2
0
ファイル: NaviFileDownloadForm.cs プロジェクト: yxw027/GNSSer
        private void button_gen_urls_Click(object sender, EventArgs e)
        {
            string   urlModel = this.textBox1_uriModel.Text;
            DateTime timeFrom = timePeriodControl1.TimePeriod.StartDateTime;    //.TimeFrom;
            DateTime timeTo   = this.timePeriodControl1.TimePeriod.EndDateTime; //.TimeTo;

            var           daySpan = TimeSpan.FromDays(1);
            List <string> urls    = ELMarkerReplaceService.BuildWithTime(urlModel, timeFrom, timeTo, TimeSpan.FromDays(1));

            this.richTextBoxControl1.Lines = urls.ToArray();

            log.Info("生成 " + urls.Count + " 条地址。");
        }
コード例 #3
0
        private List <string> BuildWithTime(List <string> urlModels)
        {
            Time          from   = Time.Parse(TimeFrom);
            Time          to     = Time.Parse(TimeTo);
            List <string> pathes = new List <string>();

            for (Time ifrom = from; ifrom <= to; ifrom = ifrom + TimeIntervalInSeconds)
            {
                List <string> subPathes = ELMarkerReplaceService.BuildWithTime(urlModels, ifrom);
                pathes.AddRange(subPathes);
            }
            return(pathes.Distinct().ToList());
        }
コード例 #4
0
ファイル: ObsFileDownloadForm.cs プロジェクト: yxw027/GNSSer
        private void button_gen_urls_Click(object sender, EventArgs e)
        {
            string   urlModel = this.textBox1_uriModel.Text;
            DateTime timeFrom = timePeriodControl1.TimePeriod.StartDateTime;    //.TimeFrom;
            DateTime timeTo   = this.timePeriodControl1.TimePeriod.EndDateTime; //.TimeTo;

            string[] siteNames = namedStringControl_siteNames.GetValue().Split(new char[] { ',', ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);

            var           daySpan = TimeSpan.FromDays(1);
            List <string> urls    = ELMarkerReplaceService.BuildWithTime(urlModel, timeFrom, timeTo, TimeSpan.FromDays(1));

            urls = ELMarkerReplaceService.BuildWithKeys(urls, ELMarker.SiteName, siteNames);

            richTextBoxControl_allUrls.Lines = urls.ToArray();

            var info = "生成 " + urls.Count + " 条数据。";

            ShowInfo(info);
            Geo.Utils.FormUtil.ShowOkMessageBox(info);
        }