Exemplo n.º 1
0
        public MainDrawer() : base()
        {
            try
            {
                var menuImage = new Image
                {
                    HeightRequest     = 30,
                    WidthRequest      = 30,
                    Aspect            = Aspect.AspectFill,
                    HorizontalOptions = LayoutOptions.Center,
                    VerticalOptions   = LayoutOptions.Center,
                };
                menuImage.SetBinding(Image.SourceProperty, "ImageSource");

                var imageLayout = new StackLayout
                {
                    Spacing           = 0,
                    Padding           = new Thickness(15, 0, 15, 0),
                    Orientation       = StackOrientation.Horizontal,
                    HorizontalOptions = LayoutOptions.Start,
                    Children          = { menuImage }
                };

                var nameLabel = new cxLabel
                {
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    TextColor         = Color.Black,//Shared.Settings.Styles.Colors.Font.Base,
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.Center,
                };
                nameLabel.SetBinding(cxLabel.TextProperty, "Title");

                var cellLayout = new StackLayout
                {
                    Spacing           = 0,
                    Padding           = new Thickness(10, 10, 10, 10),
                    Orientation       = StackOrientation.Horizontal,
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.Center,
                    Children          = { imageLayout, nameLabel }
                };

                this.View = cellLayout;
            }
            catch (Exception ex)
            {
                Shared.Services.Logs.Insights.Send("Layout", ex);
            }
        }
Exemplo n.º 2
0
        public RekeningTempat() : base()
        {
            try{
                peakLayout = new AbsoluteLayout
                {
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    BackgroundColor   = Color.White,
                    Padding           = new Thickness(5, 0, 0, 0)
                };

                imgChecked = new Image()
                {
                    Aspect          = Aspect.AspectFit,
                    HeightRequest   = 20,
                    WidthRequest    = 20,
                    BackgroundColor = Color.Transparent
                };
                imgChecked.Source = Shared.Classes.Optimizer.Image.FromFile("ic_isnotchecked");

                txtChecked = new cxLabel {
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.CenterAndExpand,
                    TextColor         = Color.White
                };
                txtChecked.SetBinding(cxLabel.TextProperty, "isChecked");

                txtUID = new cxLabel {
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor         = Color.Black,
                };
                txtUID.SetBinding(cxLabel.TextProperty, "uid");

                userIDLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text = "User ID : ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        txtUID,
                    }
                };

                txtUname = new cxLabel {
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor         = Color.Black,
                };
                txtUname.SetBinding(cxLabel.TextProperty, "uname");

                userNameLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text = "User Name : ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        txtUname,
                    }
                };

                txtNmPasar = new cxLabel {
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor         = Color.Black,
                };
                txtNmPasar.SetBinding(cxLabel.TextProperty, "nmpasar");

                nmPasarLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text = "Pasar : ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        txtNmPasar,
                    }
                };

                txtBulan = new cxLabel {
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    //WidthRequest = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor = Color.Black,
                };
                txtBulan.SetBinding(cxLabel.TextProperty, "bulan");

                txtTahun = new cxLabel {
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    //WidthRequest = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor = Color.Black,
                };
                txtTahun.SetBinding(cxLabel.TextProperty, "tahun");

                periodeLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel         {
                            Text = "Periode : ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        new StackLayout     {
                            Spacing           = 0,
                            Padding           = new Thickness(15, 0, 0, 0),
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            Orientation       = StackOrientation.Horizontal,
                            Children          =
                            {
                                txtBulan,
                                new cxLabel {
                                    Text = " / ",
                                    HorizontalOptions = LayoutOptions.Start,
                                    VerticalOptions   = LayoutOptions.Start,
                                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                                    TextColor         = Color.Black,
                                },
                                txtTahun
                            }
                        }
                    }
                };

                txtNmped = new cxLabel {
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor         = Color.Black,
                };
                txtNmped.SetBinding(cxLabel.TextProperty, "nmped");

                nmPedLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text = "Pedagang : ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        txtNmped,
                    }
                };

                txtAlamat = new cxLabel {
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor         = Color.Black,
                };
                txtAlamat.SetBinding(cxLabel.TextProperty, "alamat");

                alamatLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text = "Alamat : ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        txtAlamat,
                    }
                };

                txtTotal = new cxLabel {
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor         = Color.Black,
                };
                txtTotal.SetBinding(cxLabel.TextProperty, "total");

                totalLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text = "Total : Rp. ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        txtTotal,
                    }
                };

                txtTglBayar = new cxLabel {
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    TextColor         = Color.Black,
                };
                txtTglBayar.SetBinding(cxLabel.TextProperty, "tglbayar");

                tglBayarLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text = "Tanggal Bayar : ",
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                            TextColor         = Color.Black,
                        },
                        txtTglBayar,
                    }
                };

                var alls = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(20, 0, 10, 0),
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Children          =
                    {
                        new StackLayout {
                            Spacing           = 0,
                            Padding           = new Thickness(0, 10, 0, 10),
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            Children          =
                            {
                                userIDLayout,
                                userNameLayout,
                                nmPasarLayout,
                                periodeLayout,
                                nmPedLayout,
                                alamatLayout,
                                totalLayout,
                                tglBayarLayout,
                                txtChecked
                            }
                        },
                    }
                };

                AbsoluteLayout.SetLayoutFlags(alls, AbsoluteLayoutFlags.All);
                AbsoluteLayout.SetLayoutBounds(alls, new Rectangle(0, 0, 1f, 1f));

                AbsoluteLayout.SetLayoutFlags(imgChecked, AbsoluteLayoutFlags.PositionProportional);
                AbsoluteLayout.SetLayoutBounds(imgChecked,
                                               new Rectangle(0, 0.5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));

                peakLayout.Children.Add(alls);
                peakLayout.Children.Add(imgChecked);

                allLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Children          =
                    {
                        peakLayout
                    }
                };
                this.View = allLayout;
            }
            catch (Exception ex) {
                Shared.Services.Logs.Insights.Send("Layout", ex);
            }
        }
