⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmfailuregp.cs

📁 车载GPS?今天这个就是最好的工具
💻 CS
📖 第 1 页 / 共 5 页
字号:
				Pego1.PeAnnotation.Table.Text[15, 0] = "O:" + String.Format("{0:" + szFmt + "}",fOpen);
				Pego1.PeAnnotation.Table.Text[16, 0] = "C:" + String.Format("{0:" + szFmt + "}",fClose);
				Pego1.PeAnnotation.Table.Text[17, 0] = "V:" + String.Format("{0:#############}",fVolume);

				Pego1.PeFunction.DrawTable(0);
			}
		}

		private void CreateSimpleGraph()
		{
			int s, p;
			Random Rand_Num = new Random(unchecked((int)DateTime.Now.Ticks));

			// Prepare images in memory //
			Pego1.PeConfigure.PrepareImages = true;

			// Pass Data //
			Pego1.PeData.Subsets = 4;
			Pego1.PeData.Points = 12;

			for(s = 0; s <= 3; s++)
			{
				for(p = 0; p <= 11; p++)
				{
					Pego1.PeData.Y[s, p] = ((p + 1) * 50) + ((float)(Rand_Num.NextDouble()) * 250) + 2;
				}
			}

			// Set DataShadows to show 3D //
			Pego1.PePlot.DataShadows = DataShadows.Shadows;

			Pego1.PeUserInterface.Allow.FocalRect = false;
			Pego1.PePlot.Method = GraphPlottingMethod.Bar;
			Pego1.PeGrid.LineControl = GridLineControl.None;
			Pego1.PePlot.Allow.Ribbon = true;
			Pego1.PeUserInterface.Allow.Zooming = AllowZooming.HorzAndVert;
			Pego1.PeUserInterface.Allow.ZoomStyle = ZoomStyle.Ro2Not;	
			Pego1.PeString.MainTitle = "Units Sold per Month";
			Pego1.PeString.SubTitle = "";
			Pego1.PeString.YAxisLabel = "Units Sold";
			Pego1.PeString.XAxisLabel = "Month";

			// subset labels //
			Pego1.PeString.SubsetLabels[0] = "Texas";
			Pego1.PeString.SubsetLabels[1] = "Florida";
			Pego1.PeString.SubsetLabels[2] = "Washington";
			Pego1.PeString.SubsetLabels[3] = "California";

			// point labels //
			Pego1.PeString.PointLabels[0] = "January";
			Pego1.PeString.PointLabels[1] = "February";
			Pego1.PeString.PointLabels[2] = "March";
			Pego1.PeString.PointLabels[3] = "April";
			Pego1.PeString.PointLabels[4] = "May";
			Pego1.PeString.PointLabels[5] = "June";
			Pego1.PeString.PointLabels[6] = "July";
			Pego1.PeString.PointLabels[7] = "August";
			Pego1.PeString.PointLabels[8] = "September";
			Pego1.PeString.PointLabels[9] = "October";
			Pego1.PeString.PointLabels[10] = "November";
			Pego1.PeString.PointLabels[11] = "December";

			// subset colors //
			Pego1.PeColor.SubsetColors[0] = Color.FromArgb(198, 0, 0);
			Pego1.PeColor.SubsetColors[1] = Color.FromArgb(0, 198, 198);
			Pego1.PeColor.SubsetColors[2] = Color.FromArgb(198, 198, 0);
			Pego1.PeColor.SubsetColors[3] = Color.FromArgb(0, 198, 0);

			// subset line types //
			Pego1.PeLegend.SubsetLineTypes[0] = LineType.MediumSolid;
			Pego1.PeLegend.SubsetLineTypes[1] = LineType.MediumSolid;
			Pego1.PeLegend.SubsetLineTypes[2] = LineType.MediumSolid;
			Pego1.PeLegend.SubsetLineTypes[3] = LineType.MediumSolid;
			Pego1.PeLegend.SubsetLineTypes[4] = LineType.MediumSolid;
			Pego1.PeLegend.SubsetLineTypes[5] = LineType.MediumSolid;
			Pego1.PeLegend.SubsetLineTypes[6] = LineType.MediumSolid;
			Pego1.PeLegend.SubsetLineTypes[7] = LineType.MediumSolid;
			
			// subset point types //
			Pego1.PeLegend.SubsetPointTypes[0] = PointType.DotSolid;
			Pego1.PeLegend.SubsetPointTypes[1] = PointType.UpTriangleSolid;
			Pego1.PeLegend.SubsetPointTypes[2] = PointType.SquareSolid;
			Pego1.PeLegend.SubsetPointTypes[3] = PointType.DownTriangleSolid;
			Pego1.PeLegend.SubsetPointTypes[4] = PointType.Dot;
			Pego1.PeLegend.SubsetPointTypes[5] = PointType.UpTriangle;
			Pego1.PeLegend.SubsetPointTypes[6] = PointType.Square;
			Pego1.PeLegend.SubsetPointTypes[7] = PointType.DownTriangle;
			
			Pego1.PeLegend.SimplePoint = true;	
			Pego1.PeLegend.SimpleLine = true;
			Pego1.PeLegend.Style = LegendStyle.OneLine;
				
			// Allow stacked type graphs //
			Pego1.PePlot.Allow.StackedData = true;

			// Various other features //
			Pego1.PeFont.Fixed = true;
			Pego1.PeColor.BitmapGradientMode = true;
			Pego1.PeColor.QuickStyle = QuickStyle.MediumLine;

			Pego1.PePlot.Option.GradientBars = 8;
			Pego1.PePlot.Option.LineShadows = true;
			Pego1.PeFont.MainTitle.Bold = true;
			Pego1.PeFont.SubTitle.Bold = true;
			Pego1.PeFont.Label.Bold = true;
			Pego1.PeConfigure.TextShadows = TextShadows.BoldText;
			Pego1.PeFont.FontSize = FontSize.Large;
		}

		public void CreateAllCharts(int nChart)
		{
			m_nChart = nChart;
			if(Pego1 == null)
				return;
			Timer1.Enabled = false;
			Pego1.PeFunction.Reset();
			
			Pego1.PeFunction.Reinitialize();
			Pego1.PeConfigure.PrepareImages = true;        
			Random Rand_Num = new Random(unchecked((int)DateTime.Now.Ticks));
			
			if(m_nChart == 0)
			{
				int  p;

				Pego1.PeConfigure.PrepareImages = true;

				// Pass Data //
				Pego1.PeData.Subsets = 2;
				Pego1.PeData.Points = 3;
				
				for(p=0; p<=2; p++)
				{
					if (frm.arrstrGrd[p,0]==null)
					{
						Pego1.PeData.Y[0, p] = 0;
					}
					else
					{
						Pego1.PeData.Y[0, p] =Int32.Parse(frm.arrstrGrd[p,0]);
					}
				}
				for(p=3; p<=5; p++)
				{
					if (frm.arrstrGrd[p,0]==null)
					{
						Pego1.PeData.Y[1, p - 3] = 0;
					}
					else
					{
						Pego1.PeData.Y[1, p - 3] =Int32.Parse(frm.arrstrGrd[p,0]);
					}
				}

				Pego1.PePlot.DataShadows = DataShadows.Shadows;
				Pego1.PeUserInterface.Allow.FocalRect = false;
				Pego1.PePlot.Method = GraphPlottingMethod.Bar;
				Pego1.PeGrid.LineControl = GridLineControl.None;
				Pego1.PePlot.Allow.Ribbon = true;
				Pego1.PeUserInterface.Allow.Zooming = AllowZooming.HorzAndVert;
				Pego1.PeUserInterface.Allow.ZoomStyle = ZoomStyle.Ro2Not;

				Pego1.PeString.MainTitle = "今年/去年同月故障分析";
				Pego1.PeString.SubTitle = "";
				Pego1.PeString.YAxisLabel = "故障 数量";
				Pego1.PeString.XAxisLabel = "月";

				// subset labels //
				Pego1.PeString.SubsetLabels[0] = System.DateTime.Now.Year.ToString() + "年" + System.DateTime.Now.Month.ToString() + "月" ;
				Pego1.PeString.SubsetLabels[1] = (Int32.Parse(System.DateTime.Now.Year.ToString()) -1) + "年"+ System.DateTime.Now.Month.ToString() + "月" ;

				// point labels //
				Pego1.PeString.PointLabels[0] = "腐蚀";
				Pego1.PeString.PointLabels[1] = "外界破坏";
				Pego1.PeString.PointLabels[2] = "管堵及其它";

				// subset colors //
				Pego1.PeColor.SubsetColors[0] = Color.FromArgb(198, 0, 0);
				Pego1.PeColor.SubsetColors[1] = Color.FromArgb(0, 198, 198);
				Pego1.PeColor.SubsetColors[2] = Color.FromArgb(198, 198, 0);
				Pego1.PeColor.SubsetColors[3] = Color.FromArgb(0, 198, 0);

				// subset line types //
				Pego1.PeLegend.SubsetLineTypes[0] = LineType.MediumSolid;
				Pego1.PeLegend.SubsetLineTypes[1] = LineType.MediumSolid;
				Pego1.PeLegend.SubsetLineTypes[2] = LineType.MediumSolid;
				Pego1.PeLegend.SubsetLineTypes[3] = LineType.MediumSolid;
				Pego1.PeLegend.SubsetLineTypes[4] = LineType.MediumSolid;
				Pego1.PeLegend.SubsetLineTypes[5] = LineType.MediumSolid;
				Pego1.PeLegend.SubsetLineTypes[6] = LineType.MediumSolid;
				Pego1.PeLegend.SubsetLineTypes[7] = LineType.MediumSolid;

				// subset point types //
				Pego1.PeLegend.SubsetPointTypes[0] = PointType.DotSolid;
				Pego1.PeLegend.SubsetPointTypes[1] = PointType.UpTriangleSolid;
				Pego1.PeLegend.SubsetPointTypes[2] = PointType.SquareSolid;
				Pego1.PeLegend.SubsetPointTypes[3] = PointType.DownTriangleSolid;
				Pego1.PeLegend.SubsetPointTypes[4] = PointType.Dot;
				Pego1.PeLegend.SubsetPointTypes[5] = PointType.UpTriangle;
				Pego1.PeLegend.SubsetPointTypes[6] = PointType.Square;
				Pego1.PeLegend.SubsetPointTypes[7] = PointType.DownTriangle;

				Pego1.PeLegend.SimplePoint = true;
				Pego1.PeLegend.SimpleLine = true;
				Pego1.PeLegend.Style = LegendStyle.OneLine;

				// Allow stacked type graphs //
				Pego1.PePlot.Allow.StackedData = true;

				// Various other features //
				Pego1.PeFont.Fixed = true;
				Pego1.PeColor.BitmapGradientMode = true;
				Pego1.PeColor.QuickStyle = QuickStyle.MediumLine;

				Pego1.PePlot.Option.GradientBars = 8;
				Pego1.PePlot.Option.LineShadows = true;
				Pego1.PeFont.MainTitle.Bold = true;
				Pego1.PeFont.SubTitle.Bold = true;
				Pego1.PeFont.Label.Bold = true;
				Pego1.PeConfigure.TextShadows = TextShadows.BoldText;
				Pego1.PeFont.FontSize = FontSize.Large;

				// Generally call ReinitializeResetImage at end **'
				Pego1.PeFunction.ReinitializeResetImage();
			}
			else if(m_nChart == 1)
			{				        
				//*********************************************************************'
				//*********************************************************************'
				//001  Graph With Auto Statistical Subsets

				//! Right button click to show popup menu. //
				//! Double Click to show customization dialog. //

				// This example builds upon the basic CreateSimpleGraph '000' example chart //
				CreateSimpleGraph();

				// Below tells object to automatically generate statistical
				// comparison subsets, object will actually have
				// 6 subsets when finished initializing.

				Pego1.PePlot.AutoStatSubsets[0] = (int) Gigasoft.ProEssentials.Enums.AutoStatSubsets.AverageAllPoints;
				Pego1.PePlot.AutoStatSubsets[1] = (int) Gigasoft.ProEssentials.Enums.AutoStatSubsets.AveragePerPoint;

				// Other various properties //
				Pego1.PeColor.BitmapGradientMode = true;
				Pego1.PeColor.QuickStyle = QuickStyle.DarkLine;
				Pego1.PeLegend.Style = LegendStyle.OneLineInsideAxis;
				Pego1.PePlot.Method = GraphPlottingMethod.Bar;
				Pego1.PePlot.MarkDataPoints = true;
			}
			else if(m_nChart == 2)
			{				        
				//*********************************************************************'
				//*********************************************************************'
				//002  Graph With Permanent and Scrolling Subsets

				//! Scroll vertical scroll bar to revolve subsets. //
				//! Right button click to show popup menu. //
				//! Double Click to show customization dialog. //

				// This example builds upon the basic CreateSimpleGraph '000' example chart //
				CreateSimpleGraph();

				// tells object to automatically generate statistical
				// comparison subsets, the object will have
				// 6 subsets when finished reinitializing.
				Pego1.PePlot.AutoStatSubsets[0] = (int) Gigasoft.ProEssentials.Enums.AutoStatSubsets.AverageAllPoints; // This will be 5th subset
				Pego1.PePlot.AutoStatSubsets[1] = (int) Gigasoft.ProEssentials.Enums.AutoStatSubsets.AveragePerPoint; // This will be 6th subset

				// Since we are scrolling subsets one at a time,
				// we can set the AverageAllPoints and AveragePerPoint subsets as
				// permanent. This allows individual subsets to be
				// compared to the averages of all points.
				Pego1.PeData.RandomSubsetsToGraph[0] = 4; // zero based 5th subset, PEAS_AVGAP
				Pego1.PeData.RandomSubsetsToGraph[1] = 5; // zero based 6th subset, PEAS_AVGPP

				// If we comment this line out, you will only see the
				// 5th and 6th subset selected above. RandomSubsetsToGraph
				// will either control which subset you see or which
				// subsets are permanent if ScrollingSubsets is non-zero.
				Pego1.PeUserInterface.Scrollbar.ScrollingSubsets = 1; // Scroll one subset at a time
				Pego1.PeTable.What = TableWhat.AllSubsets;

				// Add a table //
				Pego1.PeTable.Show = GraphPlusTable.Both;
				Pego1.PeData.Precision = 0;
				Pego1.PeFont.FontSize = FontSize.Large;

				// Other various properties //
				Pego1.PeColor.BitmapGradientMode = true;
				Pego1.PeColor.QuickStyle = QuickStyle.MediumNoBorder;
				Pego1.PeLegend.Style = LegendStyle.OneLineInsideAxis;
				Pego1.PePlot.Method = GraphPlottingMethod.Bar;
				Pego1.PePlot.Option.BestFitDegree = BestFitDegree.Fourth;
				Pego1.PePlot.MarkDataPoints = true;
				Pego1.PeLegend.Style = LegendStyle.OneLine;
			}
			else if(m_nChart == 3)
			{
				//*********************************************************************'
				//*********************************************************************'
				//003  Graph With Right Y Axis Comparison Subsets

				// This example builds upon the basic CreateSimpleGraph '000' example chart //
				CreateSimpleGraph();

				// Set plotting method to Bar //
				Pego1.PePlot.Method = GraphPlottingMethod.Bar;

				// Designate last 2 subsets as right y axis comparison subsets
				Pego1.PePlot.RYAxisComparisonSubsets = 2;

				// Set Comparison PlottingMethod
				Pego1.PePlot.MethodII = GraphPlottingMethodII.PointsPlusLine;

				// Label Right Y Axis //
				Pego1.PeString.RYAxisLabel = "Expected";

				// Other various properties //
				Pego1.PeColor.BitmapGradientMode = true;
				Pego1.PeColor.QuickStyle = QuickStyle.DarkNoBorder;
				Pego1.PeColor.SubsetColors[0] = Color.FromArgb(100, 0, 0);
				Pego1.PeColor.SubsetColors[1] = Color.FromArgb(0, 100, 100);
				Pego1.PeColor.SubsetColors[2] = Color.FromArgb(198, 198, 0);
				Pego1.PeColor.SubsetColors[3] = Color.FromArgb(0, 198, 0);
			}
			else if(m_nChart == 4)
			{
				//*********************************************************************'
				//*********************************************************************'
				//004  Graph showing simple high-low-close

				// This example builds upon the basic CreateSimpleGraph '000' example chart //
				CreateSimpleGraph();

				// Set PlottingMethod and SpecificPlotMode Type //
				Pego1.PePlot.Method = GraphPlottingMethod.SpecificPlotMode;
				Pego1.PePlot.SpecificPlotMode = SpecificPlotMode.HighLowClose;

				// setting this true causes high-low-close to be multi colored
				Pego1.PePlot.Option.SpecificPlotModeColor = true;

				// Change Data to something more appropriate //

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -