}
}
private void loadSystem(final Shell shell) {
final int waitTime = 375;
final SplashScreen splashScreen = new SplashScreen(getShell());
splashScreen.setRaiseAmount(waitTime);
splashScreen.setWaitTime(500);
splashScreen.open();
display.asyncExec(new Runnable() {
public void run() {
try {
splashScreen.setMessage("Restaurando base de dados");
splashScreen.raiseBar();
system = GDSystem.getInstance();
splashScreen.setMessage("Inicializando registros");
splashScreen.raiseBar();
GDSystem.getGDRegistry();
GD.getInstance();
Thread.sleep(waitTime);
if(GDSystem.isStandAloneMode()) {
// splashScreen.setMessage("Verificando licen�a");
// splashScreen.raiseBar();
// if(!Anakin.getInstance().isTheForceWithYou()) {
// splashScreen.setMessage("Licen�a invalida");
// splashScreen.close();
// new RevengeOfTheSith().run();
// }
// if((!Anakin.getInstance().isTheForceWithYou()) ||
// (GDSystem.getInstance().getProperty("serialnumber") == null) ||
// (GDSystem.getInstance().getProperty("username") == null) ||
// (GDSystem.getInstance().getProperty("password") == null) ||
// (GDSystem.getInstance().getProperty("serialnumber").equals("")) ||
// (GDSystem.getInstance().getProperty("username").equals("")) ||
// (GDSystem.getInstance().getProperty("password").equals(""))){
// splashScreen.setMessage("Licen�a invalida");
// splashScreen.close();
// new RevengeOfTheSith(shell, false).open();
// }
// Thread.sleep(waitTime);
//
// splashScreen.setMessage("Validando dados");
// splashScreen.raiseBar();
// if (!PidManager.getInstance().isValidPID()) {
// splashScreen.setMessage("Data de abertura modificada");
// splashScreen.close();
// MessageDialog.openWarning(shell, "Aten��o!", "N�o foi possivel iniciar o Gerente Digital, foi detectada uma altera��o na data de abertura.");
// close();
// }
//
// splashScreen.setMessage("Executando tarefas de atualiza��o");
// splashScreen.raiseBar();
// } else {
// splashScreen.setMessage("Verificando disponibilidade do servidor");
// splashScreen.raiseBar();
// Thread.sleep(waitTime);
//
// splashScreen.setMessage("Servidor dispon�vel");
// splashScreen.raiseBar();
// Thread.sleep(waitTime);
//
// splashScreen.setMessage("Efetuando atualiza��es");
// splashScreen.raiseBar();
}
splashScreen.setMessage("Configurando Gr�ficos");
splashScreen.raiseBar();
configureShell(shell);
Thread.sleep(waitTime);
splashScreen.setMessage("Criando Componentes");
splashScreen.raiseBar();
createContents(shell);
Thread.sleep(waitTime);
splashScreen.setMessage("Sistema pronto");
splashScreen.raiseBar();
Thread.sleep(waitTime);
shell.open();
} catch (Throwable e) {
}