📄 usercontrol1.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using mathfunsharp;
namespace expert
{
/// <summary>
/// ProbControl 的摘要说明。
/// </summary>
public class ProbControl : System.Windows.Forms.UserControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public ProbControl()
{
// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent();
// TODO: 在 InitializeComponent 调用后添加任何初始化
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
//
// ProbControl
//
this.Name = "ProbControl";
this.Size = new System.Drawing.Size(464, 296);
this.Load += new System.EventHandler(this.ProbControl_Load);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.ProbControl_Paint);
}
#endregion
private void ProbControl_Load(object sender, System.EventArgs e)
{
}
private void ProbControl_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Rectangle rect=e.ClipRectangle;
Matrix myMatrix = new Matrix(1, 0, 0, -1, 0, 0);
e.Graphics.Transform = myMatrix;
e.Graphics.TranslateTransform(0,rect.Height, MatrixOrder.Append);
CMathFunc a=new CMathFunc();
Pen blackPen=new Pen(Color.Black);
double f=a.CGass(0,0,0.6);
for(double x=-50;x<=50;x+=0.1)
{
f=a.CNormal(0,10,x)*500;
e.Graphics.DrawRectangle(blackPen,(float)x*10+500,(float)f+100,2,3);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -