Esempio n. 1
0
 private void gB2312ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     saveFileDialogText();
     if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
     {
         Stream fs = File.Create(saveFileDialog.FileName);
         if (sender == this.toolStripMenuItemGB2312All)
         {
             GB2312.GetAllChars(fs);
         }
         else if (sender == this.一级简码ToolStripMenuItem)
         {
             GB2312.GetStairChars(fs);
         }
         else if (sender == this.二级简码ToolStripMenuItem)
         {
             GB2312.GetSecondaryChars(fs);
         }
         else if (sender == this.ASCII全部ToolStripMenuItem)
         {
             ASCII.GetAllChars(fs);
         }
         fs.Dispose();
     }
 }
Esempio n. 2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            SaveFileDialog sf = new SaveFileDialog();

            if (sf.ShowDialog(this) == DialogResult.OK)
            {
                Stream fs = File.Create(sf.FileName);
                GB2312.GetAllChars(fs);
                fs.Dispose();
            }
        }