This graphic group contains all the little elements that make up a little IT phase.
Inheritance: NewTOAPIA.UI.GraphicGroup
Example #1
0
		public PLCITView(string name, int x, int y, int width, int height)
			: base(name, "Product Life Cycle - IT", x, y, width, height)
		{
			fMyDataBinder = new ITDataBinder(this);

			Legend = new ITLegend();
			
			fExpansionFrame = new Rectangle(250, 150, 500, 470);
			fShadowArrow = new GraphicArrow("shadowArrow", fExpansionFrame.Left+4, fExpansionFrame.Top+6,
				fExpansionFrame.Width, fExpansionFrame.Height, RGBColor.RGB(128,200, 200), RGBColor.TRANSPARENT);
			fActiveControl = null;

			//PreferredTransition = new StretchRight(0.5);
            PreferredTransition = new StretchUp(0.5);
            //PreferredTransition = new PushRight(null, null, Rectangle.Empty, 0.5);
		}
Example #2
0
		void DoFlyIn(ITPhaseControl control, int steps)
		{
			// Create a pixmap to represent the control to be animated
            GDIDIBSection srcPixelBuffer = new GDIDIBSection((int)(control.Frame.Width), (int)(control.Frame.Height));
            IGraphPort srcGraphics = srcPixelBuffer.GraphPort;
            srcPixelBuffer.DeviceContext.ClearToWhite();

            // Draw the control into its bitmap
            DrawEvent sde = new DrawEvent(srcGraphics, Frame);
            control.OnDraw(sde);
            srcGraphics.Flush();
            
            // Get the current image of what's being displayed
            GDIDIBSection dstPixelBuffer = this.BackingImage;
            IGraphPort dstGraphics = dstPixelBuffer.GraphPort;
            dstPixelBuffer.DeviceContext.ClearToWhite();

            DrawEvent dde = new DrawEvent(dstGraphics, Frame);
            this.Draw(dde);

			// At this point we have two bitmaps that hold the images of the 
			// background, and the graphic that will fly in.


			// Get a hold of our window's graphics port
            IGraphPort grfx = Window.ClientAreaGraphPort;
            
            // Draw the current destination image into the graphport
            grfx.PixBlt(dstPixelBuffer, 0, 0);


            Rectangle startFrame = new Rectangle(0, (int)(control.Frame.Top), (int)(control.Frame.Width), (int)(control.Frame.Height));
			//Rectangle startFrame = new Rectangle(0, 0, (int)(control.Frame.Width), (int)(control.Frame.Height));
			Rectangle endFrame = new Rectangle((control.Frame.Left), (control.Frame.Top), (control.Frame.Width), (control.Frame.Height));

            FlyIn transition = new FlyIn(startFrame, endFrame, steps);
            transition.SourcePixelBuffer = srcPixelBuffer;
            transition.DestinationPixelBuffer = dstPixelBuffer;

            transition.Run(grfx);
            //FlyAGraphic(grfx, srcPixelBuffer, startFrame, dstPixelBuffer, endFrame, steps);

			// Cleanup
			srcPixelBuffer.Dispose();
		}
Example #3
0
		public override void MoveGraphicToFront(IGraphic aDrawable)
		{
			// Shrink the current control back into position
			if (fActiveControl != null)
			{
				RemoveGraphic(fShadowArrow);
				fActiveControl.Shrink();

                IGraphPort graphPort = Window.GraphPort;
                graphPort.PixBlt(CurrentImage, Frame.Left, Frame.Top);

				if (fActiveControl == aDrawable)
				{
					fActiveControl = null;
					return;
				}
			}

			// Move the new graphic to the front in the hierarchy
			if ((aDrawable != null) && (aDrawable is ITPhaseControl))
			{
				AddGraphic(fShadowArrow);
				//base.MoveGraphicToFront(aDrawable);
				fActiveControl = (ITPhaseControl)aDrawable;

				// Expand the new control
				fActiveControl.ExpansionFrame = fExpansionFrame;
				fActiveControl.Expand();

				IGraphPort grfx = Window.GraphPort;
				grfx.PixBlt(this.CurrentImage, Frame.Left,Frame.Top);
			}
		}
Example #4
0
		public override void AddPhaseArrows()
		{
			// The trailing arrow
			AddGraphic(new GraphicArrow("trailingArrow", 0, 105, 93, 468));


			// The six phases
			fPhase1Control = new ITPhaseControl("envision", "Envison","p1s1dlist", "p1s1mlist", "p1s1clist",70, 105);
            fPhase2Control = new ITPhaseControl("design", "Design", "p2s1dlist", "p2s1mlist", "p2s1clist", 220, 105);
            fPhase3Control = new ITPhaseControl("build", "Build", "p3s1dlist", "p3s1mlist", "p3s1clist", 370, 105);
            fPhase4Control = new ITPhaseControl("stabilize", "Stabilize", "p4s1dlist", "p4s1mlist", "p4s1clist", 521, 105);
            fPhase5Control = new ITPhaseControl("deploy", "Deploy", "p5s1dlist", "p5s1mlist", "p5s1clist", 670, 105);
            fPhase6Control = new ITPhaseControl("production", "Production", "p6s1dlist", "p6s1mlist", "p6s1clist", 820, 105);
			
			AddGraphic(fPhase1Control);
            AddGraphic(fPhase2Control);
            AddGraphic(fPhase3Control);
            AddGraphic(fPhase4Control);
            AddGraphic(fPhase5Control);
            AddGraphic(fPhase6Control);
		}