中科院ICTCLAS词典解析程序 C# 代码

    技术2022-05-11  73

    中科院ICTCLAS词典解析程序 C# 代码    作者: 宁夏大学 张冬 也可以在 http://gforge.osdn.net.cn/projects/xunlong/ 下载 FormWordEdit.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using System.Collections; //   LGPL协议发行   作者  宁夏大学 张冬  2006.12.29  zd4004@163.com namespace XL.XWORDEDIT {     /// <summary>     /// 一个词的单位     /// </summary>     struct oneXNU     {         /// <summary>         /// 频率         /// </summary>         public int a_PL ;         /// <summary>         /// 词长         /// </summary>         public int a_CC ;         /// <summary>         /// 词性         /// </summary>         public int a_CX ;         /// <summary>         /// 词条         /// </summary>         public string a_Word;         }     public partial class FormWordEdit : Form     {         /// <summary>         /// 存放每个字的结构  通过序号得到汉字         /// </summary>         ArrayList nDict = new ArrayList();         ArrayList NWORD6768 = new ArrayList();         /// <summary>         /// 本地路径         /// </summary>         public string mm_path = "";         public FormWordEdit()         {             InitializeComponent();               }         /// <summary>         /// 列表         /// </summary>         private void ItList()         {             comboBox1.Items.Clear();             for (int i = 0; i < 6768; i++)             {                 string WordCN = GetWordCN(i);                 comboBox1.Items.Add(WordCN);             }             comboBox1.Text = GetWordCN(0);         }         private void FormWordEdit_Load(object sender, EventArgs e)         {             GetTable();             //dict.dat  bigramtest.dat                   }         /// <summary>         /// 得到数值         /// </summary>         /// <param ></param>         /// <returns></returns>         private int GetIntIt(byte[] nn)         {             try             {                 byte[] m = nn; // 先读取4个 得到该组的词条数量   //反序移位 得到1个16进制的串                            int x_0 = m[0]; int x_1 = m[1]; int x_2 = m[2]; int x_3 = m[3];                 string xx_0 = x_0.ToString("X"); string xx_1 = x_1.ToString("X");                 string xx_2 = x_2.ToString("X"); string xx_3 = x_3.ToString("X");                 if (xx_0.Length == 1)                 {                     xx_0 = "0" + xx_0;                 }                 if (xx_1.Length == 1)                 {                     xx_1 = "0" + xx_1;                 }                 if (xx_2.Length == 1)                 {                     xx_2 = "0" + xx_2;                 }                 if (xx_3.Length == 1)                 {                     xx_3 = "0" + xx_3;                 }                 string new16 = xx_3 + xx_2 + xx_1 + xx_0;                 int T_xx = System.Convert.ToInt32(new16, 16); //得到了本组词条个数                 return T_xx;             }             catch             {                 return 0;             }         }         /// <summary>         /// 得到编码         /// </summary>         /// <param ></param>         /// <returns></returns>         private byte[] GetByteIt(int nn)         {             byte[] xxx = new byte[4];             string xx_NN = nn.ToString("X");             //填充             xx_NN = xx_NN.PadLeft(8, '0');             string X1 = xx_NN.Substring(0, 2);             string X2 = xx_NN.Substring(2, 2);             string X3 = xx_NN.Substring(4, 2);             string X4 = xx_NN.Substring(6, 2);             int T_X1 = System.Convert.ToInt32(X1, 16);             int T_X2 = System.Convert.ToInt32(X2, 16);             int T_X3 = System.Convert.ToInt32(X3, 16);             int T_X4 = System.Convert.ToInt32(X4, 16);             xxx[0] = (byte)T_X4;             xxx[1] = (byte)T_X3;             xxx[2] = (byte)T_X2;             xxx[3] = (byte)T_X1;             return xxx;             /*             try             {                 byte[] m ; // 先读取4个 得到该组的词条数量   //反序移位 得到1个16进制的串                            int x_0 = m[0]; int x_1 = m[1]; int x_2 = m[2]; int x_3 = m[3];                 string xx_0 = x_0.ToString("X"); string xx_1 = x_1.ToString("X");                 string xx_2 = x_2.ToString("X"); string xx_3 = x_3.ToString("X");                 if (xx_0.Length == 1)                 {                     xx_0 = "0" + xx_0;                 }                 if (xx_1.Length == 1)                 {                     xx_1 = "0" + xx_1;                 }                 if (xx_2.Length == 1)                 {                     xx_2 = "0" + xx_2;                 }                 if (xx_3.Length == 1)                 {                     xx_3 = "0" + xx_3;                 }                 string new16 = xx_3 + xx_2 + xx_1 + xx_0;                 int T_xx = System.Convert.ToInt32(new16, 16); //得到了本组词条个数                 return T_xx;             }             catch             {                 return 0;             }             */         }         /// <summary>         /// 得到字符         /// </summary>         /// <param ></param>         /// <returns></returns>         private string GetStrIt(byte[] nn)         {             //获取GB2312编码页(表)             Encoding gb = Encoding.GetEncoding("gb2312");             string aaa = gb.GetString(nn);             return aaa;         }         /// <summary>         /// 根据序号 得到汉字         /// </summary>         /// <param ></param>         /// <returns></returns>         private string GetWordCN(int nn)         {             return NWORD6768[nn].ToString();             /*             //B0A0             int GBXC = System.Convert.ToInt32("B0A0", 16);             int newGBXC = GBXC + nn + 1;             string newGBXDSTR = newGBXC.ToString("X");             if (newGBXDSTR.Length == 1)             {                 newGBXDSTR = "000" + newGBXDSTR;             }             if (newGBXDSTR.Length == 2)             {                 newGBXDSTR = "00" + newGBXDSTR;             }             if (newGBXDSTR.Length == 3)             {                 newGBXDSTR = "0" + newGBXDSTR;             }             string new_1 = newGBXDSTR.Substring(0, 2);             string new_2 = newGBXDSTR.Substring(2, 2);             int new_w_1 = System.Convert.ToInt32(new_1, 16);             int new_w_2 = System.Convert.ToInt32(new_2, 16);             byte[] newww = new byte[2];             newww[0] = (byte)new_w_1;             newww[1] = (byte)new_w_2;             Encoding gb = Encoding.GetEncoding("gb2312");             string newGZ = gb.GetString(newww);             return newGZ;             */         }         private void button3_Click(object sender, EventArgs e)         {             if (textBox1.Text.Length < 6)             {                 return;             }             string[] newIu = textBox1.Text.Split('/t');             string FR = newIu[0];             string PL = newIu[1];             string CC = newIu[2];             string CX = newIu[3];             string Word = newIu[4];             oneXNU io = new oneXNU();             io.a_CC = Int32.Parse(CC);             io.a_CX = Int32.Parse(CX);             io.a_PL = Int32.Parse(PL);             io.a_Word = Word;             int xNum = GetWordNum(FR);             ArrayList nn_T = (ArrayList)nDict[xNum];             if (nn_T.Contains(io) == true)             {                 nn_T.Remove(io);                 nDict[xNum] = nn_T;                 comboBox1.Text = "";                 comboBox1.SelectedIndex = 0;                 comboBox1.SelectedIndex = 1;                 comboBox1.Text = FR;             }             else             {                 MessageBox.Show("不存在!");                         }         }         private void listBox1_SelectedIndexChanged(object sender, EventArgs e)         {             textBox1.Text =comboBox1.Text +'/t'+ listBox1.Text;         }         private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)         {             if (comboBox1.Text == "")             {                 return;             }             int x = comboBox1.SelectedIndex;             string newWCN = GetWordCN(x);             ArrayList mix = (ArrayList)nDict[x];             listBox1.Items.Clear();             foreach (oneXNU one in mix)             {                 listBox1.Items.Add(one.a_PL.ToString()+"/t"+one.a_CC.ToString()+"/t"+ one.a_CX.ToString()+"/t"+  one.a_Word);                         }         }         private void button1_Click(object sender, EventArgs e)         {         }         private void button2_Click(object sender, EventArgs e)         {             if (textBox_word.Text.Length < 2)             {                 MessageBox.Show("输入错误!");                 return;             }             //频率             int PL = Int32.Parse(textBox_PL.Text);             //词性             int CX = Int32.Parse(textBox_CX.Text);             //词             string nne = textBox_word.Text;             string aF = nne.Substring(0, 1);             string aB = nne.Substring(1, nne.Length - 1);             //词长             Encoding gb = Encoding.GetEncoding("gb2312");             byte[] xx = gb.GetBytes(aB);             oneXNU one = new oneXNU();             one.a_CC = xx.Length;             one.a_PL = PL;             one.a_CX = CX;             one.a_Word = aB;             //根据 aF 得到序号             int oneX = GetWordNum(aF);             string nWord = GetWordCN(oneX);             ArrayList tmp = (ArrayList)nDict[oneX];             if (tmp.Contains(one) == false)             {                 tmp.Add(one);                 nDict[oneX] = tmp;             }             comboBox1.Text = "";             comboBox1.SelectedIndex = 0;             comboBox1.SelectedIndex = 1;             comboBox1.Text = aF;         }         /// <summary>         /// 得到汉字序号对照表         /// </summary>         private void GetTable()         {              //遍历GB2312 字库             string[] Top_1 ={"A","B","C","D","E","F" };             string[] Top_2 ={"0","1","2","3","4","5","6","7","8","9", "A", "B", "C", "D", "E", "F" };             string[] Top_3 ={ "A", "B", "C", "D", "E", "F" };             string[] Top_4 ={ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" };             bool StratADD = false; //开始记录             ArrayList v = new ArrayList();             v.Clear();             foreach (string t_1 in Top_1)             {                 foreach (string t_2 in Top_2)                 {                     foreach (string t_3 in Top_3)                     {                         foreach (string t_4 in Top_4)                         {                             if ((t_3 == "A" & t_4 == "0") | (t_3 == "F" & t_4 == "F") |(t_1=="A" & t_2 =="0"))                             {                             }                             else                             {                                 string all_1 = t_1 + t_2;                                 string all_2 = t_3 + t_4;                                 int GBXC1 = System.Convert.ToInt32(all_1, 16);                                 int GBXC2 = System.Convert.ToInt32(all_2, 16);                                 byte[] newCN = new byte[2];                                 newCN[0] = (byte)GBXC1;                                 newCN[1] = (byte)GBXC2;                                 Encoding gb = Encoding.GetEncoding("gb2312");                                 string CCNN = gb.GetString(newCN);                                 if (CCNN == "啊")                                 {                                     StratADD = true;                                 }                                 if (StratADD == true)                                 {                                     v.Add(CCNN);                                 }                                 if (CCNN == "齄")                                 {                                     StratADD = false;                                 }                             }                         }                    }                 }                                     }             //得到名称             NWORD6768 = v;         }         /// <summary>         /// 根据汉字得到编码         /// </summary>         /// <param ></param>         /// <returns></returns>         private int GetWordNum(string dat)         {             int x = 0;             for(int i=0;i<NWORD6768.Count;i++)             {               string  aaa = NWORD6768[i].ToString();               if (aaa == dat)               {                   return i;               }                                                 }             MessageBox.Show("ERROR! GetWordNum@");             return 0;                 }         private void openToolStripMenuItem_Click(object sender, EventArgs e)         {             openFileDialog1.FileName = "";             openFileDialog1.ShowDialog();             string mF = openFileDialog1.FileName;             if (System.IO.File.Exists(mF) == false)             {                 return;             }             //nDict.Clear();             //NWORD6768.Clear();             mm_path = mF;             OpenDict(mF);         }         private void OpenDict(string mpath)         {             FileStream cfs = new FileStream(mpath, FileMode.Open, FileAccess.Read);             BinaryReader cr = new BinaryReader(cfs, Encoding.GetEncoding("gb2312"));             int PPP = 0;             int Num_all = 0;             //6768个汉字             for (int i = 0; i < 6768; i++)             {                 string WordCN = GetWordCN(i);                 //得到了本组词条个数                 byte[] m1 = cr.ReadBytes(4);                 PPP = PPP + 4;                 int G_1 = GetIntIt(m1);                 ArrayList newOneIt = new ArrayList(G_1);                 if (G_1 == 0)                 {                     goto NEWXXXX;                 }                 for (int ii = 0; ii < G_1; ii++)                 {                     //频率                     byte[] m2 = cr.ReadBytes(4);                     int G_2 = GetIntIt(m2);                     PPP = PPP + 4;                     //词长                     byte[] m3 = cr.ReadBytes(4);                     int G_3 = GetIntIt(m3);                     PPP = PPP + 4;                     //词性                     byte[] m4 = cr.ReadBytes(4);                     int G_4 = GetIntIt(m4);                     PPP = PPP + 4;                     byte[] mWord = cr.ReadBytes(G_3);                     string G_STR = GetStrIt(mWord);                     PPP = PPP + G_3;                     oneXNU newOneXNU = new oneXNU();                     newOneXNU.a_CC = G_3;                     newOneXNU.a_CX = G_4;                     newOneXNU.a_PL = G_2;                     newOneXNU.a_Word = G_STR;                     // ii                     newOneIt.Add(newOneXNU);                     Num_all = Num_all + 1;                 }             NEWXXXX: ;                 nDict.Add(newOneIt);             }             cr.Close();             ItList();             toolStripStatusLabel1.Text = " 共加载词条 > " + Num_all.ToString();         }         private void saveToolStripMenuItem_Click(object sender, EventArgs e)         {             saveFileDialog1.FileName = mm_path;             saveFileDialog1.ShowDialog();             string nppt = saveFileDialog1.FileName;             //if (System.IO.File.Exists(nppt) == false)             //{               //  MessageBox.Show("保存失败!");               //  return;             //}             //保存结果             SaveIt(nppt);             MessageBox.Show("保存完成!");         }         /// <summary>         /// 保存词典         /// </summary>         /// <param ></param>         private void SaveIt(string path)         {             Encoding gb = Encoding.GetEncoding("gb2312");             FileStream cfs = new FileStream(path, FileMode.Create, FileAccess.Write);             BinaryWriter cr = new BinaryWriter(cfs, Encoding.GetEncoding("gb2312"));             //6768个汉字             for (int i = 0; i < 6768; i++)             {                 //得到1个字的结构数据                 ArrayList nU = (ArrayList)nDict[i];                 //得到首选项  词组的个数                 int F_T_1 = nU.Count;                 byte[] a_F_T_1 = GetByteIt(F_T_1);                 cr.Write(a_F_T_1);                 foreach(oneXNU a in nU)                 {                 //频率                     int F_T_2 = (int)a.a_PL;                     byte[] a_F_T_2 = GetByteIt(F_T_2);                     cr.Write(a_F_T_2);                 //词长                     int F_T_3 = (int)a.a_CC;                     byte[] a_F_T_3 = GetByteIt(F_T_3);                     cr.Write(a_F_T_3);                 //词性                     int F_T_4 = (int)a.a_CX;                     byte[] a_F_T_4 = GetByteIt(F_T_4);                     cr.Write(a_F_T_4);                 //词                     string F_T_5 = a.a_Word;                     byte[] a_F_T_5 = gb.GetBytes(F_T_5);                     if (F_T_3 != a_F_T_5.Length)                     {                         MessageBox.Show("解析过程出错!");                     }                     cr.Write(a_F_T_5);                 }                        }             cr.Close();                         }         private void exitToolStripMenuItem_Click(object sender, EventArgs e)         {             Application.Exit();         }     } } 界面  FormWordEdit.Designer.cs namespace XL.XWORDEDIT {     partial class FormWordEdit     {         /// <summary>         /// 必需的设计器变量。         /// </summary>         private System.ComponentModel.IContainer components = null;         /// <summary>         /// 清理所有正在使用的资源。         /// </summary>         /// <param >如果应释放托管资源,为 true;否则为 false。</param>         protected override void Dispose(bool disposing)         {             if (disposing && (components != null))             {                 components.Dispose();             }             base.Dispose(disposing);         }         #region Windows 窗体设计器生成的代码         /// <summary>         /// 设计器支持所需的方法 - 不要         /// 使用代码编辑器修改此方法的内容。         /// </summary>         private void InitializeComponent()         {             this.listBox1 = new System.Windows.Forms.ListBox();             this.comboBox1 = new System.Windows.Forms.ComboBox();             this.label1 = new System.Windows.Forms.Label();             this.textBox_word = new System.Windows.Forms.TextBox();             this.button2 = new System.Windows.Forms.Button();             this.button3 = new System.Windows.Forms.Button();             this.label2 = new System.Windows.Forms.Label();             this.label3 = new System.Windows.Forms.Label();             this.label4 = new System.Windows.Forms.Label();             this.label5 = new System.Windows.Forms.Label();             this.label6 = new System.Windows.Forms.Label();             this.label7 = new System.Windows.Forms.Label();             this.label8 = new System.Windows.Forms.Label();             this.textBox_PL = new System.Windows.Forms.TextBox();             this.textBox_CC = new System.Windows.Forms.TextBox();             this.textBox_CX = new System.Windows.Forms.TextBox();             this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();             this.menuStrip1 = new System.Windows.Forms.MenuStrip();             this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();             this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();             this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();             this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();             this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();             this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();             this.textBox1 = new System.Windows.Forms.TextBox();             this.statusStrip1 = new System.Windows.Forms.StatusStrip();             this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();             this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();             this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();             this.menuStrip1.SuspendLayout();             this.statusStrip1.SuspendLayout();             this.SuspendLayout();             //             // listBox1             //             this.listBox1.FormattingEnabled = true;             this.listBox1.ItemHeight = 12;             this.listBox1.Location = new System.Drawing.Point(12, 85);             this.listBox1.Name = "listBox1";             this.listBox1.Size = new System.Drawing.Size(404, 244);             this.listBox1.TabIndex = 2;             this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);             //             // comboBox1             //             this.comboBox1.FormattingEnabled = true;             this.comboBox1.Location = new System.Drawing.Point(12, 35);             this.comboBox1.Name = "comboBox1";             this.comboBox1.Size = new System.Drawing.Size(168, 20);             this.comboBox1.TabIndex = 3;             this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);             //             // label1             //             this.label1.AutoSize = true;             this.label1.Location = new System.Drawing.Point(438, 96);             this.label1.Name = "label1";             this.label1.Size = new System.Drawing.Size(29, 12);             this.label1.TabIndex = 4;             this.label1.Text = "单词";             //             // textBox_word             //             this.textBox_word.Location = new System.Drawing.Point(461, 115);             this.textBox_word.Name = "textBox_word";             this.textBox_word.Size = new System.Drawing.Size(99, 21);             this.textBox_word.TabIndex = 5;             //             // button2             //             this.button2.Location = new System.Drawing.Point(508, 315);             this.button2.Name = "button2";             this.button2.Size = new System.Drawing.Size(48, 21);             this.button2.TabIndex = 6;             this.button2.Text = "添加";             this.button2.UseVisualStyleBackColor = true;             this.button2.Click += new System.EventHandler(this.button2_Click);             //             // button3             //             this.button3.Location = new System.Drawing.Point(490, 37);             this.button3.Name = "button3";             this.button3.Size = new System.Drawing.Size(75, 21);             this.button3.TabIndex = 7;             this.button3.Text = "删除词条";             this.button3.UseVisualStyleBackColor = true;             this.button3.Click += new System.EventHandler(this.button3_Click);             //             // label2             //             this.label2.AutoSize = true;             this.label2.Location = new System.Drawing.Point(14, 69);             this.label2.Name = "label2";             this.label2.Size = new System.Drawing.Size(29, 12);             this.label2.TabIndex = 8;             this.label2.Text = "频率";             //             // label3             //             this.label3.AutoSize = true;             this.label3.Location = new System.Drawing.Point(63, 69);             this.label3.Name = "label3";             this.label3.Size = new System.Drawing.Size(29, 12);             this.label3.TabIndex = 9;             this.label3.Text = "词长";             //             // label4             //             this.label4.AutoSize = true;             this.label4.Location = new System.Drawing.Point(107, 69);             this.label4.Name = "label4";             this.label4.Size = new System.Drawing.Size(29, 12);             this.label4.TabIndex = 10;             this.label4.Text = "词性";             //             // label5             //             this.label5.AutoSize = true;             this.label5.Location = new System.Drawing.Point(161, 69);             this.label5.Name = "label5";             this.label5.Size = new System.Drawing.Size(29, 12);             this.label5.TabIndex = 11;             this.label5.Text = "词条";             //             // label6             //             this.label6.AutoSize = true;             this.label6.Location = new System.Drawing.Point(438, 259);             this.label6.Name = "label6";             this.label6.Size = new System.Drawing.Size(29, 12);             this.label6.TabIndex = 14;             this.label6.Text = "词性";             //             // label7             //             this.label7.AutoSize = true;             this.label7.Location = new System.Drawing.Point(438, 216);             this.label7.Name = "label7";             this.label7.Size = new System.Drawing.Size(29, 12);             this.label7.TabIndex = 13;             this.label7.Text = "词长";             //             // label8             //             this.label8.AutoSize = true;             this.label8.Location = new System.Drawing.Point(438, 172);             this.label8.Name = "label8";             this.label8.Size = new System.Drawing.Size(29, 12);             this.label8.TabIndex = 12;             this.label8.Text = "频率";             //             // textBox_PL             //             this.textBox_PL.Location = new System.Drawing.Point(461, 187);             this.textBox_PL.Name = "textBox_PL";             this.textBox_PL.Size = new System.Drawing.Size(97, 21);             this.textBox_PL.TabIndex = 15;             this.textBox_PL.Text = "2";             //             // textBox_CC             //             this.textBox_CC.Location = new System.Drawing.Point(461, 233);             this.textBox_CC.Name = "textBox_CC";             this.textBox_CC.ReadOnly = true;             this.textBox_CC.Size = new System.Drawing.Size(96, 21);             this.textBox_CC.TabIndex = 16;             //             // textBox_CX             //             this.textBox_CX.Location = new System.Drawing.Point(461, 279);             this.textBox_CX.Name = "textBox_CX";             this.textBox_CX.Size = new System.Drawing.Size(95, 21);             this.textBox_CX.TabIndex = 17;             this.textBox_CX.Text = "3";             //             // openFileDialog1             //             this.openFileDialog1.FileName = "openFileDialog1";             //             // menuStrip1             //             this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {             this.fileToolStripMenuItem,             this.helpToolStripMenuItem});             this.menuStrip1.Location = new System.Drawing.Point(0, 0);             this.menuStrip1.Name = "menuStrip1";             this.menuStrip1.Size = new System.Drawing.Size(577, 24);             this.menuStrip1.TabIndex = 18;             this.menuStrip1.Text = "menuStrip1";             //             // fileToolStripMenuItem             //             this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {             this.openToolStripMenuItem,             this.saveToolStripMenuItem,             this.exitToolStripMenuItem});             this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";             this.fileToolStripMenuItem.Size = new System.Drawing.Size(41, 20);             this.fileToolStripMenuItem.Text = "File";             //             // openToolStripMenuItem             //             this.openToolStripMenuItem.Name = "openToolStripMenuItem";             this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22);             this.openToolStripMenuItem.Text = "Open";             this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);             //             // saveToolStripMenuItem             //             this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";             this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);             this.saveToolStripMenuItem.Text = "Save";             this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);             //             // helpToolStripMenuItem             //             this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {             this.aboutToolStripMenuItem,             this.helpToolStripMenuItem1});             this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";             this.helpToolStripMenuItem.Size = new System.Drawing.Size(41, 20);             this.helpToolStripMenuItem.Text = "Help";             //             // aboutToolStripMenuItem             //             this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";             this.aboutToolStripMenuItem.Size = new System.Drawing.Size(100, 22);             this.aboutToolStripMenuItem.Text = "About";             //             // helpToolStripMenuItem1             //             this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";             this.helpToolStripMenuItem1.Size = new System.Drawing.Size(100, 22);             this.helpToolStripMenuItem1.Text = "Help";             //             // textBox1             //             this.textBox1.Location = new System.Drawing.Point(195, 37);             this.textBox1.Name = "textBox1";             this.textBox1.ReadOnly = true;             this.textBox1.Size = new System.Drawing.Size(289, 21);             this.textBox1.TabIndex = 19;             //             // statusStrip1             //             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {             this.toolStripStatusLabel1});             this.statusStrip1.Location = new System.Drawing.Point(0, 350);             this.statusStrip1.Name = "statusStrip1";             this.statusStrip1.Size = new System.Drawing.Size(577, 22);             this.statusStrip1.SizingGrip = false;             this.statusStrip1.TabIndex = 20;             this.statusStrip1.Text = "statusStrip1";             //             // toolStripStatusLabel1             //             this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";             this.toolStripStatusLabel1.Size = new System.Drawing.Size(41, 17);             this.toolStripStatusLabel1.Text = "Status";             //             // exitToolStripMenuItem             //             this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";             this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);             this.exitToolStripMenuItem.Text = "Exit";             this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);             //             // FormWordEdit             //             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;             this.ClientSize = new System.Drawing.Size(577, 372);             this.Controls.Add(this.statusStrip1);             this.Controls.Add(this.textBox1);             this.Controls.Add(this.textBox_CX);             this.Controls.Add(this.textBox_CC);             this.Controls.Add(this.textBox_PL);             this.Controls.Add(this.label6);             this.Controls.Add(this.label7);             this.Controls.Add(this.label8);             this.Controls.Add(this.label5);             this.Controls.Add(this.label4);             this.Controls.Add(this.label3);             this.Controls.Add(this.label2);             this.Controls.Add(this.button3);             this.Controls.Add(this.button2);             this.Controls.Add(this.textBox_word);             this.Controls.Add(this.label1);             this.Controls.Add(this.comboBox1);             this.Controls.Add(this.listBox1);             this.Controls.Add(this.menuStrip1);             this.MainMenuStrip = this.menuStrip1;             this.MaximizeBox = false;             this.Name = "FormWordEdit";             this.Text = "词库编辑";             this.Load += new System.EventHandler(this.FormWordEdit_Load);             this.menuStrip1.ResumeLayout(false);             this.menuStrip1.PerformLayout();             this.statusStrip1.ResumeLayout(false);             this.statusStrip1.PerformLayout();             this.ResumeLayout(false);             this.PerformLayout();         }         #endregion         private System.Windows.Forms.ListBox listBox1;         private System.Windows.Forms.ComboBox comboBox1;         private System.Windows.Forms.Label label1;         private System.Windows.Forms.TextBox textBox_word;         private System.Windows.Forms.Button button2;         private System.Windows.Forms.Button button3;         private System.Windows.Forms.Label label2;         private System.Windows.Forms.Label label3;         private System.Windows.Forms.Label label4;         private System.Windows.Forms.Label label5;         private System.Windows.Forms.Label label6;         private System.Windows.Forms.Label label7;         private System.Windows.Forms.Label label8;         private System.Windows.Forms.TextBox textBox_PL;         private System.Windows.Forms.TextBox textBox_CC;         private System.Windows.Forms.TextBox textBox_CX;         private System.Windows.Forms.OpenFileDialog openFileDialog1;         private System.Windows.Forms.MenuStrip menuStrip1;         private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;         private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;         private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;         private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;         private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;         private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem1;         private System.Windows.Forms.TextBox textBox1;         private System.Windows.Forms.StatusStrip statusStrip1;         private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;         private System.Windows.Forms.SaveFileDialog saveFileDialog1;         private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;     } }  

    最新回复(0)