public BuildingEntryPage(PPMAppDB database)
        {
            InitializeComponent();
            Title                                    = "Add Building";
            _database                                = database;
            this.dataForm.Source                     = bentry;
            this.dataForm.ValidationMode             = ValidationMode.OnLostFocus;
            this.dataForm.CommitMode                 = CommitMode.Manual;
            this.dataForm.PropertyDataSourceProvider = new BuildingEntryDSP();

            this.dataForm.RegisterEditor("ClientName", EditorType.PickerEditor);
            this.dataForm.RegisterEditor("Institution", EditorType.PickerEditor);
            this.dataForm.RegisterEditor("Building", EditorType.PickerEditor);
            this.dataForm.RegisterEditor("Job", EditorType.PickerEditor);
            this.dataForm.RegisterEditor("Status", EditorType.PickerEditor);
            this.dataForm.RegisterEditor("Photo", EditorType.TextEditor);
            this.dataForm.RegisterEditor("Detail", EditorType.TextEditor);

            var positive = "CCFF00";
            var negative = "FF004C";

            var style = new DataFormEditorStyle
            {
                Background = new Background
                {
                    Fill        = Color.Transparent,
                    StrokeColor = Color.FromHex(positive),
                    StrokeWidth = 1
                                  //StrokeLocation = Location.Bottom
                },
                HeaderFontSize   = 15,
                HeaderForeground = Color.White,
                FeedbackFontSize = 10,
                //PositiveFeedbackImage = ImageSource.FromFile("success.png"),
                NegativeFeedbackForeground = Color.FromHex(negative),
                NegativeFeedbackBackground = new Background
                {
                    Fill        = Color.FromHex(50 + negative),
                    StrokeColor = Color.FromHex(negative),
                    StrokeWidth = 2
                                  //StrokeLocation = Location.All
                },
                Height            = 60,
                FeedbackImageSize = new Size(10, 10),
            };

            dataForm.EditorStyle     = style;
            dataForm.BackgroundColor = Color.FromHex("3D6978");

            var toolbarItem = new ToolbarItem
            {
                Name    = "See All",
                Command = new Command(() => Navigation.PushAsync(new BuildingListPage()))
            };

            ToolbarItems.Add(toolbarItem);

            NavigationPage.SetHasNavigationBar(this, true);
        }
Пример #2
0
        public App()
        {
            // The root page of your application
            var database = new PPMAppDB();

            ppmservice = new PPMService(new RestService());
            //MainPage = new MainPageCS(new LocationView());
            //MainPage = new MainPageCS(new LocationList());
            // MainPage = new MainPageCS(new FCASystem());
            //MainPage = new MainPageCS(new FirstScreen());
            MainPage = new MainPageCS(new FirstScreen());
        }
        public StartPage(PPMAppDB database)
        {
            InitializeComponent();
            Title                        = "Client";
            _database                    = database;
            this.dataForm.Source         = Client;
            this.dataForm.ValidationMode = ValidationMode.OnLostFocus;
            this.dataForm.CommitMode     = CommitMode.Manual;

            this.dataForm.RegisterEditor("Name", EditorType.TextEditor);


            var toolbarItem = new ToolbarItem
            {
                Name    = "Add",
                Command = new Command(() => Navigation.PushAsync(new AddBuilding()))
            };

            ToolbarItems.Add(toolbarItem);
            NavigationPage.SetHasNavigationBar(this, true);

            //this.dataForm.RegisterEditor("ContactNo", EditorType.IntegerEditor);
        }