Exemple #1
0
 /// <summary>
 /// AGV标示图片初始化
 /// </summary>
 public void AnimatedImageInit()
 {
     animatedImage        = new Image();
     animatedImage.Source = AGVUtils.GetImageFromFile(@"Image\navigation_24.png");//new BitmapImage( new Uri(@"Image\navigation_24.png", UriKind.RelativeOrAbsolute));
     animatedImage.Width  = animatedImage.Source.Width * NavZoomMultis;
     animatedImage.Height = animatedImage.Source.Height * NavZoomMultis;
     CarCanvas.Children.Add(animatedImage);
 }
Exemple #2
0
        /// <summary>
        /// 加载电子地图背景图片
        /// </summary>
        public void MapInit()
        {
            ImageBrush imageBrush = new ImageBrush();

            imageBrush.ImageSource = GlobalPara.mapImage;
            imageBrush.Stretch     = Stretch.Uniform;
            imageBrush.AlignmentX  = AlignmentX.Left;
            imageBrush.AlignmentY  = AlignmentY.Top;
            canvas.Background      = imageBrush;
            canvas.Height          = GlobalPara.MapHeight;
            canvas.Width           = GlobalPara.MapWidth;
            background.Source      = AGVUtils.GetImageFromFile(@"Image\mapbackground.png");
            Canvas.SetLeft(marquee, canvas.ActualWidth / 2 - marquee.ActualWidth / 2);
        }