Exemplo n.º 3
0
        public DaftarLunas() : base()
        {
            try
            {
                txtAlamatStand = new cxLabel {
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.CenterAndExpand,
                    TextColor         = Color.Black
                };
                txtAlamatStand.SetBinding(cxLabel.TextProperty, "alamat");

                alamatStandLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(5, 20, 5, 20),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    Children          =
                    {
                        txtAlamatStand
                    }
                };

                txtNmped = new cxLabel {
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.CenterAndExpand,
                    TextColor         = Color.Black
                };
                txtNmped.SetBinding(cxLabel.TextProperty, "nmped");

                nmpedLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(5, 20, 5, 20),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                    Children          =
                    {
                        txtNmped
                    }
                };

                allLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(10, 0, 10, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        alamatStandLayout,
                        nmpedLayout
                    }
                };

                this.View = allLayout;
            }
            catch (Exception ex)
            {
                Shared.Services.Logs.Insights.Send("Layout", ex);
                //throw ex;
            }
        }
Exemplo n.º 4
0
        public StandSearchResult() : base()
        {
            try
            {
                txtAlamatStand = new cxLabel {
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.CenterAndExpand,
                    TextColor         = Color.Black,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                };
                txtAlamatStand.SetBinding(cxLabel.TextProperty, "alamat");

                alamatStandLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(5, 5, 5, 5),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text              = "Alamat : ",
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            HorizontalOptions = LayoutOptions.Start,
                            VerticalOptions   = LayoutOptions.CenterAndExpand,
                            TextColor         = Color.Black,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                        },
                        txtAlamatStand
                    }
                };

                txtNmped = new cxLabel {
                    FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                    FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                    HorizontalOptions = LayoutOptions.Start,
                    VerticalOptions   = LayoutOptions.CenterAndExpand,
                    TextColor         = Color.Black,
                    WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                };
                txtNmped.SetBinding(cxLabel.TextProperty, "nmped");

                nmpedLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(5, 5, 5, 5),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Orientation       = StackOrientation.Horizontal,
                    Children          =
                    {
                        new cxLabel {
                            Text              = "Pedagang : ",
                            FontSize          = Shared.Settings.Styles.Sizes.Font.Base,
                            FontFamily        = Shared.Settings.Styles.Fonts.BaseLight,
                            HorizontalOptions = LayoutOptions.Start,
                            VerticalOptions   = LayoutOptions.CenterAndExpand,
                            TextColor         = Color.Black,
                            WidthRequest      = Shared.Settings.Styles.Pages.MyDevice.ScreendWidth / 2,
                        },
                        txtNmped
                    }
                };

                allLayout = new StackLayout {
                    Spacing           = 0,
                    Padding           = new Thickness(0, 0, 0, 0),
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Children          =
                    {
                        alamatStandLayout,
                        nmpedLayout,
                        new StackLayout {
                            Spacing           = 0,
                            Padding           = new Thickness(5,                                                                                          0, 5, 0),
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions   = LayoutOptions.FillAndExpand,
                            Children          =
                            {
                                Shared.Settings.Styles.Pages.LayoutLine.borderX(Shared.Settings.Styles.Colors.Background.LightBlue,                      1),
                            }
                        },
                    }
                };

                this.View = allLayout;
            }
            catch (Exception ex)
            {
                Shared.Services.Logs.Insights.Send("Layout", ex);
                //throw ex;
            }
        }