예제 #1
0
        public static void tasks(GEnRouteManager manager)
        {
            GTaskManager taskManager = manager.getTaskManager();

            // Enumerate tasks
            foreach (GTask taskFromList in taskManager.getTasks())
            {
                // Do something with each task
            }

            // Start top pending task. Notes
            // - task list may be empty
            GTask task = taskManager.getPendingTasks().at(0);

            taskManager.startTask(task);

            // Change task phase to "live". Notes
            // - task needs to be in active state
            // - operation object needs to be available
            taskManager.setOperationPhase(task.getOperation(), EnRouteConstants.PHASE_PROPERTY_LIVE());

            // Complete task. Notes
            // - task needs to be in active state
            // - operation object needs to be available
            taskManager.completeOperation(task.getOperation());
        }
예제 #2
0
 public static void onAppStart(GEnRouteManager manager)
 {
     if (manager.isLoginNeeded())
     {
         manager.login(_driverEmail, _driverPassword);
     }
     else
     {
         manager.start();
     }
 }
예제 #3
0
        public App(GEnRouteFactory enRouteFactory)
        {
            _enRouteFactory = enRouteFactory;

            _enRouteManager = _enRouteFactory.createEnRouteManager();

            // The root page of your application
            MainPage = new ContentPage {
                Content = new StackLayout {
                    VerticalOptions = LayoutOptions.Center,
                    Children        =
                    {
                        new Label {
                            XAlign = TextAlignment.Center,
                            Text   = "Welcome to Xamarin Forms!"
                        }
                    }
                }
            };
        }
예제 #4
0
 public static void onDriverLogout(GEnRouteManager manager)
 {
     manager.logout(EnRouteConstants.LOGOUT_REASON_USER_ACTION);
 }
예제 #5
0
 public Controller(GEnRouteManager manager)
 {
     _manager = manager;
 }
예제 #6
0
 public void unsubscribe(GEnRouteManager manager)
 {
     manager.removeListener(this);
 }
예제 #7
0
 public void subscribe(GEnRouteManager manager)
 {
     manager.addListener(this);
 }