Пример #1
0
        /// <summary>
        ///     ctor().
        /// </summary>
        public BuyerPage()
        {
            InitializeComponent();

            SlideMenu = new SideMenuView();

            BindingContext = _viewModel = new BuyerPageViewModel();

            _viewModel.Spot = spot_ContentView;

            SfChart        chart          = new SfChart();
            DoughnutSeries doughnutSeries = new DoughnutSeries()
            {
                ItemsSource         = _viewModel.ChartData,
                XBindingPath        = "Name",
                YBindingPath        = "Value",
                DoughnutCoefficient = 0.7,
                ExplodeIndex        = 0
            };
            List <Color> colors = new List <Color>()
            {
                Color.FromHex("#82DA69"),
                Color.FromHex("#E47132"),
                Color.FromHex("#9EE5FC"),
            };

            doughnutSeries.ColorModel.Palette       = ChartColorPalette.Custom;
            doughnutSeries.ColorModel.CustomBrushes = colors;
            chart.WidthRequest  = 180;
            chart.HeightRequest = 180;
            chart.Series.Add(doughnutSeries);

            chart.Title.TextColor   = Color.FromHex("#cccccc");
            chart.HorizontalOptions = LayoutOptions.Center;
            chart.VerticalOptions   = LayoutOptions.Center;
            ChartGrid.Children.Add(chart);

            StackLayout MiddleStack = new StackLayout()
            {
                VerticalOptions   = LayoutOptions.Center,
                HorizontalOptions = LayoutOptions.Center,
                BackgroundColor   = Color.White
            };
            Label MiddleText1 = new Label()
            {
                Text           = "23%",
                FontSize       = 20,
                FontAttributes = FontAttributes.Bold
            };
            Label MiddleText2 = new Label()
            {
                Text           = "mobile",
                FontSize       = 10,
                FontAttributes = FontAttributes.Bold
            };

            MiddleStack.Children.Add(MiddleText1);
            MiddleStack.Children.Add(MiddleText2);
            ChartGrid.Children.Add(MiddleStack);
        }
Пример #2
0
        /// <summary>
        ///     ctor().
        /// </summary>
        public ReportsPage()
        {
            InitializeComponent();

            SlideMenu = new SideMenuView();

            BindingContext = _viewModel = new ReportsViewModel();
        }
Пример #3
0
        /// <summary>
        /// Public ctor.
        /// </summary>
        public BankAccountsPage()
        {
            InitializeComponent();

            BindingContext = _viewModel = new BankAccountsPageViewModel();

            SlideMenu = new SideMenuView();
        }
Пример #4
0
        /// <summary>
        ///     Public ctor().
        /// </summary>
        public AuditLogPage()
        {
            InitializeComponent();

            SlideMenu = new SideMenuView();

            BindingContext = _viewModel = new AuditLogPageViewModel();
        }
Пример #5
0
        public SettingsPage()
        {
            InitializeComponent();

            SlideMenu = new SideMenuView();

            BindingContext = _viewModel = new SettingsViewModel();

            _viewModel.Spot = spot_ConentView;
        }
Пример #6
0
        public StockPendingPage()
        {
            InitializeComponent();

            int hd = DependencyService.Get <IDisplaySize>().GetHeightDiP();
            int wd = DependencyService.Get <IDisplaySize>().GetWidthDiP();

            AbsoluteLayout.SetLayoutBounds(SideMenuOverlay, new Rectangle(0, 0, 0.9, hd - 20));


            //Slide menu creating
            SlideMenu = new SideMenuView();

            //Toolbar taps
            TapGestureRecognizer ToolbarTap1 = new TapGestureRecognizer();

            ToolbarTap1.Tapped += (s, e) =>
            {
                this.ShowMenu();
            };
            Menu.GestureRecognizers.Add(ToolbarTap1);

            TapGestureRecognizer ToolbarTap2 = new TapGestureRecognizer();

            ToolbarTap2.Tapped += (s, e) =>
            {
                SearchPage sp = new SearchPage();
                Application.Current.MainPage.Navigation.PushAsync(sp);
            };
            Search.GestureRecognizers.Add(ToolbarTap2);

            //In page navigation
            TapGestureRecognizer InPageNavigationTap1 = new TapGestureRecognizer();

            InPageNavigationTap1.Tapped += (s, e) =>
            {
                StockPendingDetailsPage spdp = new StockPendingDetailsPage();
                Application.Current.MainPage.Navigation.PushAsync(spdp);
            };
            Month1.GestureRecognizers.Add(InPageNavigationTap1);
            Month2.GestureRecognizers.Add(InPageNavigationTap1);
            Month3.GestureRecognizers.Add(InPageNavigationTap1);
            Month4.GestureRecognizers.Add(InPageNavigationTap1);
            Month5.GestureRecognizers.Add(InPageNavigationTap1);

            Month5.Text = DateTime.Today.ToString("MMM").ToUpper();
            Month4.Text = DateTime.Today.AddMonths(-1).ToString("MMM").ToUpper();
            Month3.Text = DateTime.Today.AddMonths(-2).ToString("MMM").ToUpper();
            Month2.Text = DateTime.Today.AddMonths(-3).ToString("MMM").ToUpper();
            Month1.Text = DateTime.Today.AddMonths(-4).ToString("MMM").ToUpper();
        }
