コード例 #1
0
ファイル: MainForm.cs プロジェクト: YANGDEWANG/wordmake
        private void 批量生成ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BatchMake bm = new BatchMake(this);

            bm.ShowDialog(this);

            /*openFileDialog.Title = "打开文本文件";
             * openFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*";
             * if (openFileDialog.ShowDialog(this) == DialogResult.OK)
             * {
             *  saveFileDialog.Title = "保存输出文件";
             *  saveFileDialog.Filter = "文本文件(*.txt)|*.txt";
             *  if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
             *  {
             *      StreamReader sr = new StreamReader(openFileDialog.FileName);
             *      StreamWriter sw = new StreamWriter(saveFileDialog.FileName,false,Encoding.UTF8);
             *      this.ConversionStringStream(sr, sw);
             *      sr.Dispose();
             *      sw.Dispose();
             *  }
             * }*/
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: h87kg/wordmake
 private void 批量生成ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     BatchMake bm = new BatchMake(this);
     bm.ShowDialog(this);
     /*openFileDialog.Title = "打开文本文件";
     openFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*";
     if (openFileDialog.ShowDialog(this) == DialogResult.OK)
     {
         saveFileDialog.Title = "保存输出文件";
         saveFileDialog.Filter = "文本文件(*.txt)|*.txt";
         if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
         {
             StreamReader sr = new StreamReader(openFileDialog.FileName);
             StreamWriter sw = new StreamWriter(saveFileDialog.FileName,false,Encoding.UTF8);
             this.ConversionStringStream(sr, sw);
             sr.Dispose();
             sw.Dispose();
         }
     }*/
 }