Ejemplo n.º 1
0
 public AccountViewModel()
 {
     UserName = "******";
     UserMailAddress = "*****@*****.**";
     UserIconUrl = SampleData.DataLoader.LoadImage("accountIcon00.png").Result;
     Stream = new StreamManagerViewModel();
 }
Ejemplo n.º 2
0
        public AccountViewModel(Account model, MainViewModel managerVM)
        {
            _accountModel = model;
            _userName = _accountModel.Builder.Name;
            _userMailAddress = _accountModel.Builder.Email;
            _manager = managerVM;
            _stream = new StreamManagerViewModel(_accountModel);
            _notification = new NotificationManagerViewModel(_accountModel.Notification);
            OpenAccountListCommand = new ViewModelCommand(OpenAccountListCommand_Execute);
            ActivateCommand = new ViewModelCommand(ActivateCommand_Execute);
            CompositeDisposable.Add(_thisPropChangedEventListener = new PropertyChangedEventListener(this));

            _thisPropChangedEventListener.Add(() => IsActive, IsActive_PropertyChanged);
            DataCacheDictionary
                .DownloadImage(new Uri(_accountModel.Builder.IconUrl.Replace("$SIZE_SEGMENT", "s38-c-k")))
                .ContinueWith(tsk => UserIconUrl = tsk.Result);
        }