📄 xaaaaaaa.a
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GPSClassLibrary;
namespace GPSGuider
{
public partial class MainForm : Form
{
MapForm form = new MapForm();
Timer timer1 = new Timer();
bool running = false;
Point point = new Point(0, 0);
Random rand = new Random(DateTime.Now.Second);
public MainForm()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
timer1.Interval = 200;
timer1.Tick += timer1_tick;
form.Show();
}
private void timer1_tick(object sender, EventArgs e)
{
point.X += (int)((rand.NextDouble() - 0.2) * 2000);
point.Y += (int)((rand.NextDouble() - 0.1) * 2000);
form.FormMap.RealPoint = point;
}
private void button1_Click(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
if (running)
{
timer1.Stop();
running = !running;
}
else
{
timer1.Start();
running = !running;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -