コード例 #1
0
        /// <summary>
        /// 添加单个标注
        /// </summary>
        /// <param name="LogPnt"></param>
        public IMSMark AddMark(marketsInfo market)
        {
            if (this.markLayer1 == null)
            {
                MessageBox.Show("标注图层为空!");
                return(null);
            }
            img        = new Image();
            img.Source = new BitmapImage(new Uri("../images/SiteIcon.png", UriKind.Relative));
            img.Height = 48;
            img.Width  = 38;

            tips = new  EditMark(market.MarketName, market.MarketID.ToString(), market.Address, "");
            //tips(market);
            IMSMark mark = new IMSMark(tips, CoordinateType.Logic, markLayer1);

            mark.EnableAnimation  = false;
            mark.EnableRevisedPos = true;

            Point pnt = new Point(market.X, market.Y);


            mark.X       = pnt.X;
            mark.Y       = pnt.Y;
            mark.OffsetX = -19;
            mark.OffsetY = -48;
            markLayer1.AddMark(mark);

            return(mark);
        }
コード例 #2
0
        /// <summary>
        /// 添加报警门店
        /// </summary>
        /// <param name="LogPnt"></param>
        public void AddMarkGif(marketsInfo warnMarket)
        {
            if (warnMarks == null)
            {
                warnMarks = new List <IMSMark>();
            }
            GIFToolTip gif = new GIFToolTip();

            gif.Addtip(warnMarket);
            IMSMark mark = new IMSMark(gif, CoordinateType.Logic, this.markLayer);

            mark.EnableAnimation  = false;
            mark.EnableRevisedPos = true;

            Point pnt = new Point(warnMarket.X, warnMarket.Y);

            pnt   = this.mapContainer.LogicToScreen(pnt.X, pnt.Y);
            pnt.X = pnt.X - 11;
            pnt.Y = pnt.Y - 11;
            pnt   = this.mapContainer.ScreenToLogic(pnt.X, pnt.Y);

            mark.X = pnt.X;
            mark.Y = pnt.Y;
            warnMarks.Add(mark);
            this.markLayer.AddMark(mark);
            this.mapContainer.SetCenter(warnMarket.X, warnMarket.Y);
        }
コード例 #3
0
 public void Addtip(marketsInfo content)
 {
     this.TextID.Text   = content.MarketID.ToString();
     this.TextName.Text = content.MarketName;
     this.TextAddr.Text = content.Address;
     //this.tip.Text = content;
 }
コード例 #4
0
 /// <summary>
 /// 分店:0
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void No_checked(object sender, RoutedEventArgs e)
 {
     if (_marketsInfo == null)
     {
         _marketsInfo = new marketsInfo();
     }
     _marketsInfo.CenterFlag = 0;
     setCenterID();
     flag = 0;
     this.centerID0.IsEnabled = true;
     this.tabitem4.IsEnabled  = false;
 }
コード例 #5
0
 /// <summary>
 /// 是总店:1
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void is_checked(object sender, RoutedEventArgs e)
 {
     if (_marketsInfo == null)
     {
         _marketsInfo = new marketsInfo();
     }
     _marketsInfo.CenterFlag = 1;
     flag = 1;
     this.ImportMoney.IsEnabled = false;
     this.SaledMoney.IsEnabled  = false;
     this.centerID0.IsEnabled   = false;
     this.tabitem3.IsEnabled    = false;
 }
コード例 #6
0
        /// <summary>
        /// 添加单个标注
        /// </summary>
        /// <param name="LogPnt"></param>
        public void AddMarkGif(marketsInfo warnMarket)
        {
            GIFToolTip gif = new GIFToolTip();

            gif.Addtip(warnMarket);
            IMSMark mark = new IMSMark(gif, CoordinateType.Logic, markLayer1);

            mark.EnableAnimation  = false;
            mark.EnableRevisedPos = true;

            Point pnt = new Point(warnMarket.X, warnMarket.Y);

            pnt.X = pnt.X - 11;
            pnt.Y = pnt.Y - 11;
            pnt   = this.mapContainer.ScreenToLogic(pnt.X, pnt.Y);

            mark.X = pnt.X;
            mark.Y = pnt.Y;

            markLayer1.AddMark(mark);
        }