Beispiel #1
0
        /// <summary>
        /// Raises the <see cref="EventBroker.ImageDrawing"/> event and
        /// renders the <see cref="PresentationImage"/>.
        /// </summary>
        /// <param name="drawArgs"></param>
        /// <remarks>
        /// For internal Framework use only.
        /// </remarks>
        /// <exception cref="RenderingException">Thrown if any <see cref="Exception"/> is encountered while rendering the image.</exception>
        public virtual void Draw(DrawArgs drawArgs)
        {
            drawArgs.SceneGraph = this.SceneGraph;
            _clientRectangle    = drawArgs.RenderingSurface.ClientRectangle;

            // Let others know that we're about to draw
            ImageDrawingEventArgs args = new ImageDrawingEventArgs(this);

            if (this.ImageViewer != null && this.ImageViewer.EventBroker != null)
            {
                this.ImageViewer.EventBroker.OnImageDrawing(args);
            }

            OnDrawing();

            this.ImageRenderer.Draw(drawArgs);
        }
		private void OnImageDrawing(object sender, ImageDrawingEventArgs e)
		{
			if (e.PresentationImage.Selected)
				UpdateDeleteAllVisible();
		}
Beispiel #3
0
 internal void OnImageDrawing(ImageDrawingEventArgs args)
 {
     EventsHelper.Fire(_imageDrawingEvent, this, args);
 }
		/// <summary>
		/// Raises the <see cref="EventBroker.ImageDrawing"/> event and
		/// renders the <see cref="PresentationImage"/>.
		/// </summary>
		/// <param name="drawArgs"></param>
		/// <remarks>
		/// For internal Framework use only.
		/// </remarks>
		/// <exception cref="RenderingException">Thrown if any <see cref="Exception"/> is encountered while rendering the image.</exception>
		public virtual void Draw(DrawArgs drawArgs)
		{
			drawArgs.SceneGraph = this.SceneGraph;
			_clientRectangle = drawArgs.RenderingSurface.ClientRectangle;

			// Let others know that we're about to draw
			ImageDrawingEventArgs args = new ImageDrawingEventArgs(this);
			if (this.ImageViewer != null && this.ImageViewer.EventBroker != null)
				this.ImageViewer.EventBroker.OnImageDrawing(args);

			OnDrawing();

			this.ImageRenderer.Draw(drawArgs);
		}
 private void OnImageDrawing(object sender, ImageDrawingEventArgs e)
 {
     if (e.PresentationImage != null)
     {
         var graphicsProvider = e.PresentationImage as IOverlayGraphicsProvider;
         if (graphicsProvider != null && graphicsProvider.OverlayGraphics != null)
         {
             var aimSettings = AimSettings.Default;
             foreach (var overlayGraphic in graphicsProvider.OverlayGraphics)
             {
                 if (overlayGraphic is AimGraphic)
                 {
                     var aimGraphic = (AimGraphic) overlayGraphic;
                     var userName = aimGraphic.UserLoginName;
                     aimGraphic.Visible = !_displayMarkupPerUser.ContainsKey(userName) || _displayMarkupPerUser[userName];
                     aimGraphic.Color = aimSettings.GetAimGraphicColorForUser(userName);
                 }
             }
         }
     }
 }
Beispiel #6
0
		internal void OnImageDrawing(ImageDrawingEventArgs args)
		{
			EventsHelper.Fire(_imageDrawingEvent, this, args);
		}