Exemplo n.º 1
0
		public override void Initiate()
		{
			int index = 1;

			Label label = new Label();
			label.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			label.FixedSize = true;
			label.Size = new System.Drawing.Size(this.Size.Width - 10, 30);
			label.Location = new System.Drawing.Point(0, 5);
			label.Text = "Ensemble Tests";
			label.FontType = FontType.Heading;
			label.IsVisible = true;
			label.Padding = new System.Windows.Forms.Padding(5);
			label.RelitiveZIndex = index++;

			this.Controls.Add(label);

			int verticalOffset = 35;

			Button button = new Button();
			button.Size = new System.Drawing.Size(this.Size.Width - 10, 20);
			button.Location = new System.Drawing.Point(5, verticalOffset);
			button.Text = "Start Tests";
			button.FontType = FontType.Small;
			button.IsVisible = true;
			button.RelitiveZIndex = index++;
			button.Click += new EventHandler(button_Click);
			this.Controls.Add(button);

			verticalOffset += 25;

			m_ProgressBar = new ProgressBar();
			m_ProgressBar.Size = new System.Drawing.Size(this.Size.Width - 10, 20);
			m_ProgressBar.Location = new System.Drawing.Point(5, verticalOffset);
			m_ProgressBar.IsVisible = true;
			m_ProgressBar.RelitiveZIndex = index++;
			m_ProgressBar.Value = 0;
			m_ProgressBar.MaxValue = 100;
			this.Controls.Add(m_ProgressBar);

			verticalOffset += 25;

			m_SpeedGraph = new MultiGraph();

			m_SpeedGraph.Location = new System.Drawing.Point(5, verticalOffset);
			m_SpeedGraph.Size = new System.Drawing.Size(this.Size.Width - 40, 200);
			m_SpeedGraph.IsVisible = true;
			m_SpeedGraph.RelitiveZIndex = index++;

			this.Controls.Add(m_SpeedGraph);

			m_OrginalGraph = new SubGraph(100);
			m_OrginalGraph.IsVisible = true;
			m_OrginalGraph.LineColor = new SlimDX.Color4(1f, 1f, 0.3f, 0.3f);
			m_OrginalGraph.MaxValue = 0.1f;
			m_OrginalGraph.Scrolling = false;
			m_SpeedGraph.Graphs.Add(m_OrginalGraph);

			m_OptoGraph = new SubGraph(100);
			m_OptoGraph.IsVisible = true;
			m_OptoGraph.LineColor = new SlimDX.Color4(1f, 0.3f, 1f, 0.3f);
			m_OptoGraph.MaxValue = 0.1f;
			m_OptoGraph.Scrolling = false;
			m_SpeedGraph.Graphs.Add(m_OptoGraph);


			m_OptoGraph2 = new SubGraph(100);
			m_OptoGraph2.IsVisible = true;
			m_OptoGraph2.LineColor = new SlimDX.Color4(1f, 1f, 1f, 0.3f);
			m_OptoGraph2.MaxValue = 0.1f;
			m_OptoGraph2.Scrolling = false;
			m_SpeedGraph.Graphs.Add(m_OptoGraph2);


			m_GraphMax = new DynamicLabel();
			m_GraphMax.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			m_GraphMax.FixedSize = true;
			m_GraphMax.Size = new System.Drawing.Size(30, 15);
			m_GraphMax.Location = new System.Drawing.Point(this.Size.Width - 35, verticalOffset);
			m_GraphMax.MaxLength = 10;
			m_GraphMax.Text = "0";
			m_GraphMax.FontType = FontType.Small;
			m_GraphMax.IsVisible = true;
			m_GraphMax.Padding = new System.Windows.Forms.Padding(5);
			m_GraphMax.RelitiveZIndex = index++;
			this.Controls.Add(m_GraphMax);


			m_GraphMin = new DynamicLabel();
			m_GraphMin.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			m_GraphMin.FixedSize = true;
			m_GraphMin.Size = new System.Drawing.Size(30, 15);
			m_GraphMin.Location = new System.Drawing.Point(this.Size.Width - 35, verticalOffset + 185);
			m_GraphMin.MaxLength = 10;
			m_GraphMin.Text = "0";
			m_GraphMin.FontType = FontType.Small;
			m_GraphMin.IsVisible = true;
			m_GraphMin.Padding = new System.Windows.Forms.Padding(5);
			m_GraphMin.RelitiveZIndex = index++;
			this.Controls.Add(m_GraphMin);
			

			verticalOffset += 200;

			this.Size = new System.Drawing.Size(this.Size.Width, verticalOffset + 5);
		}
