コード例 #1
0
        private void connection_ConversationEnded(object sender, ConversationEndedEventArgs e)
        {
            if (!_recordingStats)
            {
                return;
            }

            if (!e.DisconnectInfo.IsReminder)
            {
                _conversationTimer.Stop();

                CurrentConversationTime = TimeSpan.Zero;
                CurrentConversationTimeChanged?.Invoke(this, EventArgs.Empty);
            }
        }
コード例 #2
0
        private void conversationTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            if (!_recordingStats)
            {
                return;
            }

            CurrentConversationTime = CurrentConversationTime.Add(new TimeSpan(0, 0, 0, 1));
            CurrentConversationTimeChanged?.Invoke(this, EventArgs.Empty);

            if (CurrentConversationTime > Statistics.BestConversationTime)
            {
                Statistics.BestConversationTime = CurrentConversationTime;
                BestConversationTimeChanged?.Invoke(this, EventArgs.Empty);
            }
        }