コード例 #1
0
 private void onCleanDeviceClicked() {
   int result =
       Dialog.ask(
           Dialog.D_YES_NO,
           "Do you want to clean the device? This will clear all the locally stored child records and login information");
   if (result == Dialog.YES) {
     ((HomeController) controller).cleanAll();
     Dialog.alert("Device successfully cleaned");
     onLoginButtonClicked();
   }
 }
コード例 #2
0
 protected void onSynchronizeClicked() {
   if (ConnectionFactory.isNotConnected()) {
     Dialog.ask(
         Dialog.D_OK,
         "Could not establish connection with host because all connectors are offline");
   } else if (!settings.isUserLoggedIn()) {
     int result = Dialog.ask(Dialog.D_OK_CANCEL, "You are not logged in.\n Press ok to  login.");
     if (result == Dialog.OK) {
       onLoginButtonClicked();
     }
   } else {
     ((HomeController) controller).synchronize();
   }
 }
コード例 #3
0
 private void onNewChildClicked() {
   ((HomeController) controller).newChild();
 }
コード例 #4
0
 private void onSearchClicked() {
   ((HomeController) controller).showSearch();
 }
コード例 #5
0
 private void onViewChildrenClicked() {
   ((HomeController) controller).viewChildren();
 }
コード例 #6
0
 protected void onLoginButtonClicked() {
   ((HomeController) controller).logIn();
 }