Exemplo n.º 2
0
		private void CreateStatusBar()
		{
			#region Status Bar

			int index = 20; 

			Panel statusPanel = new Panel();

			statusPanel.ShowBackground = true;
			statusPanel.ShowBorder = false;
			statusPanel.Docking = System.Windows.Forms.DockStyle.Bottom;
			statusPanel.IsVisible = true;
			statusPanel.RelitiveZIndex = index++; 
			statusPanel.Size = new System.Drawing.Size(152, 24);

			Controls.Add(statusPanel);

			index = 1; 

			m_SpeedGraph = new MultiGraph();

			m_SpeedGraph.Location = new System.Drawing.Point(2, 2);
			m_SpeedGraph.Size = new System.Drawing.Size(150, 20);
			m_SpeedGraph.IsVisible = true;
			m_SpeedGraph.RelitiveZIndex = index++; 

			statusPanel.Controls.Add(m_SpeedGraph);

			m_FPSGraph = new SubGraph(150);
			m_FPSGraph.IsVisible = true;
			m_FPSGraph.LineColor = new SlimDX.Color4(0.75f, 0.3f, 1f, 0.3f);			
			m_SpeedGraph.Graphs.Add(m_FPSGraph);

			m_FPSLabel = new DynamicLabel();
			m_FPSLabel.ForeColor = new SlimDX.Color4(0.75f, 0.3f, 1f, 0.3f);
			m_FPSLabel.MaxLength = 16;
			m_FPSLabel.Location = new System.Drawing.Point(154, 0);
			m_FPSLabel.FixedSize = false;
			m_FPSLabel.FontType = FontType.Small;
			m_FPSLabel.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			m_FPSLabel.IsVisible = true;
			m_FPSLabel.RelitiveZIndex = index++; 
			statusPanel.Controls.Add(m_FPSLabel);			

			#endregion
		}
