Ejemplo n.º 1
0
 public HomeViewModel(IStorageService storageService, IMvxMessenger messenger, IPopupHelper helper, IMessageService messageService)
     : base(messenger, helper)
 {
     _storageService = storageService;
     _messageService = messageService;
     SelectContactCommand = new MvxCommand<ContactListItem>(SelectContactCommandAction);
 }
Ejemplo n.º 2
0
 public AddContactViewModel(IQrService qrService, IMessageService messageService, IMvxMessenger messenger, IPopupHelper helper)
     : base(messenger, helper)
 {
     _qrService = qrService;
     _messageService = messageService;
     CodeDetectedCommand = new MvxCommand<string>(CodeDetectedCommandAction);
     AddContactCommand = new MvxCommand(AddContactCommandAction, AddContactCanExecute);
 }
Ejemplo n.º 3
0
        public SettingsViewModel(IUserService userService, IStorageService storageService, IQrService qrService,
                                 IMvxMessenger messenger, IPopupHelper helper) : base(messenger, helper)
        {
            _userService    = userService;
            _storageService = storageService;
            _qrService      = qrService;

            GenerateCodeCommand = new MvxCommand(GenerateCodeAction, () => !string.IsNullOrWhiteSpace(ContactName));
            ClearCommand        = new MvxCommand(ClearCommandAction);
        }
Ejemplo n.º 4
0
		public SettingsViewModel(IUserService userService, IStorageService storageService, IQrService qrService,
			 IMvxMessenger messenger, IPopupHelper helper) : base(messenger, helper)
		{
			_userService = userService;
			_storageService = storageService;
			_qrService = qrService;

			GenerateCodeCommand = new MvxCommand(GenerateCodeAction, () => !string.IsNullOrWhiteSpace(ContactName));
			ClearCommand = new MvxCommand(ClearCommandAction);
		}
Ejemplo n.º 5
0
		public LoginViewModel(IStorageService storageService, IUserService userService, IPhoneService phoneService, 
			IMessageService messageService, IEncryptionService encryptionService, IMvxMessenger messenger, IPopupHelper helper) : base(messenger, helper)
		{
			_storageService = storageService;
			_userService = userService;
			_phoneService = phoneService;
			_messageService = messageService;
		    _encryptionService = encryptionService;

		    ProceedCommand = new MvxCommand(ProceedCommandAction, ValidatePassword);
		}
Ejemplo n.º 6
0
 protected QryptoViewModel(IMvxMessenger messenger, IPopupHelper helper)
 {
     _helper     = helper;
     _messenger  = messenger;
     _token      = _messenger.Subscribe <RequestFailedMessage>(OnRequestFailed, MvxReference.Strong);
     CleaningUp += () =>
     {
         if (_token == null)
         {
             return;
         }
         _token.Dispose();
         _token = null;
     };
 }
		public ConversationViewModel(IStorageService storageService, IMessageService messageService, IMvxMessenger messenger, IPopupHelper helper) : base(messenger, helper)
		{
			_storageService = storageService;
			_messageService = messageService;

			_token = _messenger.Subscribe<ContentReceivedMessage>(OnNotificationReceived, MvxReference.Strong);
			SendMessageCommand = new MvxCommand(SendMessageCommandAction, () => !string.IsNullOrWhiteSpace(MessageBody));

			CleaningUp += () =>
			{
				if (_token == null)
					return;
				_token.Dispose();
				_token = null;
			};
		}
        public ConversationViewModel(IStorageService storageService, IMessageService messageService, IMvxMessenger messenger, IPopupHelper helper) : base(messenger, helper)
        {
            _storageService = storageService;
            _messageService = messageService;

            _token             = _messenger.Subscribe <ContentReceivedMessage>(OnNotificationReceived, MvxReference.Strong);
            SendMessageCommand = new MvxCommand(SendMessageCommandAction, () => !string.IsNullOrWhiteSpace(MessageBody));

            CleaningUp += () =>
            {
                if (_token == null)
                {
                    return;
                }
                _token.Dispose();
                _token = null;
            };
        }
Ejemplo n.º 9
0
 public HomeViewModel(IStorageService storageService, IMvxMessenger messenger, IPopupHelper helper, IMessageService messageService) : base(messenger, helper)
 {
     _storageService      = storageService;
     _messageService      = messageService;
     SelectContactCommand = new MvxCommand <ContactListItem>(SelectContactCommandAction);
 }
Ejemplo n.º 10
0
 public AddContactViewModel(IQrService qrService, IMessageService messageService, IMvxMessenger messenger, IPopupHelper helper) : base(messenger, helper)
 {
     _qrService          = qrService;
     _messageService     = messageService;
     CodeDetectedCommand = new MvxCommand <string>(CodeDetectedCommandAction);
     AddContactCommand   = new MvxCommand(AddContactCommandAction, AddContactCanExecute);
 }
Ejemplo n.º 11
0
        public LoginViewModel(IStorageService storageService, IUserService userService, IPhoneService phoneService,
                              IMessageService messageService, IEncryptionService encryptionService, IMvxMessenger messenger, IPopupHelper helper) : base(messenger, helper)
        {
            _storageService    = storageService;
            _userService       = userService;
            _phoneService      = phoneService;
            _messageService    = messageService;
            _encryptionService = encryptionService;

            ProceedCommand = new MvxCommand(ProceedCommandAction, ValidatePassword);
        }