Ejemplo n.º 1
0
 public static String getUpdateMessage() {
   Form.showWait();
   try {
     checkForUpdates();
     return MyLocale.getMsg(7022, "Version type") + "\n" + newVersionsArrayToString();
   } catch (IOException e) {
     return MyLocale.getMsg(7023, "Error getting current version information")
         + "\n"
         + e.getMessage();
   } finally {
     Form.cancelWait();
   }
 }
Ejemplo n.º 2
0
 /**
  * you must call checkForUpdates() before this method
  *
  * @return
  */
 public static String newVersionsArrayToString() {
   StringBuffer ret = new StringBuffer(500);
   for (int i = 1; i <= updateavailabe.length - 1; i++) {
     if (updateavailabe[i] != 2 || i - 1 == VERSION_TYPE) {
       ret.append(MyLocale.getMsg(7000 + i - 1, VERSION_TYPES[i - 1]));
       if (versionnumbers[i] != null) ret.append(" ").append(versionnumbers[i]);
       if (i == updateavailabe[0]) ret.append("*");
       if (i - 1 == VERSION_TYPE) ret.append("+");
       ret.append(": ");
       ret.append(MyLocale.getMsg(7010 + updateavailabe[i], Convert.toString(updateavailabe[i])));
       ret.append("\n");
     }
   }
   ret.append("* = ").append(MyLocale.getMsg(7020, "Recommended version type"));
   ret.append("\n+ = ").append(MyLocale.getMsg(7021, "This version type")).append("\n");
   ret.append(getReleaseDetailed());
   return ret.toString();
 }