Exemplo n.º 1
0
 public ViewModel()
 {
     Status = StatusView.NotInMeeting;
     ChangeStatusManuallyCommand = new RelayCommand <StatusView>(statusView =>
     {
         SetStatus(statusView, true);
     });
 }
Exemplo n.º 2
0
        private void SetStatus(StatusView statusView, bool manually)
        {
            PropertyChangedEventHandler onPropertyChanged = (sender, args) =>
            {
                if (args.PropertyName == "Status")
                {
                    FireStatusChangedManually(manually);
                }
            };

            try
            {
                PropertyChanged += onPropertyChanged;
                Status           = statusView;
            }
            finally
            {
                PropertyChanged -= onPropertyChanged;
            }
        }
Exemplo n.º 3
0
 public void ChangeStatusAutomatically(Status status)
 {
     SetStatus(StatusView.Of(status), false);
 }