public CreateAccountPage()
 {
     InitializeComponent();
     _utilisateur   = new Utilisateur();
     BindingContext = _utilisateur;
     accountService = AccountServiceManager.GetAccountService();
 }
예제 #2
0
 public MainPage()
 {
     InitializeComponent();
     NavigationPage.SetHasBackButton(this, false);
     NavigationPage.SetHasNavigationBar(this, false);
     Init();
     accountService     = AccountServiceManager.GetAccountService();
     utilisateurService = UtilisateurServiceManager.GetUtilisateurService();
 }
예제 #3
0
        public MasterPageDetail()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);
            NavigationPage.SetHasBackButton(this, false);

            accountService = AccountServiceManager.GetAccountService();

            Identite.Text = App.Utilisateur.lastName.ToUpper() + " " + App.Utilisateur.firstName;

            MenuList = new List <MasterPageItem>();


            var page1 = new MasterPageItem()
            {
                Id = 1, Title = "Informations personnelles", Icon = "fa-user", IconColor = "#50a9db", TargetType = typeof(InfosPersonnellesPage)
            };

            MenuList.Add(page1);

            var page2 = new MasterPageItem()
            {
                Id = 2, Title = "Boites aux lettres", Icon = "fa-folder-open", IconColor = "#50a9db", TargetType = typeof(ListeBoiteAuLettrePage)
            };

            MenuList.Add(page2);
            Page pageAccueil = new ListeBoiteAuLettrePage();

            var page3 = new MasterPageItem()
            {
                Id = 3, Title = "Ajout boite aux lettres", Icon = "fa-plus-circle", IconColor = "#50a9db", TargetType = typeof(AjoutBALPage)
            };

            MenuList.Add(page3);
            if (App.Utilisateur.role == Utilisateur.Role.Admin)
            {
                var page5 = new MasterPageItem()
                {
                    Id = 5, Title = "Admin : Créer boite aux lettres", Icon = "fa-plus-circle", IconColor = "#50a9db", TargetType = typeof(CreateBALPage)
                };
                MenuList.Add(page5);
            }

            var page4 = new MasterPageItem()
            {
                Id = 4, Title = "Se deconnecter", Icon = "fa-power-off", IconColor = "Gray", TargetType = typeof(MainPage)
            };

            MenuList.Add(page4);

            navigationDrawerList.ItemsSource = MenuList;

            Detail = new NavigationPage(pageAccueil);
        }