mirror of
https://github.com/inthehand/32feet.git
synced 2026-10-20 07:38:22 +08:00
49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using ConsoleMenuTesting;
|
|
using System.Diagnostics;
|
|
|
|
|
|
namespace DeviceMenuTesting
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
{
|
|
this.textBox1.Text = string.Empty;
|
|
MenuSystem console = new FormMenu(this.textBox1, this.menuItemMenuMenu, this.labelPause);
|
|
BluetoothTesting program = new BluetoothTesting();
|
|
program.console = console;
|
|
console.AddMenus(program);
|
|
console.RunMenu();
|
|
}
|
|
|
|
//--------------------------------------------------------------
|
|
private void menuItemQuit_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void Form1_Closing(object sender, CancelEventArgs e)
|
|
{
|
|
DialogResult rslt = MessageBox.Show("Quit?", "DeviceMenuTesting",
|
|
MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
|
|
if (rslt != DialogResult.Yes) {
|
|
Debug.Assert(rslt == DialogResult.No, "Neither Yes nor No!");
|
|
e.Cancel = true;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|