Posts

Showing posts from August, 2015

Update Windows Form UI thread from another class c#

delegate void UpdateLabelDelegate(string LabelText); public partial class Form1 : Form {         private Class1 _class;         UpdateLabelDelegate ULD;         Dispatcher uiDispatcher;             public void UpdateLabel(string LabelText)         {             lbl_ClientCount.Text = LabelText;                   }         public void UpdateThread(string LabelText)         {             uiDispatcher.Invoke(ULD, new object[] { LabelText });         }                         public Form1()         {             InitializeComponent();             _clas...