Пример #1
0
        public RequesterPage()
        {
            Title = "Requester";

            /*if (PlatformHelper.iOS)
             * {
             *  Icon = "ion-ios-cloud-download";
             * }*/

            _requesterView = new RequesterView("/");

            var button = new DGButton
            {
                Text    = "Load Requester",
                Command = new Command((obj) =>
                {
                    _requesterView.Load();
                })
            };

            Content = new StackLayout
            {
                Children =
                {
                    button,
                    _requesterView
                }
            };
        }
Пример #2
0
        public ActionPage(string path)
        {
            _path           = path;
            _parameterCells = new Dictionary <string, Cell>();
            _columnCells    = new List <Cell>();

            _invokeButton = new DGButton
            {
                Text      = "Invoke",
                IsEnabled = false,
                Command   = new Command(() =>
                {
                    if (_invokePermission == null)
                    {
                        throw new Exception("Invoke permission is null.");
                    }
                    App.Instance.DSLink.Requester.Invoke(_path,
                                                         _invokePermission,
                                                         CollectParameters(),
                                                         (InvokeResponse response) =>
                    {
                        SetOutputs(response.Updates);
                        response.Close();
                    });
                })
            };
            _parametersSection = new TableSection("Parameters");
            _columnsSection    = new TableSection("Columns");

            _tableRoot = new TableRoot();

            Content = new StackLayout
            {
                Children =
                {
                    _invokeButton,
                    new TableView
                    {
                        Root   = _tableRoot,
                        Intent = TableIntent.Form
                    }
                }
            };

            App.Instance.DSLink.Requester.List(_path, ListCallback);
        }