Beispiel #1
0
        /// <summary>
        /// 刷畫面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Timer_Repaint_Tick(object sender, EventArgs e)
        {
            DateTime nowTime = DateTime.Now;

            if (nowTime.Hour == RESET_CALCUATION_TIME && processDay != nowTime.Day)
            {
                fProxyServer.ResetCalculation();
                fForwardModule.ResetCalculation();

                processDay = nowTime.Day;
            }

            if (tabControl1.SelectedTab == tabPage_Statu)
            {
                Label_ClientCount.Text            = fProxyServer.GetAvailableClinetCount().ToString();
                label_MaxSendMs.Text              = fProxyServer.GetMaxSendMs().ToString();
                label_MaxSendTimeStamp.Text       = fProxyServer.GetMaxSendMsTimeStamp();
                label_AvgSendMs.Text              = fProxyServer.GetAvgSendMs().ToString();
                label_LastSendTime.Text           = fProxyServer.GetLastSendMs().ToString();
                label_SendCount.Text              = fProxyServer.GetSendCount().ToString();
                label_TotalMissCallbackCount.Text = fProxyServer.TotalMissCallbackCount.ToString();


                Label_ForwardingCount.Text = fForwardModule.GetForwardingCount().ToString();
                Label_HeartCountDown.Text  = fHeartbeat.GetHeartbeatRemainingSec().ToString("0");
            }
            else if (tabControl1.SelectedTab == tabPage2)
            {
                fBindingSource.ResetBindings(true);
                DataGridView_Clients.AutoResizeColumns();
            }
        }