Exemplo n.º 3
0
		private void CreateStatusBar()
		{
			#region Status Bar

			int index = 20; 

			m_StatusPanel = new Panel();

			m_StatusPanel.ShowBackground = true;
			m_StatusPanel.ShowBorder = false;
			m_StatusPanel.Docking = System.Windows.Forms.DockStyle.Bottom;
			m_StatusPanel.IsVisible = true;
			m_StatusPanel.RelitiveZIndex = index++; 
			m_StatusPanel.Size = new System.Drawing.Size(152, 50);

			Controls.Add(m_StatusPanel);

			index = 1; 

			m_SpeedGraph = new MultiGraph();

			m_SpeedGraph.Location = new System.Drawing.Point(2, 2);
			m_SpeedGraph.Size = new System.Drawing.Size(150, 48);
			m_SpeedGraph.IsVisible = true;
			m_SpeedGraph.RelitiveZIndex = index++; 

			m_StatusPanel.Controls.Add(m_SpeedGraph);

			m_FPSGraph = new Graph(150);
			m_FPSGraph.IsVisible = true;
			m_FPSGraph.LineColor = new SlimDX.Color4(0.75f, 0.3f, 1f, 0.3f);			
			m_SpeedGraph.Graphs.Add(m_FPSGraph);

			m_FPSLabel = new DynamicLabel();
			m_FPSLabel.ForeColor = new SlimDX.Color4(0.75f, 0.3f, 1f, 0.3f);
			m_FPSLabel.MaxLength = 16;
			m_FPSLabel.Location = new System.Drawing.Point(154, 0);
			m_FPSLabel.FixedSize = false;
			m_FPSLabel.FontType = FontType.Small;
			m_FPSLabel.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			m_FPSLabel.IsVisible = true;
			m_FPSLabel.RelitiveZIndex = index++; 
			m_StatusPanel.Controls.Add(m_FPSLabel);


			m_PacketGraph = new Graph(150);
			m_PacketGraph.IsVisible = true;
			m_PacketGraph.LineColor = new SlimDX.Color4(0.75f, 1f, 0.3f, 0.3f);
			m_SpeedGraph.Graphs.Add(m_PacketGraph);

			m_PacketLabel = new DynamicLabel();
			m_PacketLabel.ForeColor = new SlimDX.Color4(0.75f, 1f, 0.3f, 0.3f);
			m_PacketLabel.MaxLength = 20;
			m_PacketLabel.Location = new System.Drawing.Point(154, 10);
			m_PacketLabel.FixedSize = false;
			m_PacketLabel.FontType = FontType.Small;
			m_PacketLabel.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			m_PacketLabel.IsVisible = true;
			m_PacketLabel.RelitiveZIndex = index++; 
			m_StatusPanel.Controls.Add(m_PacketLabel);


			m_DroppedFramesGraph = new Graph(150);
			m_DroppedFramesGraph.IsVisible = true;
			m_DroppedFramesGraph.LineColor = new SlimDX.Color4(0.75f, 1f, 0.3f, 1f);
			m_SpeedGraph.Graphs.Add(m_DroppedFramesGraph);


			m_DroppedFramesLabel = new DynamicLabel();
			m_DroppedFramesLabel.ForeColor = new SlimDX.Color4(0.75f, 1f, 0.3f, 1f);
			m_DroppedFramesLabel.MaxLength = 20;
			m_DroppedFramesLabel.Location = new System.Drawing.Point(240, 0);
			m_DroppedFramesLabel.FixedSize = false;
			m_DroppedFramesLabel.FontType = FontType.Small;
			m_DroppedFramesLabel.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			m_DroppedFramesLabel.IsVisible = true;
			m_DroppedFramesLabel.RelitiveZIndex = index++;
			m_StatusPanel.Controls.Add(m_DroppedFramesLabel);

			m_RecordingStatusLabel = new DynamicLabel();
			m_RecordingStatusLabel.ForeColor = new SlimDX.Color4(0.75f, 1f, 0.3f, 1f);
			m_RecordingStatusLabel.MaxLength = 20;
			m_RecordingStatusLabel.Location = new System.Drawing.Point(240, 10);
			m_RecordingStatusLabel.FixedSize = false;
			m_RecordingStatusLabel.FontType = FontType.Small;
			m_RecordingStatusLabel.TextAlign = System.Drawing.ContentAlignment.TopLeft;
			m_RecordingStatusLabel.IsVisible = true;
			m_RecordingStatusLabel.RelitiveZIndex = index++;
			m_StatusPanel.Controls.Add(m_RecordingStatusLabel);


			m_FFTGraph = new MultiGraph();
			m_FFTGraph.Location = new System.Drawing.Point(340, 2);
            m_FFTGraph.Size = new System.Drawing.Size(DSParticles3.ParticleEnsemble.VelocityAutoCorrelationLength / 2, 22);
			//m_FFTGraph.Size = new System.Drawing.Size(512, 22);

			m_FFTGraph.IsVisible = true;
			m_FFTGraph.RelitiveZIndex = index++;
			m_StatusPanel.Controls.Add(m_FFTGraph);

			m_CorrelationFunctionGraph = new Graph(ArtworkStaticObjects.Ensemble.xtest.Length);// the number in brackets is how many data points in the graph
            m_CorrelationFunctionGraph.Scrolling = false; // this may need to be true (test) 
			m_CorrelationFunctionGraph.IsVisible = true;
			m_CorrelationFunctionGraph.LineColor = new SlimDX.Color4(0.75f, 1f, 1f, 1f);
            m_CorrelationFunctionGraph.ScaleEveryFrame = true;
			m_FFTGraph.Graphs.Add(m_CorrelationFunctionGraph);


            m_FFTGraph2 = new MultiGraph();
            m_FFTGraph2.Location = new System.Drawing.Point(340, 26);
            m_FFTGraph2.Size = new System.Drawing.Size(DSParticles3.ParticleEnsemble.VelocityAutoCorrelationLength / 2, 22);
			//m_FFTGraph2.Size = new System.Drawing.Size(512, 22);
            m_FFTGraph2.IsVisible = true;
            m_FFTGraph2.RelitiveZIndex = index++;
            m_StatusPanel.Controls.Add(m_FFTGraph2);

            m_FFTFreqsGraph = new PeakGraph(24, ArtworkStaticObjects.Ensemble.AveragedFFTamplitudes.Length);// the number in brackets is how many data points in the graph
            m_FFTFreqsGraph.Scrolling = false; // this may need to be true (test) 
            m_FFTFreqsGraph.IsVisible = true;
            m_FFTFreqsGraph.LineColor = new SlimDX.Color4(0.75f, 1f, 0.2f, 0.2f);
			m_FFTFreqsGraph.PeakLineColor = new SlimDX.Color4(0.75f, 1f, 0f, 1f);
			m_FFTFreqsGraph.ShowTicks = true;
			m_FFTFreqsGraph.ShowPeaks = true; 
			m_FFTFreqsGraph.TickSpace = ArtworkStaticObjects.Ensemble.AveragedFFTamplitudes.Length / 64; 			
            m_FFTFreqsGraph.ScaleEveryFrame = true;
            m_FFTGraph2.Graphs.Add(m_FFTFreqsGraph);

			#endregion
		}