form1.cs
来自「zwave 无线通讯协议 PC controller 控制器源码」· CS 代码 · 共 1,249 行 · 第 1/5 页
CS
1,249 行
private ErrorProvider errorProvider1;
private TabPage tabPageConfiguration;
private Label labelBatteryStatusField;
private Label labelBatteryStatus;
private Label labelValue;
private TextBox textBoxConfigParam;
private Label labelParam;
private TextBox textBoxConfigValue;
private Button buttonConfigSet;
private byte clsno;
#endregion Fields
public Form1()
{
InitializeComponent();
this.formThread = System.Threading.Thread.CurrentThread;
//Open our Subkey. Create it if needs be
OurKey = OurKey.OpenSubKey("Software", true);
OurKey.CreateSubKey("Zensys");
OurKey = OurKey.OpenSubKey("Zensys", true);
OurKey.CreateSubKey("Z-Wave PCController");
OurKey = OurKey.OpenSubKey("Z-Wave PCController", true);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (applicationLayer != null)
{
applicationLayer.Close();
}
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.components = new System.ComponentModel.Container();
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
"Basic Device Class",
""}, -1, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))));
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
"Generic Device Class",
""}, -1, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))));
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem(new string[] {
"Specific Device Class",
""}, -1);
System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem(new string[] {
"Node Type Parameters",
""}, -1);
System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem(new string[] {
"",
""}, -1);
System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem(new string[] {
"",
""}, -1);
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPageNode = new System.Windows.Forms.TabPage();
this.buttonIsFailed = new System.Windows.Forms.Button();
this.buttonReplaceFailedNode = new System.Windows.Forms.Button();
this.buttonRemFail = new System.Windows.Forms.Button();
this.buttonOff = new System.Windows.Forms.Button();
this.buttonGetReport = new System.Windows.Forms.Button();
this.buttonOn = new System.Windows.Forms.Button();
this.buttonExcludeNode = new System.Windows.Forms.Button();
this.buttonAddNode = new System.Windows.Forms.Button();
this.tabPageController = new System.Windows.Forms.TabPage();
this.buttonRequestUpdate = new System.Windows.Forms.Button();
this.buttonNewPrimary = new System.Windows.Forms.Button();
this.buttonResetController = new System.Windows.Forms.Button();
this.buttonControllerShift = new System.Windows.Forms.Button();
this.buttonReceive = new System.Windows.Forms.Button();
this.groupBoxOptionalAssignment = new System.Windows.Forms.GroupBox();
this.buttonEnableOptionalAssignment = new System.Windows.Forms.Button();
this.select_None = new System.Windows.Forms.RadioButton();
this.select_SUC = new System.Windows.Forms.RadioButton();
this.select_SIS = new System.Windows.Forms.RadioButton();
this.tabPageCmdClass = new System.Windows.Forms.TabPage();
this.buttonSendCmd = new System.Windows.Forms.Button();
this.textBoxVal = new System.Windows.Forms.TextBox();
this.labelVal = new System.Windows.Forms.Label();
this.comboBoxCmd = new System.Windows.Forms.ComboBox();
this.labelCmd = new System.Windows.Forms.Label();
this.labelCls = new System.Windows.Forms.Label();
this.comboBoxCls = new System.Windows.Forms.ComboBox();
this.labelCmdClassRxed = new System.Windows.Forms.Label();
this.tabPageWakeUp = new System.Windows.Forms.TabPage();
this.labelBatteryStatusField = new System.Windows.Forms.Label();
this.labelBatteryStatus = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.labelWakeUpTimeField = new System.Windows.Forms.Label();
this.labelWakeUpTime = new System.Windows.Forms.Label();
this.buttonWakeUpSet = new System.Windows.Forms.Button();
this.textBoxWakeupTime = new System.Windows.Forms.TextBox();
this.tabPageConfiguration = new System.Windows.Forms.TabPage();
this.labelValue = new System.Windows.Forms.Label();
this.textBoxConfigParam = new System.Windows.Forms.TextBox();
this.labelParam = new System.Windows.Forms.Label();
this.textBoxConfigValue = new System.Windows.Forms.TextBox();
this.buttonConfigSet = new System.Windows.Forms.Button();
this.tabPageAssociation = new System.Windows.Forms.TabPage();
this.chkAssignRoutes = new System.Windows.Forms.CheckBox();
this.listBoxAssociationGroups = new System.Windows.Forms.ListBox();
this.listBoxAssociationInGroup = new System.Windows.Forms.ListBox();
this.listBoxAssocSup = new System.Windows.Forms.ListBox();
this.labelAssociationInGroup = new System.Windows.Forms.Label();
this.labelGroups = new System.Windows.Forms.Label();
this.labelDest = new System.Windows.Forms.Label();
this.buttonGetAssociation = new System.Windows.Forms.Button();
this.buttonRemoveAssociation = new System.Windows.Forms.Button();
this.buttonAddAssociation = new System.Windows.Forms.Button();
this.tabPageRouting = new System.Windows.Forms.TabPage();
this.labelDst = new System.Windows.Forms.Label();
this.labelSource = new System.Windows.Forms.Label();
this.listBoxDst = new System.Windows.Forms.ListBox();
this.listBoxSrc = new System.Windows.Forms.ListBox();
this.buttonDeleteRoute = new System.Windows.Forms.Button();
this.buttonAssignRoute = new System.Windows.Forms.Button();
this.tabPageNetworkInfo = new System.Windows.Forms.TabPage();
this.listViewNodeInfo = new System.Windows.Forms.ListView();
this.columnNodeInfo1 = new System.Windows.Forms.ColumnHeader();
this.columnNodeInfo2 = new System.Windows.Forms.ColumnHeader();
this.buttonGetNodeInfo = new System.Windows.Forms.Button();
this.tabPageAbout = new System.Windows.Forms.TabPage();
this.btnShowSerialAPICapabilities = new System.Windows.Forms.Button();
this.about_ChipRevField = new System.Windows.Forms.Label();
this.about_ChipRev = new System.Windows.Forms.Label();
this.about_ChipTypeField = new System.Windows.Forms.Label();
this.about_ChipType = new System.Windows.Forms.Label();
this.about_dll_version = new System.Windows.Forms.Label();
this.labelDLL = new System.Windows.Forms.Label();
this.about_BaudRateField = new System.Windows.Forms.Label();
this.about_ConnectionField = new System.Windows.Forms.Label();
this.about_LibraryField = new System.Windows.Forms.Label();
this.about_VersionField = new System.Windows.Forms.Label();
this.about_Version = new System.Windows.Forms.Label();
this.about_Library = new System.Windows.Forms.Label();
this.about_BaudRate = new System.Windows.Forms.Label();
this.about_Connection = new System.Windows.Forms.Label();
this.listViewNodes = new System.Windows.Forms.ListView();
this.columnHeaderNode = new System.Windows.Forms.ColumnHeader();
this.columnHeaderDeviceType = new System.Windows.Forms.ColumnHeader();
this.columnHeaderStatus = new System.Windows.Forms.ColumnHeader();
this.buttonExit = new System.Windows.Forms.Button();
this.buttonAbort = new System.Windows.Forms.Button();
this.buttonAllOff = new System.Windows.Forms.Button();
this.buttonAllOn = new System.Windows.Forms.Button();
this.labelHomeIDField = new System.Windows.Forms.Label();
this.labelControllerField = new System.Windows.Forms.Label();
this.labelStatusField = new System.Windows.Forms.Label();
this.labelHomeID = new System.Windows.Forms.Label();
this.labelController = new System.Windows.Forms.Label();
this.labelStatus = new System.Windows.Forms.Label();
this.labelNodesInQueue = new System.Windows.Forms.Label();
this.NumberOfNodesQueued = new System.Windows.Forms.Label();
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.mainMenu = new System.Windows.Forms.MainMenu(this.components);
this.menuSettings = new System.Windows.Forms.MenuItem();
this.menuPort = new System.Windows.Forms.MenuItem();
this.checkBoxDebug = new System.Windows.Forms.CheckBox();
this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components);
this.tabControl1.SuspendLayout();
this.tabPageNode.SuspendLayout();
this.tabPageController.SuspendLayout();
this.groupBoxOptionalAssignment.SuspendLayout();
this.tabPageCmdClass.SuspendLayout();
this.tabPageWakeUp.SuspendLayout();
this.tabPageConfiguration.SuspendLayout();
this.tabPageAssociation.SuspendLayout();
this.tabPageRouting.SuspendLayout();
this.tabPageNetworkInfo.SuspendLayout();
this.tabPageAbout.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPageNode);
this.tabControl1.Controls.Add(this.tabPageController);
this.tabControl1.Controls.Add(this.tabPageCmdClass);
this.tabControl1.Controls.Add(this.tabPageWakeUp);
this.tabControl1.Controls.Add(this.tabPageConfiguration);
this.tabControl1.Controls.Add(this.tabPageAssociation);
this.tabControl1.Controls.Add(this.tabPageRouting);
this.tabControl1.Controls.Add(this.tabPageNetworkInfo);
this.tabControl1.Controls.Add(this.tabPageAbout);
this.tabControl1.Location = new System.Drawing.Point(8, 8);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(400, 168);
this.tabControl1.TabIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPageNode
//
this.tabPageNode.Controls.Add(this.buttonIsFailed);
this.tabPageNode.Controls.Add(this.buttonReplaceFailedNode);
this.tabPageNode.Controls.Add(this.buttonRemFail);
this.tabPageNode.Controls.Add(this.buttonOff);
this.tabPageNode.Controls.Add(this.buttonGetReport);
this.tabPageNode.Controls.Add(this.buttonOn);
this.tabPageNode.Controls.Add(this.buttonExcludeNode);
this.tabPageNode.Controls.Add(this.buttonAddNode);
this.tabPageNode.Location = new System.Drawing.Point(4, 22);
this.tabPageNode.Name = "tabPageNode";
this.tabPageNode.Size = new System.Drawing.Size(392, 142);
this.tabPageNode.TabIndex = 0;
this.tabPageNode.Text = "Node";
this.tabPageNode.UseVisualStyleBackColor = true;
//
// buttonIsFailed
//
this.buttonIsFailed.Location = new System.Drawing.Point(192, 71);
this.buttonIsFailed.Name = "buttonIsFailed";
this.buttonIsFailed.Size = new System.Drawing.Size(82, 32);
this.buttonIsFailed.TabIndex = 14;
this.buttonIsFailed.Text = "&Is Failed";
this.buttonIsFailed.UseVisualStyleBackColor = true;
this.buttonIsFailed.Click += new System.EventHandler(this.buttonIsFailed_Click);
//
// buttonReplaceFailedNode
//
this.buttonReplaceFailedNode.Location = new System.Drawing.Point(280, 23);
this.buttonReplaceFailedNode.Name = "buttonReplaceFailedNode";
this.buttonReplaceFailedNode.Size = new System.Drawing.Size(80, 32);
this.buttonReplaceFailedNode.TabIndex = 13;
this.buttonReplaceFailedNode.Text = "Replace Failed Node";
this.buttonReplaceFailedNode.Click += new System.EventHandler(this.buttonReplaceFailedNode_Click);
//
// buttonRemFail
//
this.buttonRemFail.Location = new System.Drawing.Point(280, 71);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?