title: Winform object has event subscriptions deleted when modifying layout
body: <p>So I added a BackGroundWorker object to my <code>FormMain.cs</code> and created two methods to handle the events <code>ProgressChanged</code> and <code>RunWorkerCompleted</code>. I found that I had to go into <code>ForMain.Designer.cs</code> to manually wire up the methods to the events ..</p>
  
  <pre><code>this.bgWorker.WorkerReportsProgress = true;
  this.bgWorker.WorkerSupportsCancellation = true;
  this.bgWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgWorker_DoWork);
  this.bgWorker.ProgressChanged += bgWorker_ProgressChanged;
  this.bgWorker.RunWorkerCompleted += bgWorker_RunWorkerCompleted;
  </code></pre>
  
  <p>The confusing thing is if I alter any of the controls at all on the <code>FormMain.Designer.cs</code> then the two event <strong>wire-ups</strong> I created are deleted and I have to manually add them back. This includes moving controls around on the designer. Any idea why this would happen?</p>
  
  <p>These have to be added back manually</p>
  
  <pre><code>this.bgWorker.ProgressChanged += bgWorker_ProgressChanged;
  this.bgWorker.RunWorkerCompleted += bgWorker_RunWorkerCompleted;
  </code></pre>