Exemple #1
0
 public NewCategoriaViewModel()
 {
     _navigationService = DependencyService.Get <Services.INavigationService>();
     _messageService    = DependencyService.Get <Services.IMessageService>();
     Categoria          = new Categoria();
     SalvarCommand      = new Command(ExecuteSalvar);
 }
 public LoginViewModel()
 {
     this.LoginCommand       = new Command(this.Login);
     this.RegisterCommand    = new Command(this.Register);
     this._messageService    = DependencyService.Get <Services.IMessageService>();
     this._navigationService = DependencyService.Get <Services.INavigationService>();
 }
 public NewDepartamentoViewModel()
 {
     _navigationService = DependencyService.Get <Services.INavigationService>();
     _messageService    = DependencyService.Get <Services.IMessageService>();
     Departamento       = new Departamento();
     SalvarCommand      = new Command(ExecuteSalvar);
 }
 public LoginViewModel()
 {
     this.LoginCommand       = new Command(this.Login);
     this.LimparCommand      = new Command(this.Limpar);
     this.CreditosCommand    = new Command(this.Creditos);
     this._messageService    = DependencyService.Get <Services.IMessageService>();
     this._NavigationService = DependencyService.Get <Services.INavigationService>();
 }
 public MonthEditViewModel(IDbService dbService, Services.INavigationService navigationService, IMonthService monthService, IDialogService dialogService)
 {
     _dbService         = dbService;
     _navigationService = navigationService;
     _monthService      = monthService;
     _dialogService     = dialogService;
     Init(_monthService.SelectedMonth);
     _monthService.OnSelectedMonthChanged += _monthService_OnSelectedMonthChanged;
 }
Exemple #6
0
        public PopupViewModel(Func <bool> metodoParam, string paramMsg)
        {
            msgParam        = paramMsg;
            metodo          = metodoParam;
            ExecutarCommand = new Command(ExecutarAction);
            CancelarCommand = new Command(CancelarAction);

            this.navigationService = DependencyService.Get <Services.INavigationService>();
        }
Exemple #7
0
        public ProjetoViewModel()
        {
            Title              = "Projetos";
            Projetos           = new ObservableRangeCollection <Projeto>();
            LoadProjetoCommand = new Command(async() => await ExecuteLoadProjetoCommand());

            _messageService    = DependencyService.Get <Services.IMessageService>();
            _navigationService = DependencyService.Get <Services.INavigationService>();
        }
Exemple #8
0
        public DepartamentoViewModel()
        {
            Title                    = "Departamentos";
            Departamentos            = new ObservableRangeCollection <IDepartamento>();
            LoadDepartamentosCommand = new Command(async() => await ExecuteLoadDepartamentosCommand());
            AddDepartamentoCommand   = new Command(ExecuteAddDepartamento);

            _messageService    = DependencyService.Get <Services.IMessageService>();
            _navigationService = DependencyService.Get <Services.INavigationService>();
        }
        public CatsViewModel()
        {
            Cats = new ObservableRangeCollection <Cat>();

            GetCatsCommand = new Command(async() => await GetCats(), () => !IsBusy);

            navigationService = DependencyService.Get <Services.INavigationService>();

            messageService = DependencyService.Get <Services.IMessageService>();
        }
        public LoginViewModel()
        {
            _azureService      = DependencyService.Get <AzureService>();
            _messageService    = DependencyService.Get <Services.IMessageService>();
            _navigationService = DependencyService.Get <Services.INavigationService>();

            LoginCommand         = new Command(ExecuteLogarAsync);
            LoginFacebookCommand = new Command(ExecuteLoginCommandAsync);
            RegisterCommand      = new Command(NavegarToRegister);
        }
Exemple #11
0
        public CategoriaDetailViewModel(Categoria categoria = null)
        {
            _navigationService = DependencyService.Get <Services.INavigationService>();
            _messageService    = DependencyService.Get <Services.IMessageService>();
            Categoria          = new Categoria();
            SalvarCommand      = new Command(ExecuteSalvar);

            Title     = categoria.Nome;
            Categoria = categoria;
        }
        public DepartamentoDetailViewModel(Departamento departamento = null)
        {
            _navigationService = DependencyService.Get <Services.INavigationService>();
            _messageService    = DependencyService.Get <Services.IMessageService>();
            Departamento       = new Departamento();
            SalvarCommand      = new Command(ExecuteSalvar);

            Title        = departamento.Nome;
            Departamento = departamento;
        }
Exemple #13
0
        public PopupCadastroViewModel(Tarefa tarefa = null)
        {
            Tarefa tarefaParam = new Tarefa();

            this.tarefa = tarefa;

            EditorAdd(this.tarefa);
            CancelarCommand = new Command(CancelarAction);
            SalvarCommand   = new Command(SalvarAction);

            this.messageService    = DependencyService.Get <Services.IMessageService>();
            this.navigationService = DependencyService.Get <Services.INavigationService>();
        }
Exemple #14
0
 public DetailViewModel(Tarefa tarefa = null)
 {
     tarefa                 = new Tarefa();
     connection             = new LocalDB();
     Tarefas                = new ObservableCollection <Tarefa>(connection.GetT());
     FrameCommand           = new Command(FrameAction);
     AdicionarCommand       = new Command(AdicionarAction);
     EditarCommand          = new Command(EditarAction);
     ExcluirCommand         = new Command(ExcluirAction);
     RealizeCommand         = new Command(RealizeAction);
     this.messageService    = DependencyService.Get <Services.IMessageService>();
     this.navigationService = DependencyService.Get <Services.INavigationService>();
 }
Exemple #15
0
        public MasterViewModel()
        {
            _navigationService = DependencyService.Get <Services.INavigationService>();
            _messageService    = DependencyService.Get <Services.IMessageService>();

            ClienteCommand      = new Command(Cliente);
            ItemCommand         = new Command(Item);
            CategoriaCommand    = new Command(Categoria);
            ProjetoCommand      = new Command(Projeto);
            FuncionarioCommand  = new Command(Funcionario);
            DepartamentoCommand = new Command(Departamento);
            SobreCommand        = new Command(Sobre);
            SairCommand         = new Command(ExecuteSairCommand);
        }
Exemple #16
0
        public GerenciadorViewModel()
        {
            this.GerenciadorCommand         = new Command(this.Gerenciador);
            this.EstiloPadraoCommand        = new Command(this.EstiloPadrao);
            this.EstiloDinamicoCommand      = new Command(this.EstiloDinamico);
            this.EstiloEventTriggresCommand = new Command(this.EstiloEventTriggres);
            this.EstiloGlobalCommand        = new Command(this.EstiloGlobal);
            this.ClasseComplexaCommand      = new Command(this.ClasseComplexa);
            this.ProdutoCommand             = new Command(this.Produto);
            this.HomeCommand    = new Command(this.Home);
            this.DataCommand    = new Command(this.Data);
            this.SimplesCommand = new Command(this.Simples);

            this._navigationService = DependencyService.Get <Services.INavigationService>();
        }
        public MainPageViewModel(IBandService bandService, IEventAggregator events, Services.INavigationService naviagtionService,
                                 IComponentContext container)
        {
            _container         = container;
            _navigation        = naviagtionService;
            _bandService       = bandService;
            _events            = events;
            _enumerateBandsCmd = new Lazy <ICommand>(() =>
            {
                return(new AsyncDelegateCommand <object>(EnumerateBands, CanEnumerateBands));
            });

            EnumerateBandsCmd.Execute(null);

            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                // designtime data
                Value = "Designtime value";
                return;
            }
        }
        public MainPageViewModel(IBandService bandService, IEventAggregator events, Services.INavigationService naviagtionService,
            IComponentContext container)
        {
            _container = container;
            _navigation = naviagtionService;
            _bandService = bandService;
            _events = events;
            _enumerateBandsCmd = new Lazy<ICommand>(() =>
            {
                return new AsyncDelegateCommand<object>(EnumerateBands, CanEnumerateBands);
            });

            EnumerateBandsCmd.Execute(null);

            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                // designtime data
                Value = "Designtime value";
                return;
            }
        }
Exemple #19
0
 public void Initialize(Services.INavigationService navigationService)
 {
     SimpleIoc.Default.Register <Services.INavigationService>(() => navigationService);
 }
 public CardDetailViewModel(IDataService dataService, IDialogService dialogService, Services.INavigationService navigationService) : base(dialogService, navigationService)
 {
     this.DataService = dataService ?? throw new ArgumentNullException(nameof(dataService));
 }
        public MonkeysViewModel()
        {
            #region Data

            Monkeys = new ObservableCollection <Monkey>();
            Monkeys.Add(new Monkey
            {
                Name     = "Baboon",
                Location = "Africa & Asia",
                Details  = "Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Papio_anubis_%28Serengeti%2C_2009%29.jpg/200px-Papio_anubis_%28Serengeti%2C_2009%29.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Capuchin Monkey",
                Location = "Central & South America",
                Details  = "The capuchin monkeys are New World monkeys of the subfamily Cebinae. Prior to 2011, the subfamily contained only a single genus, Cebus.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Capuchin_Costa_Rica.jpg/200px-Capuchin_Costa_Rica.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Blue Monkey",
                Location = "Central and East Africa",
                Details  = "The blue monkey or diademed monkey is a species of Old World monkey native to Central and East Africa, ranging from the upper Congo River basin east to the East African Rift and south to northern Angola and Zambia",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/8/83/BlueMonkey.jpg/220px-BlueMonkey.jpg"
            });


            Monkeys.Add(new Monkey
            {
                Name     = "Squirrel Monkey",
                Location = "Central & South America",
                Details  = "The squirrel monkeys are the New World monkeys of the genus Saimiri. They are the only genus in the subfamily Saimirinae. The name of the genus Saimiri is of Tupi origin, and was also used as an English name by early researchers.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Saimiri_sciureus-1_Luc_Viatour.jpg/220px-Saimiri_sciureus-1_Luc_Viatour.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Golden Lion Tamarin",
                Location = "Brazil",
                Details  = "The golden lion tamarin also known as the golden marmoset, is a small New World monkey of the family Callitrichidae.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Golden_lion_tamarin_portrait3.jpg/220px-Golden_lion_tamarin_portrait3.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Howler Monkey",
                Location = "South America",
                Details  = "Howler monkeys are among the largest of the New World monkeys. Fifteen species are currently recognised. Previously classified in the family Cebidae, they are now placed in the family Atelidae.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Alouatta_guariba.jpg/200px-Alouatta_guariba.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Japanese Macaque",
                Location = "Japan",
                Details  = "The Japanese macaque, is a terrestrial Old World monkey species native to Japan. They are also sometimes known as the snow monkey because they live in areas where snow covers the ground for months each",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Macaca_fuscata_fuscata1.jpg/220px-Macaca_fuscata_fuscata1.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Mandrill",
                Location = "Southern Cameroon, Gabon, Equatorial Guinea, and Congo",
                Details  = "The mandrill is a primate of the Old World monkey family, closely related to the baboons and even more closely to the drill. It is found in southern Cameroon, Gabon, Equatorial Guinea, and Congo.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Mandrill_at_san_francisco_zoo.jpg/220px-Mandrill_at_san_francisco_zoo.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Proboscis Monkey",
                Location = "Borneo",
                Details  = "The proboscis monkey or long-nosed monkey, known as the bekantan in Malay, is a reddish-brown arboreal Old World monkey that is endemic to the south-east Asian island of Borneo.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Proboscis_Monkey_in_Borneo.jpg/250px-Proboscis_Monkey_in_Borneo.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Spider Monkey",
                Location = "Central and South America",
                Details  = "Spider monkeys of the genus Ateles are New World monkeys in the subfamily Atelinae, family Atelidae. Like other atelines, they are found in tropical forests of Central and South America, from southern Mexico to Brazil.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/8/83/Spider_monkey_-Belize_Zoo-8b.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Saki Monkey",
                Location = "South America",
                Details  = "Sakis, or saki monkeys, are any of several New World monkeys of the genus Pithecia.[1] They are closely related to the bearded sakis of genus Chiropotes.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/WhiteFacedSaki.jpg/200px-WhiteFacedSaki.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Emperor Tamarin",
                Location = "Amazon Basin",
                Details  = "The emperor tamarin, is a species of tamarin allegedly named for its resemblance to the German emperor Wilhelm II. It lives in the southwest Amazon Basin, in east Peru, north Bolivia and in the west Brazilian states of Acre and Amazonas",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/5/55/Tamarin_portrait.JPG"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Spectacled Langur",
                Location = "Malaysia",
                Details  = "The dusky leaf monkey, spectacled langur, or spectacled leaf monkey (Trachypithecus obscurus) is a species of primate in the Cercopithecidae family. It is found in Malaysia, Burma, and Thailand.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Dusky_leaf_monkey%2C_Trachypithecus_obscurus.jpg/220px-Dusky_leaf_monkey%2C_Trachypithecus_obscurus.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Colobus Monkey",
                Location = "Africa",
                Details  = "Black-and-white colobuses (or colobi) are Old World monkeys of the genus Colobus, native to Africa. They are closely related to the brown colobus monkeys of genus Piliocolobus.[1] The word 'colobus' comes from Greek κολοβός kolobós ('docked'), and is so named because in this genus, the thumb is a stump. Colobuses are herbivorous, eating leaves, fruit, flowers, and twigs. Their habitats include primary and secondary forests, riverine forests, and wooded grasslands; they are found more in higher-density logged forests than in other primary forests. Their ruminant-like digestive systems have enabled these leaf-eaters to occupy niches that are inaccessible to other primates.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Colubusmonkey.JPG/200px-Colubusmonkey.JPG"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "De Brazza's Monkey",
                Location = "Africa",
                Details  = "De Brazza's monkey (Cercopithecus neglectus) is an Old World monkey endemic to the wetlands of central Africa. It is one of the most widespread African primates that live in forests.",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Cercopithecus_neglectus.jpg/220px-Cercopithecus_neglectus.jpg"
            });

            Monkeys.Add(new Monkey
            {
                Name     = "Chimpanzee",
                Location = "West and Central Africa",
                Details  = "Chimpanzees, sometimes colloquially chimps, are two extant hominid species of apes in the genus Pan. The Congo River divides the native habitats of the two species",
                Image    = "http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Schimpanse_Zoo_Leipzig.jpg/220px-Schimpanse_Zoo_Leipzig.jpg"
            });

            #endregion

            this._messageServices = DependencyService.Get <Services.IMessegeService>();
            this._navigation      = DependencyService.Get <Services.INavigationService>();
            var sorted = from monkey in Monkeys
                         orderby monkey.Name
                         group monkey by monkey.NameSort into monkeyGroup
                         select new Grouping <string, Monkey>(monkeyGroup.Key, monkeyGroup);

            MonkeysGrouped = new ObservableCollection <Grouping <string, Monkey> >(sorted);
        }
Exemple #22
0
 public SplashViewModel(Services.INavigationService navigationService)
 {
     this.navigationService = navigationService;
 }
 public ViewModelBase()
 {
     this._navigationService = DependencyService.Get<Services.INavigationService> ();
     this._messageService = DependencyService.Get<Services.IMessageService> ();
 }
        public HomeViewModel()
        {
            List();

            this._navigationService = DependencyService.Get <Services.INavigationService>();
        }
 public ViewModelBase()
 {
     this._navigationService = DependencyService.Get <Services.INavigationService> ();
     this._messageService    = DependencyService.Get <Services.IMessageService> ();
 }