title: DialogResult that doesn't close the form?
body: <p>I have a form <code>Form1</code> from which I display <code>Form2</code> as a modal form. From <code>Form2</code> I do all sort of editing and deleting of different set of values which should be reflected in <code>Form1</code> after closing <code>Form2</code>. So what I do is <code>RePopulateControls_in_Form1()</code> after closing <code>Form2</code>. Since <code>RePopulateControls_in_Form1()</code>is a long process, I want to execute that method only if some modification (edit,add, delete) happens in <code>Form2</code> and not when <code>Form2</code> is just opened and closed. </p>
  
  <p>So this is what I try to do in <code>Form1</code>:</p>
  
  <pre><code>        Form2 f = new Form2();
          if (f.ShowDialog(this) == DialogResult.Something)
              RePopulateControls_in_Form1()
  </code></pre>
  
  <p>And then in Form2 I do,</p>
  
  <pre><code>    private void bntEdit()
      {
          //If Edit?
          this.DialogResult = DialogResult.Something;
      }
      private void bntAdd()
      {
          //If Add?
          this.DialogResult = DialogResult.Something;
      }
      private void bntDelete()
      {
          //If Delete?
          this.DialogResult = DialogResult.Something;
      }
  </code></pre>
  
  <p>But my problem is <code>.Something</code>. If it is anything other than <code>.None</code>, <code>Form2</code> simply gets closed. I do not want <code>Form2</code> to get simply closed by its own unless the user closes it. </p>
  
  <p>If I do this:</p>
  
  <pre><code>    //in Form1
      private void Form1_Click()
      {
          Form2 f = new Form2();
          if (f.ShowDialog(this) == DialogResult.None)
              RePopulateControls_in_Form1()
      }
  
      //in Form2
      private void Form2_SomeModification()
      {
          //If Modified?
          this.DialogResult = DialogResult.None;
      }
  </code></pre>
  
  <p><code>RePopulateControls_in_Form1()</code> is not hit! </p>
  
  <p>In short, in my program how can I tell the compiler to call <code>RePopulateControls_in_Form1()</code> only if values are modified in <code>Form2</code>?</p>
  
  <p>Note: Repopulating is certainly required since the controls are dynamically created and a bit complex (actually what is created in <code>Form2</code> is GUI controls and its labels etc).</p>