Пример #1
0
        void InitWorkAreaControl()
        {
            DestroyWorkAreaControl();

            if (workAreaViewsConfiguration != ViewsConfigurations.NoViews)
            {
                initializedWorkAreaViewsConfiguration = workAreaViewsConfiguration;

                workAreaControl         = new MultiViewRenderTargetControl();
                workAreaControl.Visible = false;
                dockPanel.Controls.Add(workAreaControl);

                Rect[] rectangles = null;

                switch (workAreaViewsConfiguration)
                {
                case ViewsConfigurations.OneView:
                    rectangles = new Rect[] { new Rect(0, 0, 1, 1) };
                    break;

                case ViewsConfigurations.FourViews:
                    rectangles = new Rect[]
                    {
                        new Rect(0, 0, .498f, .495f),
                        new Rect(.502f, 0, 1, .495f),
                        new Rect(0, .505f, .498f, 1),
                        new Rect(.502f, .505f, 1, 1),
                    };
                    break;
                }
                workAreaControl.SetViewsConfiguration(rectangles);

                workAreaControl.SetAutomaticUpdateFPSForAllViews(30);

                workAreaControl.Render   += workAreaControl_Render;
                workAreaControl.RenderUI += workAreaControl_RenderUI;

                //subscribe events to first view
                RenderTargetUserControl control = workAreaControl.Views[0].Control;
                control.KeyDown   += renderTargetUserControl1_KeyDown;
                control.KeyUp     += renderTargetUserControl1_KeyUp;
                control.MouseDown += renderTargetUserControl1_MouseDown;
                control.MouseUp   += renderTargetUserControl1_MouseUp;
                control.MouseMove += renderTargetUserControl1_MouseMove;
                control.Tick      += renderTargetUserControl1_Tick;
            }
        }
Пример #2
0
		private void workAreaWith4ViewsToolStripMenuItem_Click( object sender, EventArgs e )
		{
			workAreaViewsConfiguration = ViewsConfigurations.FourViews;
			UpdateWorkAreaMenuItems();
		}
Пример #3
0
		void InitWorkAreaControl()
		{
			DestroyWorkAreaControl();

			if( workAreaViewsConfiguration != ViewsConfigurations.NoViews )
			{
				initializedWorkAreaViewsConfiguration = workAreaViewsConfiguration;

				workAreaControl = new MultiViewRenderTargetControl();
				workAreaControl.Visible = false;
				dockPanel.Controls.Add( workAreaControl );

				Rect[] rectangles = null;

				switch( workAreaViewsConfiguration )
				{
				case ViewsConfigurations.OneView:
					rectangles = new Rect[] { new Rect( 0, 0, 1, 1 ) };
					break;
				case ViewsConfigurations.FourViews:
					rectangles = new Rect[]
					{
						new Rect( 0, 0, .498f, .495f ),
						new Rect( .502f, 0, 1, .495f ),
						new Rect( 0, .505f, .498f, 1 ),
						new Rect( .502f, .505f, 1, 1 ),
					};
					break;
				}
				workAreaControl.SetViewsConfiguration( rectangles );

				workAreaControl.SetAutomaticUpdateFPSForAllViews( 30 );

				workAreaControl.Render += workAreaControl_Render;
				workAreaControl.RenderUI += workAreaControl_RenderUI;

				//subscribe events to first view
				RenderTargetUserControl control = workAreaControl.Views[ 0 ].Control;
				control.KeyDown += renderTargetUserControl1_KeyDown;
				control.KeyUp += renderTargetUserControl1_KeyUp;
				control.MouseDown += renderTargetUserControl1_MouseDown;
				control.MouseUp += renderTargetUserControl1_MouseUp;
				control.MouseMove += renderTargetUserControl1_MouseMove;
				control.Tick += renderTargetUserControl1_Tick;
			}
		}
Пример #4
0
 private void workAreaWith4ViewsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     workAreaViewsConfiguration = ViewsConfigurations.FourViews;
     UpdateWorkAreaMenuItems();
 }