Example #1
0
        public Master(FormProfile formProfile)
        {
            Title = "Forms";
            InitializeComponent();

            listView.ItemsSource = Database.GetMasterPageItems();

            newButton.Text = Resx.App.New + " " + formProfile.FormName;
        }
Example #2
0
        public MasterDetail(FormProfile formProfile)
        {
            var masterPage = new Master(formProfile);
            var detailPage = new Detail(formProfile);

            Master = masterPage;
            Detail = new NavigationPage(detailPage);

            masterPage.ListView.ItemSelected += OnItemSelected;
        }
Example #3
0
        public App()
        {
            InitializeComponent();

            var formProfile = new FormProfile(
                Resx.JobCards.SingularName,
                Resx.JobCards.PluralName,
                typeof(JobCard));

            MainPage = new MasterDetail(formProfile);
        }
Example #4
0
        public Detail(FormProfile formProfile)
        {
            /* Set the command to display form actions.
             * Command is only executable if the form is set. */
            _openOptionsCommand = new Command(async() =>
            {
                var action = await DisplayActionSheet(null, Resx.App.Cancel, Resx.App.Delete, Resx.App.Duplicate, Resx.App.Export);
                Debug.WriteLine("Action: " + action);
            }, () =>
            {
                return(Form != null);
            });

            var ActionsItem = new ToolbarItem();

            ActionsItem.Text    = Resx.App.Options;
            ActionsItem.Command = _openOptionsCommand;
            ToolbarItems.Add(ActionsItem);

            InitializeComponent();

            // ListView.ItemSelected += OnItemSelected;
        }