public UserTimerViewModel()
        {
            ElapsedTime = "00:00:00";

            App.ActiveCall.FetchActiveCallRequestAsync();
            App.ActiveCall.PropertyChanged += ActiveCall_PropertyChanged;

            _ellipsisCount          = 0;
            _ellipsisAnimationAlive = true;

            _callStatusService           = new AcceptedCallStatusService();
            _callStatusService.Started  += OnStarted;
            _callStatusService.Paused   += OnPaused;
            _callStatusService.Unpaused += OnUnpaused;
            _callStatusService.Stopped  += OnFinished;
            _callStatusService.Canceled += OnCanceled;

            _timer = new MyTimer(TimeSpan.FromSeconds(1), () => ElapsedTime = _timer.GetTimePassed());

            var isRecentlyCrashedCall = App.ActiveCall.ActiveCallRequest.CallInfo.DurationInfo != null;

            if (isRecentlyCrashedCall)
            {
                RestorePage();
            }

            AnimateEllipsis();
        }
예제 #2
0
        private void UpdateTimerLabel()
        {
            if (timer == null)
            {
                return;
            }

            Lbl_Time.Text = timer.GetTimePassed();
        }