コード例 #1
0
        public RoteiroViewModel(RoteiroService roteiroService, Roteiro roteiro)
        {
            _roteiroService = roteiroService;
            _roteiro        = roteiro;

            ShowRoteiroItemCommand = new Command <RoteiroItem>(ExecuteShowRoteiroItemCommand);

            RoteiroItens = new ObservableCollection <RoteiroItem>();
            LoadRoteiros();
        }
コード例 #2
0
        public MainViewModel(IRoteiroService roteiroService
                             , NotificationService notificationService)
        {
            _roteiroService      = roteiroService as RoteiroService;
            _notificationService = notificationService;

            Roteiros = new ObservableCollection <Models.Roteiro>();

            AboutCommand = new Command(ExecuteAboutCommand);

            ShowRoteiroCommand = new Command <Roteiro>(ExecuteShowRoteiroCommand);

            RegisterNotification();

            LoadRoteiros();
        }