Пример #7
0
        public App()
        {
            InitializeComponent();

            //ViewModels
            AuditLogVM            = new AuditLogViewModel();
            BuyerVM               = new BuyerViewModel();
            BuyerRankingsVM       = new BuyerRankingsViewModel();
            DashboardVM           = new DashboardViewModel();
            ExpensesVM            = new ExpensesViewModel();
            GrowerVM              = new GrowerViewModel();
            LadaanVM              = new LadaanViewModel();
            LatePaymentsVM        = new LatePaymentsViewModel();
            ProfileVM             = new ProfileViewModel();
            ProfitVM              = new ProfitViewModel();
            SearchVM              = new SearchViewModel();
            StockPendingDetailsVM = new StockPendingDetailsViewModel();
            TodayRatesVM          = new TodayRatesViewModel();

            //Menu
            SideMenu = new SideMenuView();

            /*LoginPage lp = new LoginPage();
             * DashboardPage dp = new DashboardPage();
             * PasswordRecoveryPage prp = new PasswordRecoveryPage();
             * PasscodePage pcp = new PasscodePage();
             * LadaanPage lap = new LadaanPage();
             * TodayRatesPage trp = new TodayRatesPage();
             * ChatPage cp = new ChatPage();
             * ProfitPage pp = new ProfitPage();
             * ExpensesListPage ep = new ExpensesListPage();
             * BankAccountsPage bp = new BankAccountsPage();
             * BankAccountDetailsPage bdp = new BankAccountDetailsPage();
             * ArrivalPage ap = new ArrivalPage();
             * ArrivalDetailsPage adp = new ArrivalDetailsPage();
             * GrowerProfilePage gpp = new GrowerProfilePage();
             * BuyerProfilePage bpp = new BuyerProfilePage();
             * LatePaymentsPage lpp = new LatePaymentsPage();
             * BuyerRankingsPage brp = new BuyerRankingsPage();
             * SearchPage sp = new SearchPage();
             * StockPendingPage spp = new StockPendingPage();
             * StockPendingDetailsPage spdp = new StockPendingDetailsPage();
             * SetupDashboardPage sdp = new SetupDashboardPage();
             * NewsPage np = new NewsPage();*/

            DashboardPage dp = new DashboardPage();
            LoginPage     lp = new LoginPage();

            MainPage = new NavigationPage(lp);
        }
Пример #8
0
        /// <summary>
        ///     ctor().
        /// </summary>
        public ExpensesListPage()
        {
            InitializeComponent();

            //Slide menu creating
            SlideMenu = new SideMenuView();

            BindingContext = _viewModel = new ExpensesListPageViewModel();

            More.Source         = ImageSource.FromResource("Tulsi.Images.3whitecircles.png");
            ExpensesIcon.Source = ImageSource.FromResource("Tulsi.Images.expenses_group.png");

            FoodIcon.Source      = ImageSource.FromResource("Tulsi.Images.expenses_food.png");
            PersonalIcon.Source  = ImageSource.FromResource("Tulsi.Images.expenses_personal.png");
            GroceriesIcon.Source = ImageSource.FromResource("Tulsi.Images.expenses_groceries.png");
            BonuslIcon.Source    = ImageSource.FromResource("Tulsi.Images.expenses_bonus.png");
            UtilitiesIcon.Source = ImageSource.FromResource("Tulsi.Images.expenses_utilities.png");
            CarIcon.Source       = ImageSource.FromResource("Tulsi.Images.expenses_car.png");
        }
        public StockPendingDetailsPage()
        {
            InitializeComponent();

            StockPendingDetailsViewModel spdvm = new StockPendingDetailsViewModel();

            BindingContext = spdvm;
            StockPendingDetailsListView.ItemsSource   = spdvm.StockPendingDetails;
            StockPendingDetailsListView.ItemSelected += (sender, e) =>
            {
                ((ListView)sender).SelectedItem = null;
            };

            int hd = DependencyService.Get <IDisplaySize>().GetHeightDiP();
            int wd = DependencyService.Get <IDisplaySize>().GetWidthDiP();

            AbsoluteLayout.SetLayoutBounds(SideMenuOverlay, new Rectangle(0, 0, 0.9, hd - 20));


            //Slide menu creating
            SlideMenu = new SideMenuView();

            //Toolbar taps
            TapGestureRecognizer ToolbarTap1 = new TapGestureRecognizer();

            ToolbarTap1.Tapped += (s, e) =>
            {
                this.ShowMenu();
            };
            Menu.GestureRecognizers.Add(ToolbarTap1);

            TapGestureRecognizer ToolbarTap2 = new TapGestureRecognizer();

            ToolbarTap2.Tapped += (s, e) =>
            {
                SearchPage sp = new SearchPage();
                Application.Current.MainPage.Navigation.PushAsync(sp);
            };
            Search.GestureRecognizers.Add(ToolbarTap2);
        }
Пример #10
0
        public ProfitPage()
        {
            InitializeComponent();

            SlideMenu = new SideMenuView();

            BindingContext = _viewModel = new ProfitViewModel();;

            SfChart chart = new SfChart();

            chart.BackgroundColor = Color.FromHex("#FFFFFF");
            //Initializing Primary Axis
            CategoryAxis primaryAxis = new CategoryAxis();

            primaryAxis.IsVisible = false;
            chart.PrimaryAxis     = primaryAxis;

            //Initializing Secondary Axis
            NumericalAxis secondaryAxis = new NumericalAxis();

            secondaryAxis.Minimum  = 400;
            secondaryAxis.Maximum  = 440;
            secondaryAxis.Interval = 20;

            chart.SecondaryAxis = secondaryAxis;

            //Initializing column series
            AreaSeries series = new AreaSeries();

            series.SetBinding(ChartSeries.ItemsSourceProperty, "ChartData");
            series.XBindingPath = "Step";
            series.YBindingPath = "Value";
            series.Color        = Color.FromHex("#A9D4FB");
            series.StrokeColor  = Color.FromHex("#2793F5");

            chart.Series.Add(series);
            ChartGrid.Children.Add(chart);
            Grid.SetColumn(chart, 1);
        }