public wb() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; // Start The Policy Server PolicySocketServer StartPolicyServer = new PolicySocketServer(); Thread th = new Thread(new ThreadStart(StartPolicyServer.StartSocketServer)); th.IsBackground = true; th.Start(); //initialize other servers ts = new TextServer(this); ds = new ImageServer(4531, this); ads = new AudioServer(this); //attach methods to delegates multicast_msg_2room = new msg2room(msg_to_room); sendroomlistdelobj = new sendroomunamelistdelage(sendclientlist); setstreamimgob = new setstreamimg(setimage); Status_lb.Items.Add("Ready..."); //initialize database try { var result = from p in db.ServerSettings select p; if (result.Count() == 0) { Status_lb.Items.Add("Initializing Server Settings in Database."); ServerSetting ss = new ServerSetting(); ss.TextServerIP = "0.0.0.0"; ss.TextServerPort = 4530; ss.AudioServerIP = "0.0.0.0"; ss.ImageServerPort = 4531; ss.ImageServerIP = "0.0.0.0"; ss.AudioServerPort = 4532; ss.TextServerOnline = false; ss.ImageServerOnline = false; ss.AudioServerOnline = false; ss.AutoConfig = true; db.ServerSettings.InsertOnSubmit(ss); db.SubmitChanges(); } } catch (Exception) { } }
partial void UpdateServerSetting(ServerSetting instance);
partial void DeleteServerSetting(ServerSetting instance);
partial void InsertServerSetting(ServerSetting instance);