private void FormOnLoad(object sender, EventArgs e) { if (IsRunAsAdmin()) { } this.InitMenuStatus(); this.tabPageMain.Controls.Add(this.CreateListBox("Scada.Main")); this.tabPageMainVision.Controls.Add(this.CreateListBox("Scada.MainVision")); this.dataUploadPage.Controls.Add(this.CreateListBox("Scada.Data.Client")); this.tabPage1.Controls.Add(this.CreateListBox("Scada.HPIC")); this.tabPage2.Controls.Add(this.CreateListBox("Scada.NaIDevice")); this.tabPage3.Controls.Add(this.CreateListBox("Scada.Weather")); this.tabPage4.Controls.Add(this.CreateListBox("Scada.MDS")); this.tabPage5.Controls.Add(this.CreateListBox("Scada.AIS")); this.tabPage6.Controls.Add(this.CreateListBox("Scada.Shelter")); this.tabPage7.Controls.Add(this.CreateListBox("Scada.DWD")); LoggerServer server = new LoggerServer(); SynchronizationContext sc = SynchronizationContext.Current; server.Start((content) => { sc.Post(new SendOrPostCallback(this.OnReceiveMessage), content); }); }