📄 frmwellgp.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Gigasoft.ProEssentials.Enums;
namespace GEROSYS
{
/// <summary>
/// Summary description for Form5.
/// </summary>
public class frmWellGP : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
Int32 m_nChart;
Int32 p;
Int32 s;
private Gigasoft.ProEssentials.Pepco Pepco1;
Random Rand_Num = new Random(unchecked((int)DateTime.Now.Ticks));
private frmWell frm;
public frmWellGP(frmWell frm)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.frm = frm ;
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Pepco1 = new Gigasoft.ProEssentials.Pepco();
this.SuspendLayout();
//
// Pepco1
//
this.Pepco1.Location = new System.Drawing.Point(16, 7);
this.Pepco1.Name = "Pepco1";
this.Pepco1.Size = new System.Drawing.Size(672, 426);
this.Pepco1.TabIndex = 0;
this.Pepco1.Text = "pepco1";
//
// frmWellGP
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(704, 448);
this.Controls.Add(this.Pepco1);
this.Name = "frmWellGP";
this.Text = "急抢修井盖丢失统计分析";
this.Resize += new System.EventHandler(this.Form5_Resize);
this.Load += new System.EventHandler(this.Form5_Load);
this.ResumeLayout(false);
}
#endregion
private void Form5_Load(object sender, System.EventArgs e)
{
this.Left = 0;
this.Top = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2 + 2;
this.Width = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height * 1 / 2 ;
}
private void Form5_Resize(object sender, System.EventArgs e)
{
if(Pepco1 == null)
return;
Pepco1.Left = 0;
Pepco1.Top = 0;
Pepco1.Width = this.ClientSize.Width;
Pepco1.Height = this.ClientSize.Height;
}
private void CreateSimplePie()
{
Int32 s, p;
// Set how much data object will hold //
Pepco1.PeData.Subsets = 1;
Pepco1.PeData.Points = 13;
// Pass data for slices //
// for(s=0; s<=4; s++)
// {
s=0;
for(p=0; p<=12; p++)
{
Pepco1.PeData.X[s, p] = (float) ((Rand_Num.NextDouble() * 5) + ((Rand_Num.NextDouble() * 100) / 100.0F));
}
// }
// Set Subset labels //
Pepco1.PeString.SubsetLabels[0] = "丢失记录";
// Pepco1.PeString.SubsetLabels[1] = "Oranges";
// Pepco1.PeString.SubsetLabels[2] = "Pears";
// Pepco1.PeString.SubsetLabels[3] = "Plums";
// Pepco1.PeString.SubsetLabels[4] = "Peaches";
// Set Slice Labels //
Pepco1.PeString.PointLabels[0] = "东城区";
Pepco1.PeString.PointLabels[1] = "西城区";
Pepco1.PeString.PointLabels[2] = "朝阳区";
Pepco1.PeString.PointLabels[3] = "海淀区";
Pepco1.PeString.PointLabels[4] = "宣武区";
Pepco1.PeString.PointLabels[5] = "崇文区";
Pepco1.PeString.PointLabels[6] = "石景山区";
Pepco1.PeString.PointLabels[7] = "丰台区";
Pepco1.PeString.PointLabels[8] = "通州区";
Pepco1.PeString.PointLabels[9] = "顺义区";
Pepco1.PeString.PointLabels[10] = "房山区";
Pepco1.PeString.PointLabels[11] = "大兴区";
Pepco1.PeString.PointLabels[12] = "门头沟区";
// Set Slice Colors //
Pepco1.PeColor.SubsetColors[0] = Color.FromArgb(198, 0, 0);
Pepco1.PeColor.SubsetColors[1] = Color.FromArgb(0, 198, 0);
Pepco1.PeColor.SubsetColors[2] = Color.FromArgb(198, 198, 0);
Pepco1.PeColor.SubsetColors[3] = Color.FromArgb(0, 0, 198);
Pepco1.PeColor.SubsetColors[4] = Color.FromArgb(198, 0, 198);
Pepco1.PeColor.SubsetColors[5] = Color.FromArgb(0, 198, 198);
Pepco1.PeColor.SubsetColors[6] = Color.FromArgb(192, 192, 192);
Pepco1.PeColor.SubsetColors[7] = Color.FromArgb(198, 0, 0);
Pepco1.PeColor.SubsetColors[8] = Color.FromArgb(0, 198, 0);
Pepco1.PeColor.SubsetColors[9] = Color.FromArgb(198, 198, 0);
Pepco1.PeColor.SubsetColors[10] = Color.FromArgb(0, 148, 148);
Pepco1.PeColor.SubsetColors[11] = Color.FromArgb(122, 122, 122);
Pepco1.PeColor.SubsetColors[12] = Color.FromArgb(100, 0, 100);
// Set Titles //
Pepco1.PeString.MainTitle = "Produce by State";
Pepco1.PeString.SubTitle = "";
// Set various other properties //
Pepco1.PeUserInterface.Allow.FocalRect = false;
Pepco1.PeData.Precision = DataPrecision.OneDecimal;
Pepco1.PePlot.GroupingPercent = GroupingPercent.FourPercent;
Pepco1.PePlot.DataShadows = DataShadows.ThreeDimensional;
Pepco1.PePlot.Show3DShadow = true;
Pepco1.PeUserInterface.AutoExplode = AutoExplode.AllSubsets;
Pepco1.PeConfigure.PrepareImages = true;
Pepco1.PeConfigure.CacheBmp = true;
Pepco1.PeFonts.FontSize = FontSize.Large;
Pepco1.PeFonts.Fixed = true;
Pepco1.PeColor.BitmapGradientMode = true;
Pepco1.PeColor.QuickStyle = QuickStyle.MediumNoBorder;
Pepco1.PeConfigure.TextShadows = TextShadows.BoldText;
Pepco1.PeFonts.MainTitle.Bold = true;
Pepco1.PeFonts.SubTitle.Bold = true;
Pepco1.PeFonts.Label.Bold = true;
Pepco1.PeFonts.FontSize = FontSize.Large;
}
public void CreateAllCharts(int nChart)
{
m_nChart = nChart;
if(Pepco1 == null)
return;
Pepco1.PeFunction.Reset();
Pepco1.PeFunction.Reinitialize();
Pepco1.PeConfigure.PrepareImages = true;
Random Rand_Num = new Random(unchecked((int)DateTime.Now.Ticks));
if(m_nChart == 300)
{
Pepco1.PeData.Subsets = 1;
Pepco1.PeData.Points = 13;
// Pass data for slices //
s=0;
for(p=0; p<=12; p++)
{
if (frm.arrstrGrd[p,0]==null)
{
Pepco1.PeData.X[s, p] = 0;
}
else
{
Pepco1.PeData.X[s, p] =Int32.Parse(frm.arrstrGrd[p,0]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -