资源简介
使用c#语言简写的窗体应用程序生成雷达扇扫图并且有刻度标识鼠标移动显示当前的刻度和长度
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DrawRada
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region 画扇形图和2107等的数据
PointF orignalPoint = new PointF();
float rMax rMiddle rMin;
struct pointlist
{
public float targetDis;
public float targetAngle;
}
List targetList = new List();
Random rd = new Random();
Bitmap bitmap;
private void Form1_Load(object sender EventArgs e)
{
pointlist item = new pointlist();
for (int i = 0; i < 10; i++)
{
item.targetDis = rd.Next(0 12000);
item.targetAngle = rd.Next(-45 45);
targetList.Add(item);
}
bitmap = new Bitmap(pictureBox1.Width pictureBox1.Height);
}
public Bitmap ShowPolePicture(Bitmap bmpstring str)
{
Graphics g;
g = Graphics.FromImage(bmp);
g.Clear(Color.Black);
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
//Color a=Color.FromArgb (rgb)
//设置画笔
Pen penframe = new Pen(Color.Yellow 2);
Pen penframeCenter = new Pen(Color.Yellow 1);
penframeCenter.Dashstyle = System.Drawing.Drawing2D.Dashstyle.Dash;
Pen penLine = new Pen(Color.Green 2);
Pen penPoint = new Pen(Color.White 1);
Font ft = new Font(“Times New Roman“ 13);
//设置圆心和半径
//PointF orignalPoint = new PointF();
orignalPoint.X = pictureBox1.Location.X + (pictureBox1.Width) / 2.0f;
orignalPoint.Y = pictureBox1.Location.Y + pictureBox1.Height - 35;
rMax = pictureBox1.Height - 40;
rMiddle = rMax * 2 / 3;
rMin = rMax / 3;
PointF P0 = new PointF();//扫描线的坐标
PointF P1 = new PointF();//弧形中心点坐标
PointF PL = new PointF();//左极限坐标
PointF PR = new PointF();//右极限坐标
PointF PLMax = new PointF();//左最大坐标
PointF PRMax = new PointF();//右最大坐标
PointF PLMiddle = new PointF();//左中间坐标
PointF PRMiddle = new PointF();//右中间坐标
PointF PLMin = new PointF();//左最下坐标
PointF PRMin = new PointF();//右最下坐标
P1.X = orignalPoint.X;
P1.Y = orignalPoint.Y - rMax;
//扫描线的坐标
P0.X = orignalPoint.X + (float)(rMax * Math.Cos(Math.PI / 180 * (Angle - 90)));
P0.Y = orignalPoint.Y + (float)(rMax * Math.Sin(Math.PI / 180 * (Angle - 90)));
g.DrawLine(penLine orignalPoint P0)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 150016 2018-07-05 16:47 DrawRada\DrawRada\bin\Debug\DrawRada.exe
文件 28160 2018-07-05 16:47 DrawRada\DrawRada\bin\Debug\DrawRada.pdb
文件 11600 2018-07-05 16:47 DrawRada\DrawRada\bin\Debug\DrawRada.vshost.exe
文件 490 2018-04-12 07:35 DrawRada\DrawRada\bin\Debug\DrawRada.vshost.exe.manifest
文件 3904 2018-07-05 16:47 DrawRada\DrawRada\DrawRada.csproj
文件 9144 2018-07-05 16:47 DrawRada\DrawRada\Form1.cs
文件 4327 2018-07-05 16:47 DrawRada\DrawRada\Form1.Designer.cs
文件 107783 2018-07-05 16:47 DrawRada\DrawRada\Form1.resx
文件 5420 2018-07-05 14:55 DrawRada\DrawRada\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6387 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 610 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug\DrawRada.csproj.FileListAbsolute.txt
文件 975 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug\DrawRada.csproj.GenerateResource.Cache
文件 9174 2018-07-05 14:58 DrawRada\DrawRada\obj\x86\Debug\DrawRada.csprojResolveAssemblyReference.cache
文件 150016 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug\DrawRada.exe
文件 68212 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug\DrawRada.Form1.resources
文件 28160 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug\DrawRada.pdb
文件 180 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug\DrawRada.Properties.Resources.resources
文件 489 2018-07-04 15:10 DrawRada\DrawRada\Program.cs
文件 1348 2018-07-04 15:10 DrawRada\DrawRada\Properties\AssemblyInfo.cs
文件 2868 2018-07-04 15:10 DrawRada\DrawRada\Properties\Resources.Designer.cs
文件 5612 2018-07-04 15:10 DrawRada\DrawRada\Properties\Resources.resx
文件 1095 2018-07-04 15:10 DrawRada\DrawRada\Properties\Settings.Designer.cs
文件 249 2018-07-04 15:10 DrawRada\DrawRada\Properties\Settings.settings
文件 67646 2018-07-05 16:47 DrawRada\DrawRada\radar_wifi_wi-fi_128px_11538_easyicon.net.ico
文件 866 2018-07-04 15:10 DrawRada\DrawRada.sln
..A..H. 20480 2018-07-05 16:47 DrawRada\DrawRada.suo
目录 0 2018-07-04 15:10 DrawRada\DrawRada\obj\x86\Debug\TempPE
目录 0 2018-07-05 16:47 DrawRada\DrawRada\obj\x86\Debug
目录 0 2018-07-04 15:54 DrawRada\DrawRada\bin\Debug
目录 0 2018-07-04 15:10 DrawRada\DrawRada\obj\x86
............此处省略8个文件信息
- 上一篇:C#实现摄像头控制
- 下一篇:用于局域网内的C#实现文件传输
相关资源
- SignalR 2.0 Winform版
- C# winform Socket大文件传输
- C#将Excel导入到Access数据库表(winFor
- winform图片标尺,画矩形
- C# 斑马标签打印 WEBWINFORM
- C#动画控件超炫
- WeifenLuo.WinFormsUI.Docking3.1.0
- Bunifu_Ui_WinForms_v1.10.0.0_Downloadly.ir.rar
- Winform可视化打印模板设计
- 最新9个C# .NET Winform的多线程进度条源
- Winform绘制圆形和椭圆形图章
- c# 图像旋转 winform 窗体 图片转动
- 优化C# WinForm从中国银行网站抓取汇率
- C#项目 网吧管理系统
- Winform通用经典快速开发CS框架-outloo
- 人事管理系统 winform代码
- 宾馆管理系统(c#2008access2003winform)
- C# Winform 酒店管理系统源代码及数据
- C# Winform 弹窗等待效果图
- winform自动更新程序
- winform c# mschart demo 范例
- WinForm 实现图片滚动
- c#winform做的hosts文件管理
- 控件重绘 C# WinForm控件美化扩展系列之
- .net winform插件大全 .net 控件大全.net插
- winform chart动态跟进式折线图
- WinForm C#Demo 会员与消费系统 进销存系
- c# 模仿windows扑克游戏
- 幸运52winform写的游戏
- winform 60种非常漂亮界面样式\\皮肤(
评论
共有 条评论