BMap.NET.WindowsForm/BPOITipControl.cs

(开头部分) 13KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using BMap.NET.WindowsForm.BMapElements;
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

namespace BMap.NET.WindowsForm
{
    /// <summary>
    /// POI信息显示控件
    /// </summary>
    partial class BPOITipControl : UserControl
    {
        public event SearchNearbyStartedEventHandler SearchNearbyStarted;

        public event DirectionStartedEventHandler DirecttionStarted;

        /// <summary>
        /// 选项卡
        /// </summary>
        private int _tab_index = 0;

        private BPOI _poi;

        /// <summary>
        /// 与之对应的POI
        /// </summary>
        public BPOI POI
        {
            get
            {
                return _poi;
            }
            set
            {
                _poi = value;
                //
                if (_poi.DataSource["name"] != null)
                    lnkName.Text = (string)_poi.DataSource["name"]; //具体json格式参见api文档
                if (_poi.DataSource["address"] != null)
                    txtAddress.Text = (string)_poi.DataSource["address"];
                if (_poi.DataSource["telephone"] != null)
                    txtPhone.Text = (string)_poi.DataSource["telephone"];
                if (_poi.DataSource["detail_info"] != null && _poi.DataSource["detail_info"]["price"] != null)
                    txtPrice.Text = "人均:¥" + (string)_poi.DataSource["detail_info"]["price"];
                if (_poi.DataSource["detail_info"] != null && _poi.DataSource["detail_info"]["tag"] != null)
                    txtTag.Text = (string)_poi.DataSource["detail_info"]["tag"];
            }
        }

        /// <summary>
        /// 当前建议搜索城市
        /// </summary>
        public string CurrentCity
        {
            get
            {
                return bPlaceBox.CurrentCity;
            }
            set
后面还有 271 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。