Datalogic A20 Handbuch Seite 404

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 508
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 403
Scriptor Impact Reference Guide
Datalogic Automation Inc. 4-118
if(Scriptor.loadAndExecuteScript("C:/IMPACT/scripts/connect.bsh"))
{
boolean successful = Scriptor.loadAndExecuteScript("C:/IMPACT/scripts/
load.bsh");
if(successful)
{
Scriptor.loadAndExecuteScript("C:/IMPACT/scripts/save.bsh");
}
}
getDefaultLocale() Method
This command gets the current client’s locale based on the operating system’s regional options setting and
the Application.properties file. Example:
import java.util.ResourceBundle;
Locale locale = Scriptor.getDefaultLocale();
getResourceBundle() Method
This method retrieves the ResourceBundle instance that applies to the passed in bundle name and Locale.
Example:
import java.util.ResourceBundle;
Locale locale = Scriptor.getDefaultLocale();
try
{
localeResources = Scriptor.getResourceBundle("Application", locale);
}
catch(java.util.MissingResourceException mre)
{
Scriptor.displayPrompt("Could not find resource Application.properties");
}
getResourceKey() Method
This method retrieves the localize string associated with passed in bundle name, it's locale, and a desired
key. Example:
if(localeResources != null)
{
String propertiesFilename = "Application";
if(!locale.getLanguage().equals("en")) // not english
propertiesFilename = "Application_"+locale.getLanguage();
try
{
String titleCompany =
Scriptor.getResourceKey(propertiesFilename, locale,
"Application_Title_Company");
Scriptor.setProperty("Main.App Title 1.Text", titleCompany);
String titleApp = Scriptor.getResourceKey(propertiesFilename, locale,
"Application_Title_App");
Scriptor.setProperty("Main.App Title 2.Text", titleApp);
}
catch(Exception e)
{
Scriptor.displayPrompt("error getting resource key");
}
Script Examples
Seitenansicht 403
1 2 ... 399 400 401 402 403 404 405 406 407 408 409 ... 507 508

Kommentare zu diesen Handbüchern

Keine Kommentare