예제 #1
0
        private void WarcraftProfileReceived(object sender, WarcraftProfileEventArgs e)
        {
            ThreadStart ts = delegate
            {
                WarcraftProfileDisplayDocument doc = new WarcraftProfileDisplayDocument(e);
                doc.ShowDialog(this);
            };

            if (InvokeRequired)
            {
                BeginInvoke(ts);
            }
            else
            {
                ts();
            }
        }
예제 #2
0
 private void WarcraftProfileReceived(object sender, WarcraftProfileEventArgs e)
 {
     ThreadStart ts = delegate
     {
         WarcraftProfileDisplayDocument doc = new WarcraftProfileDisplayDocument(e);
         doc.ShowDialog(this);
     };
     if (InvokeRequired)
         BeginInvoke(ts);
     else
         ts();
 }