public ProgressInfo(LoadingViewModel busyViewModel, string message, bool isBlocking = true)
            {
                Contract.ArgumentNotNull("busyViewModel", busyViewModel);
                Contract.ArgumentNotNull("message", message);

                StartTime = DateTime.Now;

                ViewModel  = busyViewModel;
                Message    = message;
                IsBlocking = isBlocking;

                busyViewModel.Add(this);
            }
Ejemplo n.º 2
0
        protected override void OnBindingContextChanged(ViewModel oldViewModel, ViewModel newViewModel)
        {
            Contract.PropertyNotNull("message", message);
            Contract.PropertyNotNull("cancelButton", cancelButton);

            base.OnBindingContextChanged(oldViewModel, newViewModel);
            LoadingViewModel previousViewModel = oldViewModel as LoadingViewModel;

            if (previousViewModel != null)
            {
                previousViewModel.ProgressUpdated -= UpdateControls;
            }

            if (ViewModel != null)
            {
                ViewModel.ProgressUpdated += UpdateControls;
            }

            UpdateControls();
        }
Ejemplo n.º 3
0
			public ProgressInfo(LoadingViewModel busyViewModel, string message, bool isBlocking = true)
			{
				Contract.ArgumentNotNull("busyViewModel",busyViewModel);
				Contract.ArgumentNotNull("message", message );
				
				StartTime = DateTime.Now;
				
				ViewModel = busyViewModel;
				Message = message;
				IsBlocking = isBlocking;
				
				busyViewModel.Add(this);
			}