示例#1
0
 private void setSynchronizationMode(int value) {
   System.out.println("MainForm::setSynchronizationMode(" + value + ")");
   WebServiceInteractor ws = App.getCurrentApp().getWebServiceIteractor();
   switch (value) {
     case 0:
       if (_synchronizeCommand != null) {
         form.removeCommand(_synchronizeCommand);
         _synchronizeCommand = null;
       }
       ws.changeInstensity(WebServiceInteractor.FIVEMIN);
       break;
     case 1:
       if (_synchronizeCommand != null) {
         form.removeCommand(_synchronizeCommand);
         _synchronizeCommand = null;
       }
       ws.changeInstensity(WebServiceInteractor.HOURLY);
       break;
     case 2:
       if (_synchronizeCommand != null) {
         form.removeCommand(_synchronizeCommand);
         _synchronizeCommand = null;
       }
       ws.changeInstensity(WebServiceInteractor.DAILY);
       break;
     case 3:
       _synchronizeCommand =
           new Command(getResoursable().get("synchronizeCommand"), Command.EXIT, 50);
       form.addCommand(_synchronizeCommand);
       ws.changeInstensity(System.currentTimeMillis());
       break;
     default:
       break;
   }
   saveSettings();
 }
示例#2
0
 public void show() {
   WebServiceInteractor ws = App.getCurrentApp().getWebServiceIteractor();
   if (ws != null) {
     if (ws.getTagId() == null || ws.getTagId().length() == 0) {
       SettingsBean bean =
           (SettingsBean) UIManager.getInstance().getBean(UIManager.SCREEN_SETTINGS);
       if (bean == null) {
         bean = new SettingsBean(App.getCurrentApp().getSettings());
         UIManager.getInstance().putBean(UIManager.SCREEN_SETTINGS, bean);
       }
       showBusy(null);
       ws.getTagId(null);
       ws.getEncryptionTag(null);
       ws.getBlockList(this);
     } else {
       refresh();
     }
   }
 }