Esempio n. 1
0
        private async void Fill()
        {
            MainMasterDetailPage main = App.Current.MainPage as MainMasterDetailPage;

            main.IsPresented = false;
            await Navigation.PushPopupAsync(new BasePopupPage("Yükleniyor..."));

            matches = await service.GetCurrentMatches(fieldZoneId);

            if (matches == null)
            {
                lblAlert.IsVisible = true;
                return;
            }
            foreach (Match match in matches)
            {
                viewModels.Add(new CurrentMatchesPageViewModel()
                {
                    Match = match
                });
            }
            viewModels             = viewModels.OrderBy(x => x.MatchDay).ToList();
            colMatches.ItemsSource = viewModels;
            await Navigation.PopPopupAsync();
        }
Esempio n. 2
0
 public App()
 {
     // The root page of your application
     MainPage   = new MainMasterDetailPage();
     CurrentApp = this;
     SqlManager.Init(DependencyService.Get <ISQLManager>().NativeManager);
 }
Esempio n. 3
0
        public App()
        {
            InitializeComponent();


            //MainPage = new MainPage();

            MainPage = new MainMasterDetailPage();
        }
        private void BtnMonthlyReports_Clicked(object sender, EventArgs e)
        {
            MainMasterDetailPage page = App.Current.MainPage as MainMasterDetailPage;

            page.Detail = new NavigationPage(new MonthlyReportsPage())
            {
                BarBackgroundColor = Color.FromHex("#495764"), BarTextColor = Color.FromHex("#F6F8D3"), Title = "Aylık Raporlar"
            }; page.IsPresented = false;
        }
Esempio n. 5
0
        public App()
        {
            InitializeComponent();

            var container = new UnityContainer();

            container.RegisterType <IBibleContext, BibleContext>();
            container.RegisterType <IBibleRepository, BibleRepository>();

            ServiceLocator.SetLocatorProvider(() => new UnityServiceLocator(container));

            MainPage = new MainMasterDetailPage();
        }
Esempio n. 6
0
 public App()
 {
     InitializeComponent();
     loggingView  = new LoggingView();
     masterDetail = new MainMasterDetailPage();
     if (logged)
     {
         Current.MainPage = masterDetail;
     }
     else
     {
         Current.MainPage = loggingView;
     }
 }
Esempio n. 7
0
        protected override void OnElementChanged(VisualElement oldElement, VisualElement newElement)
        {
            base.OnElementChanged(oldElement, newElement);

            var width = Resources.DisplayMetrics.WidthPixels;

            var fieldInfo     = GetType().BaseType.GetField("_masterLayout", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
            var _masterLayout = (ViewGroup)fieldInfo.GetValue(this);
            var lp            = new DrawerLayout.LayoutParams(_masterLayout.LayoutParameters);

            MainMasterDetailPage page = (MainMasterDetailPage)newElement;

            lp.Width = (int)(page.WidthRatio * width);

            lp.Gravity = (int)GravityFlags.Left;
            _masterLayout.LayoutParameters = lp;
        }
Esempio n. 8
0
        public App()
        {
            InitializeComponent();
            //for now....
            //Zipline2.Models.User joanne = new Zipline2.Models.User("Joanne", true, "8011");
            //Zipline2.Models.User satch = new Zipline2.Models.User("Satch", true, "1168");
            //Zipline2.Models.User jim = new Zipline2.Models.User("Jim", true, "4321");
            //Users.Instance.AddNewUser(joanne);
            //Users.Instance.AddNewUser(satch);
            //Users.Instance.AddNewUser(jim);
            //var watch = System.Diagnostics.Stopwatch.StartNew();
            //The following 4 statements take about a half a second (total).
            Zipline2.Data.Tables.LoadInitialTableData();
            Zipline2.Data.MenuFood.LoadInitialPizzaToppings();
            Zipline2.Data.MenuFood.LoadInitialSaladToppings();
            Zipline2.Data.MenuDrinks.CreateAllDrinks();
            CalculatePlusMinusButtonInfo();
            MenuFood.CreateDesserts();
            DataLoader.LoadMenuFromFileOrServer();
            DataLoader.LoadToppingsFromFileOrServer();

            MainPage = new MainMasterDetailPage();
        }
Esempio n. 9
0
        private async void LstItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (lstItems.SelectedItem != null)
            {
                MainMasterDetailPage page = App.Current.MainPage as MainMasterDetailPage;
                MainMasterDetailPageMasterMenuItem item = e.CurrentSelection[0] as MainMasterDetailPageMasterMenuItem;
                switch (item.Text)
                {
                case "Rezervasyonlar": page.Detail = new NavigationPage(new CurrentMatchesPage())
                {
                        BarBackgroundColor = Color.FromHex("#495764"), BarTextColor = Color.FromHex("#F6F8D3"), Title = "Güncel Kiralamalar"
                }; break;

                case "Takvim":
                    page.Detail = new NavigationPage(new CalendarPage())
                    {
                        BarBackgroundColor = Color.FromHex("#495764"), BarTextColor = Color.FromHex("#F6F8D3"), Title = "Takvim"
                    }; page.IsPresented = false; break;

                case "Abonelikler":
                    page.Detail = new NavigationPage(new SubscribesPage())
                    {
                        BarBackgroundColor = Color.FromHex("#495764"), BarTextColor = Color.FromHex("#F6F8D3"), Title = "Abonelikler"
                    }; page.IsPresented = false; break;

                case "Durum Bilgisi":
                    page.Detail = new NavigationPage(new ReportPage())
                    {
                        BarBackgroundColor = Color.FromHex("#495764"), BarTextColor = Color.FromHex("#F6F8D3"), Title = "Abonelikler"
                    }; page.IsPresented = false; break;

                case "Çıkış Yap":
                    Sign_Out(); break;
                }
                lstItems.SelectedItem = null;
            }
        }
