📄 form1.designer.cs
字号:
using System.IO;
namespace CyControl
{
public class TTransaction
{
public const byte ReqType_DIR_MASK = 0x80;
public const byte ReqType_TYPE_MASK = 0x60;
public const byte ReqType_TGT_MASK = 0x03;
public const byte TotalHeaderSize = 32;
public uint Signature; //4
public uint RecordSize; //8
public ushort HeaderSize; //10
public byte Tag; //11
public byte ConfigNum; //12
public byte IntfcNum; //13
public byte AltIntfc; //14
public byte EndPtAddr; //15
public byte bReqType; //16 //EP0 Xfer
public byte CtlReqCode; //17 //EP0 Xfer
public byte reserved0; //18
public ushort wValue; //20
public ushort wIndex; //22
public byte reserved1; //23
public byte reserved2; //24
public uint Timeout; //28
public uint DataLen; //32
public TTransaction()
{
this.Signature = 0x54505343;
this.HeaderSize = TotalHeaderSize;
this.ConfigNum = 0;
this.IntfcNum = 0;
this.AltIntfc = 0;
this.EndPtAddr = 0;
this.Tag = 0;
this.bReqType = 0;
//this.Target = 0x00;//TGT_DEVICE
//this.ReqType = 0x40;//REQ_VENDOR
//this.Direction = 0x00; //DIR_TO_DEVICE
}
public void WriteToStream(FileStream f)
{
BinaryWriter wr = new BinaryWriter(f);
wr.Write(this.Signature);
wr.Write(this.RecordSize);
wr.Write(this.HeaderSize);
wr.Write(this.Tag);
wr.Write(this.ConfigNum);
wr.Write(this.IntfcNum);
wr.Write(this.AltIntfc);
wr.Write(this.EndPtAddr);
wr.Write(this.bReqType);
wr.Write(this.CtlReqCode);
wr.Write(this.reserved0);
wr.Write(this.wValue);
wr.Write(this.wIndex);
wr.Write(this.reserved1);
wr.Write(this.reserved2);
wr.Write(this.Timeout);
wr.Write(this.DataLen);
}
public void ReadFromStream(FileStream f)
{
BinaryReader rd = new BinaryReader(f);
this.Signature = rd.ReadUInt32();
this.RecordSize = rd.ReadUInt32();
this.HeaderSize = rd.ReadUInt16();
this.Tag = rd.ReadByte();
this.ConfigNum = rd.ReadByte();
this.IntfcNum = rd.ReadByte();
this.AltIntfc = rd.ReadByte();
this.EndPtAddr = rd.ReadByte();
this.bReqType = rd.ReadByte();
this.CtlReqCode = rd.ReadByte();
this.reserved0 = rd.ReadByte();
this.wValue = rd.ReadUInt16();
this.wIndex = rd.ReadUInt16();
this.reserved1 = rd.ReadByte();
this.reserved2 = rd.ReadByte();
this.Timeout = rd.ReadUInt32();
this.DataLen = rd.ReadUInt32();
}
public void ReadToBuffer(FileStream f, ref byte[] buffer, ref int len)
{
if (len > 0)
{
BinaryReader rd = new BinaryReader(f);
rd.Read(buffer, 0, len);
}
}
public void WriteFromBuffer(FileStream f, ref byte[] buffer, ref int len)
{
if (len > 0)
{
BinaryWriter wr = new BinaryWriter(f);
wr.Write(buffer, 0, len);
}
}
}
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.programFX2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ProgRamItem = new System.Windows.Forms.ToolStripMenuItem();
this.ProgSE2Item = new System.Windows.Forms.ToolStripMenuItem();
this.ProgE2Item = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.HaltItem = new System.Windows.Forms.ToolStripMenuItem();
this.RunItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.UsersGuide = new System.Windows.Forms.ToolStripMenuItem();
this.AboutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.Record = new System.Windows.Forms.ToolStripButton();
this.Stop = new System.Windows.Forms.ToolStripButton();
this.Pause = new System.Windows.Forms.ToolStripButton();
this.Create_script = new System.Windows.Forms.ToolStripButton();
this.Script_parameters = new System.Windows.Forms.ToolStripButton();
this.load_button = new System.Windows.Forms.ToolStripButton();
this.play_button = new System.Windows.Forms.ToolStripButton();
this.Reset_device = new System.Windows.Forms.ToolStripButton();
this.Reconnect_device = new System.Windows.Forms.ToolStripButton();
this.Reset_endpoint = new System.Windows.Forms.ToolStripButton();
this.Abort_endpoint = new System.Windows.Forms.ToolStripButton();
this.Reset_Pipe = new System.Windows.Forms.ToolStripButton();
this.Abort_Pipe = new System.Windows.Forms.ToolStripButton();
this.URB_Stat = new System.Windows.Forms.ToolStripButton();
this.Select_Monitor = new System.Windows.Forms.ToolStripButton();
this.Load_Monitor = new System.Windows.Forms.ToolStripButton();
this.StatusBar = new System.Windows.Forms.StatusStrip();
this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.StatLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.Split1 = new System.Windows.Forms.SplitContainer();
this.gb = new System.Windows.Forms.GroupBox();
this.Ok = new System.Windows.Forms.Button();
this.Addr = new System.Windows.Forms.Label();
this.Cpu = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.DeviceTreeView = new System.Windows.Forms.TreeView();
this.TabPages = new System.Windows.Forms.TabControl();
this.DescrTab = new System.Windows.Forms.TabPage();
this.DescText = new System.Windows.Forms.TextBox();
this.XferTab = new System.Windows.Forms.TabPage();
this.IsPacket = new System.Windows.Forms.CheckBox();
this.Clear = new System.Windows.Forms.Button();
this.XferDataBox = new System.Windows.Forms.MaskedTextBox();
this.wValueBox = new System.Windows.Forms.TextBox();
this.ReqCodeBox = new System.Windows.Forms.TextBox();
this.wIndexBox = new System.Windows.Forms.TextBox();
this.ReqCodeLabel = new System.Windows.Forms.Label();
this.wIndexLabel = new System.Windows.Forms.Label();
this.wValueLabel = new System.Windows.Forms.Label();
this.TargetLabel = new System.Windows.Forms.Label();
this.ReqTypeLabel = new System.Windows.Forms.Label();
this.DirectionLabel = new System.Windows.Forms.Label();
this.TargetBox = new System.Windows.Forms.ComboBox();
this.ReqTypeBox = new System.Windows.Forms.ComboBox();
this.DirectionBox = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.FileXferBtn = new System.Windows.Forms.Button();
this.DataXferBtn = new System.Windows.Forms.Button();
this.NumBytesBox = new System.Windows.Forms.TextBox();
this.XferTextBox = new System.Windows.Forms.TextBox();
this.OutputBox = new System.Windows.Forms.TextBox();
this.DriversTab = new System.Windows.Forms.TabPage();
this.label4 = new System.Windows.Forms.Label();
this.CyUSBDeviceBox = new System.Windows.Forms.CheckBox();
this.HIDDeviceBox = new System.Windows.Forms.CheckBox();
this.MSCDeviceBox = new System.Windows.Forms.CheckBox();
this.FOpenDialog = new System.Windows.Forms.OpenFileDialog();
this.FSave = new System.Windows.Forms.SaveFileDialog();
this.menuStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.StatusBar.SuspendLayout();
this.Split1.Panel1.SuspendLayout();
this.Split1.Panel2.SuspendLayout();
this.Split1.SuspendLayout();
this.gb.SuspendLayout();
this.TabPages.SuspendLayout();
this.DescrTab.SuspendLayout();
this.XferTab.SuspendLayout();
this.DriversTab.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.BackColor = System.Drawing.Color.Silver;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.programFX2ToolStripMenuItem,
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(674, 24);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
this.fileToolStripMenuItem.Text = "File";
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// programFX2ToolStripMenuItem
//
this.programFX2ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ProgRamItem,
this.ProgSE2Item,
this.ProgE2Item,
this.toolStripMenuItem1,
this.HaltItem,
this.RunItem});
this.programFX2ToolStripMenuItem.Name = "programFX2ToolStripMenuItem";
this.programFX2ToolStripMenuItem.Size = new System.Drawing.Size(80, 20);
this.programFX2ToolStripMenuItem.Text = "Program FX2";
//
// ProgRamItem
//
this.ProgRamItem.Name = "ProgRamItem";
this.ProgRamItem.Size = new System.Drawing.Size(153, 22);
this.ProgRamItem.Text = "RAM";
this.ProgRamItem.Click += new System.EventHandler(this.ProgE2Item_Click);
//
// ProgSE2Item
//
this.ProgSE2Item.Name = "ProgSE2Item";
this.ProgSE2Item.Size = new System.Drawing.Size(153, 22);
this.ProgSE2Item.Text = "Small EEPROM";
this.ProgSE2Item.Click += new System.EventHandler(this.ProgE2Item_Click);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -