📄 mainframe.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Globalization;
using System.Threading;
namespace GPSReader
{
/// <summary>
/// Summary description for MainFrame.
/// </summary>
public class MainFrame : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu;
private System.Windows.Forms.MenuItem menuGPS;
private System.Windows.Forms.MenuItem menuReceiver;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public MainFrame()
{
this.IsMdiContainer=true;
InitializeComponent();
}
/// <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.mainMenu = new System.Windows.Forms.MainMenu();
this.menuGPS = new System.Windows.Forms.MenuItem();
this.menuReceiver = new System.Windows.Forms.MenuItem();
//
// mainMenu
//
this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuGPS});
//
// menuGPS
//
this.menuGPS.Index = 0;
this.menuGPS.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuReceiver});
this.menuGPS.Text = "GPS";
//
// menuReceiver
//
this.menuReceiver.Index = 0;
this.menuReceiver.Text = "Receiver";
this.menuReceiver.Click += new System.EventHandler(this.menuReceiver_Click);
//
// MainFrame
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(760, 409);
this.Menu = this.mainMenu;
this.Name = "MainFrame";
this.Text = "GPSReader";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Application.Run(new MainFrame());
}
private void MenuDatabaseCallback(object sender, System.EventArgs e)
{
}
private void menuReceiver_Click(object sender, System.EventArgs e)
{
try
{
ReceiverForm oForm = new ReceiverForm();
oForm.MdiParent=this;
oForm.Show();
}
catch(Exception oException)
{
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -