Example #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            if (e.Parameter != null)
            {

                    textBlockAux.Text = "";
                    textBlockAux.Visibility = Visibility.Collapsed;
                    textBox.Visibility = Visibility.Collapsed;
                    btCancel.Visibility = Visibility.Collapsed;
                    btOk.Visibility = Visibility.Collapsed;

                if (((string)e.Parameter).Equals("Processo")) { this.ViewModel = ProcessoPage.getLastInstance().ViewModel; ; return; }

                //ENCONTRA O CONDOMINIO
                string nome = (string)e.Parameter;
                    App minhaApp = (App)App.Current;
                    Condominio cond = (from c in minhaApp.Gerenciador.Condominios
                                       where c.Nome == nome
                                       select c).FirstOrDefault();
                    if(cond != null)
                {
                    this.ViewModel.NomeCondominio = cond.Nome;
                    //ATUALIZA OS BLOCOS
                    UpdateBlocos(cond);
                }
            }

        }
Example #2
0
 public BlocoApPage()
 {
     this.InitializeComponent();
     SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
     page = this;
     this.ViewModel = new BlocoApPageViewModel();
 }