资源简介
winform自绘波形,鼠标滚轮滚动以鼠标为中心缩放波形尺寸,鼠标按下图形左右拖拽图形,1~2键盘按键可以画出俩个时间标尺计算俩个标尺之间的时间,双缓冲panel自定义控件绘图不闪烁
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int num = 1;
int x1 = 0;
int y1 = 100;
int x2 = 50;
int y2 = 100;
int x3 = 0;
int y3 = 200;
int x4 = 50;
int y4 = 200;
int x5 = 0;
int y5 = 300;
int x6 = 50;
int y6 = 300;
int x7 = 0;
int y7 = 400;
int x8 = 50;
int y8 = 400;
int x = 0;
int xx = 0;
List ps = new List();
Bitmap bmp;
Bitmap Getbitmap(int width int height)
{
bmp = new Bitmap(width height);
Graphics g = Graphics.FromImage(bmp);
Font font = new Font(“微软雅黑“ 7);
//g.Clear(Color.Black);
num = 1;
x1 = 0;
y1 = 100;
x2 = 50;
y2 = 100;
x3 = 0;
y3 = 200;
x4 = 50;
y4 = 200;
x5 = 0;
y5 = 300;
x6 = 50;
y6 = 300;
x7 = 0;
y7 = 400;
x8 = 50;
y8 = 400;
for (int j = 0; j < contorl; j++)
{
num *= 2;
}
if (pd)
{
x = doubleBufferPanel1.HorizontalScroll.Value + PointToClient(MousePosition).X - 0;
//g.DrawLine(Pens.Green doubleBufferPanel1.HorizontalScroll.Value + PointToClient(MousePosition).X 0 doubleBufferPanel1.HorizontalScroll.Value + PointToClient(MousePosition).X pictureBox1.Height);
}
else if (pd1)
{
xx = doubleBufferPanel1.HorizontalScroll.Value + PointToClient(MousePosition).X - 0;
//g.DrawLine(Pens.Green doubleBufferPanel1.HorizontalScroll.Value + PointToClient(MousePosition).X 0 doubleBufferPanel1.HorizontalScroll.Value + PointToClient(MousePosition).X pictureBox1.Height);
}
if (judge1 || pd)
{
if (add)
{
x = (x - 50) * 2 + 50;
}
else if(subtract)
{
x = (x - 50) / 2 + 50;
}
g.DrawLine(Pens.Green x 0 x pictureBox1.Height);
g.DrawLine(Pens.Green x 0 x + 15 10);
g.DrawLine(Pens.Green x + 15 10 x 20);
g.DrawString(“1“ font Brushes.White x 3);
}
if (judge2 || pd1)
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 33280 2019-02-28 16:24 WindowsFormsApplication1\.vs\WindowsFormsApplication1\v14\.suo
..A..H. 53248 2019-03-27 09:18 WindowsFormsApplication1\.vs\WindowsFormsApplication1\v15\.suo
文件 0 2019-03-01 08:49 WindowsFormsApplication1\.vs\WindowsFormsApplication1\v15\Server\sqlite3\db.lock
文件 1695744 2019-03-04 17:06 WindowsFormsApplication1\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide
文件 32768 2019-03-27 08:58 WindowsFormsApplication1\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide-shm
文件 4128272 2019-03-05 14:31 WindowsFormsApplication1\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide-wal
文件 184 2019-03-04 11:59 WindowsFormsApplication1\WindowsFormsApplication1\App.config
文件 23040 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 184 2019-03-04 11:59 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
文件 30208 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 22696 2019-02-28 18:48 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 189 2019-02-28 12:15 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config
文件 490 2018-04-12 07:35 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 18859 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
文件 6945 2019-03-05 14:29 WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
文件 8666 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
文件 46078 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7015 2019-03-04 12:00 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 0 2019-02-28 12:15 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
文件 0 2019-02-28 12:15 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
文件 0 2019-02-28 12:15 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
文件 3584 2019-03-04 11:59 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
文件 42 2019-03-04 11:59 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.CoreCompileInputs.cache
文件 3983 2019-03-04 17:26 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 1012 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.cache
文件 123324 2019-03-01 18:04 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojAssemblyReference.cache
文件 2384 2019-02-28 17:52 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache
文件 23040 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe
文件 4744 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources
文件 30208 2019-03-27 09:04 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb
............此处省略29个文件信息
- 上一篇:C#仿真飞行仪表盘
- 下一篇:C# mysql、sqlserver连接demo源码
相关资源
- C# mysql、sqlserver连接demo源码
- C#仿真飞行仪表盘
- C#动态添加数据到折线图
- C# winform 宿舍管理系统 ,vs2010开发,
- 基于C#邮件客户端
- C#酒店管理系统(报告+代码+讲义)
- 打砖块小游戏,C#源码
- C#贪吃蛇源码
- 豆瓣API接口获取书籍详细信息C#
- 粒子群算法求解TSP问题
- 网络TCPServer转串口UART源码
- C#实现坐标转换,七参数之间进行数据
- c#基础复习题含答案
- 三角高程近似平差C#
- 高斯正反算程序窗体程序,附计算
- C#开发webservice接口,对客户端post服务
- 中国矿业大学程序设计综合实践学生
- C#实现串口通信
- 数据结构与算法-C#版
- C#评委打分系统
- C#调用IDL报错.docx
- C# winform实现简单的贪吃蛇
- 北大青鸟C# 影院售票系统完整源码
- c#软件开发综合实践登录,注册功能
- C#开发实战1200例(第1、2卷Pdf)+第1卷
- C#WinFrom程序的FTP服务器上传
- C#TCP服务器和客户端Winform源代码
- 简单的C#窗口考试系统,无数据库.z
- C# 画画板 仿window画画板
- C#调用Ansys
评论
共有 条评论