Package main

Source Code of main.RealCIXApplication

package main;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

import javax.swing.UIManager;

import realcix20.guis.views.LicenseView;
import realcix20.guis.views.LoginFrame;
import realcix20.utils.BrowserManager;
import realcix20.utils.GlobalValueManager;
import realcix20.utils.PasswordManager;
import realcix20.utils.Resources;

public class RealCIXApplication {
       
    public static void main(String[] args) throws FileNotFoundException {
     
      //log
      FileOutputStream fos = new FileOutputStream("errors.log");
      PrintStream ps = new PrintStream(fos);
      System.setErr(ps);
      FileOutputStream fos1 = new FileOutputStream("common.log");
      PrintStream ps1 = new PrintStream(fos1);
      System.setErr(ps);
      System.setOut(ps1);

     
        //init keys                   
        PasswordManager.initEncryKey();
        //init application.properties
        GlobalValueManager.setValue("APPLICATION.HELPSHOWING", "FALSE");
        //set look & feels
        if (BrowserManager.isWindowsPlatform()) {
            try {
                UIManager.setLookAndFeel(GlobalValueManager.getValue("APPLICATION.LOOKANDFEELS"));
            } catch (Exception e) {
                e.printStackTrace();
            }
        } else {
            try {
                UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticLookAndFeel");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        //Users GUI Theme       
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {                       
                if (GlobalValueManager.getValue("firsttime").equals("TRUE")) {                   
                    new LicenseView();
                } else {
                    Resources.LANGUAGE = GlobalValueManager.getApplicationLang();
                    new LoginFrame();
                }
            }
        });      
    }   
}
TOP

Related Classes of main.RealCIXApplication

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.