Exemple #1
0
 private void printInput_Click(object sender, EventArgs e)
 {
     /*if (this.mEffectResource == null)
      * {
      *  MessageBox.Show("Please open an effect file to print a list of effects it contains.");
      *  return;
      * }/**/
     if (this.mEffectResources != null && this.mEffectResources.Length > 0)
     {
         using (SaveFileDialog dialog = new SaveFileDialog())
         {
             dialog.Title           = "Print Input Effect Names";
             dialog.Filter          = "Text File|*.txt";
             dialog.AddExtension    = true;
             dialog.OverwritePrompt = true;
             DialogResult result = dialog.ShowDialog();
             if (result == DialogResult.OK)
             {
                 using (FileStream fileStream = new FileStream(dialog.FileName, FileMode.Create))
                 {
                     using (StreamWriter writer = new StreamWriter(fileStream, Encoding.ASCII))
                     {
                         for (int i = 0; i < this.mEffectResources.Length; i++)
                         {
                             EffectHelper.WriteEffectNameList(this.mEffectResources[i], writer);
                         }
                     }
                 }
             }
         }
     }
 }