title: Multiple filters OpenFileDialog
body: <p>At the moment I have three buttons on a form, each opens a different form (form2 with a textbox to display the text from the textfile, form3 with a picturebox to display the image)</p>
  
  <p>What I am trying to do is put the two together for my last button so  the user can filter which type to open (TXT Files or Image files).  I am not sure how I can put the two together and get them to work.</p>
  
  <p>The code I used to just open text files:</p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
          {
              OpenFileDialog ofd = new OpenFileDialog();
              ofd.InitialDirectory = @"C:\";
              ofd.Filter = "TXT Files(*.txt;)|*.txt;";
              if(ofd.ShowDialog() == DialogResult.OK)
              {
                  using(StreamReader rdText = new StreamReader(ofd.FileName))
                  {
                      string info = File.ReadAllText(ofd.FileName);
                      TextDocumentForm newTextDocument = new TextDocumentForm();
                      newTextDocument.TextFileName = info;
                      newTextDocument.Show();                 
                  }
              }
          }
  </code></pre>
  
  <p>What I use to open my image files </p>
  
  <pre><code> private void button2_Click(object sender, EventArgs e)
          {          
                  OpenFileDialog ofdi = new OpenFileDialog();
                  ofdi.InitialDirectory = @"C:\";
                  ofdi.Filter = "Image Files(*.jpg;*.jpeg;*.bmp)|*.jpg;*.jpeg;.bmp;";
                  if (ofdi.ShowDialog() == DialogResult.OK)
                  {
                      Image image = Image.FromFile(ofdi.FileName);
                      ImgDoc newImageDoc = new ImgDocumentForm();
                      newImageDoc.ImageShow = image;
                      newImageDoc.Show();
                  }            
          }
  
  </code></pre>
  
  <p>Any help is appreciated as I am trying to develop my understanding of how OpenFileDialog still works.</p>