Esempio n. 10
0
 public App()
 {
     // The root page of your application
     MainPage = new MainMasterDetailPage();//new CharacterListPage();
 }
Esempio n. 11
0
 public App()
 {
     MainPage = new MainMasterDetailPage();
 }
Esempio n. 12
0
        public MainMasterDetailPage CreateMainPage()
        {
            var mainMasterDetailPage = new MainMasterDetailPage();

            return(mainMasterDetailPage);
        }
Esempio n. 13
0
        public App()
        {
            InitializeComponent();

            var labelStyle = new Style(typeof(Label))
            {
                Setters =
                {
                    new Setter {
                        Property = Label.FontFamilyProperty, Value = (Device.RuntimePlatform == Device.Android ? "Candara.ttf#Candara" :
                                                                      (Device.RuntimePlatform == Device.iOS ? "Candara" : null))
                    }
                }
            };
            var entryStyle = new Style(typeof(Entry))
            {
                Setters =
                {
                    new Setter {
                        Property = Label.FontFamilyProperty, Value = (Device.RuntimePlatform == Device.Android ? "Candara.ttf#Candara" :
                                                                      (Device.RuntimePlatform == Device.iOS ? "Candara" : null))
                    }
                }
            };
            var cellStyle = new Style(typeof(Cell))
            {
                Setters =
                {
                    new Setter {
                        Property = Label.FontFamilyProperty, Value = (Device.RuntimePlatform == Device.Android ? "Candara.ttf#Candara" :
                                                                      (Device.RuntimePlatform == Device.iOS ? "Candara" : null))
                    }
                }
            };

            if (Resources == null)
            {
                Resources = new ResourceDictionary();
            }
            Resources.Add(labelStyle);
            Resources.Add(entryStyle);
            Resources.Add(cellStyle);

            CurrentDataStore.CurrentDALC = new FileDataStore();
            MockVaccineDatabase.MockVaccineDataStore();


            //IDictionary<NavigationController.Map, Type> fullmap = new Dictionary<NavigationController.Map, Type>
            //{
            //    { NavigationController.Map.Create(0, typeof(Views.MainPage)), typeof(AboutPage) },
            //    { NavigationController.Map.Create(1, typeof(Views.MainPage)), typeof(VaccineListViewPage) }
            //};


            //NavigationService = new NavigationService(new MainPage());
            //NavController = new NavigationController(NavigationService, fullmap);


            MainPage = new MainMasterDetailPage(); //MainPage();

            //BeginInvokeOnMainThread
            //Device.BeginInvokeOnMainThread(async () => {
            //    await Navigation.PushAsync(new SchedulePage());
            //});
        }