Created
July 15, 2011 13:21
-
-
Save Cameron-D/1084659 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Derp { | |
private System.ComponentModel.BackgroundWorker backgroundWorker; | |
public Derp() { | |
backgroundWorker = new System.ComponentModel.BackgroundWorker(); | |
this.backgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker_DoWork); | |
} | |
public void Herp(string message) { | |
backgroundWorker.RunWorkerAsync(message); | |
} | |
private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { | |
System.Windows.MessageBox.Show((string)e.Argument); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment