コード例 #1
0
        private void frmServer_Load(object sender, EventArgs e)
        {
            ValidBrowser = BrowserVersion();
            CommunicationsDisplay.Navigate("about:blank");

            OnCommunications($"Loading... {GeneralFunction.GetDateTimeFormatted}", INK.CLR_BLUE);
            /**********************************************/

            /**********************************************/
            //Create a directory we can write stuff too
            CheckOnApplicationDirectory();
            /**********************************************/

            /**********************************************/
            //Start listening for TCPIP client connections
            StartPacketCommunicationsServiceThread();
            /**********************************************/

            /********************************************************/
            // Create some timers for maintenence
            timerPing          = new System.Timers.Timer();
            timerPing.Interval = 240000;// 4 minute ping timer
            timerPing.Enabled  = true;
            timerPing.Elapsed += timerPing_Elapsed;

            timerGarbagePatrol          = new System.Timers.Timer();
            timerGarbagePatrol.Interval = 600000; // 5 minute connection integrity patrol
            timerGarbagePatrol.Enabled  = true;
            timerGarbagePatrol.Elapsed += timerGarbagePatrol_Elapsed;
            /********************************************************/

            // enumerate my IP's
            SetHostNameAndAddress();
        }
コード例 #2
0
 private void ClearEventAndStatusDisplays()
 {
     // Clear communications
     displayReady = false;
     CommunicationsDisplay.Navigate("about:blank");
     while (!displayReady)
     {
         Application.DoEvents();
     }
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: hanriel/SNet
        private void Form1_Load(object sender, EventArgs e)
        {
            /**********************************************/
            // Init the communications window so we can whats going on
            _validBrowser = BrowserVersion();
            // Setup data monitor
            CommunicationsDisplay.Navigate("about:blank");

            OnCommunications($"Loading... {GeneralFunctions.GetDateTimeFormatted}", Ink.ClrBlue);
            /**********************************************/

            /**********************************************/
            //Create a directory we can write stuff too
            CheckOnApplicationDirectory();
            /**********************************************/

            /**********************************************/
            //Start listening for TCP-IP client connections
            StartPacketCommunicationsServiceThread();
            /**********************************************/

            /********************************************************/
            // Create some timers for maintenance
            // 4 minute ping timer
            _timerPing = new System.Timers.Timer {
                Interval = 240000, Enabled = true
            };
            _timerPing.Elapsed += timerPing_Elapsed;

            // 5 minute connection integrity patrol
            _timerGarbagePatrol = new System.Timers.Timer {
                Interval = 600000, Enabled = true
            };
            _timerGarbagePatrol.Elapsed += timerGarbagePatrol_Elapsed;
            /********************************************************/

            // enumerate my IPs
            SetHostNameAndAddress();
        }