Package core

Source Code of core.Main

package core;

import swing.MainWindow;

public class Main {

 
  /**
   * @param args
   * @todo check which framework to use and include the neccessary files
   */
  public static void main(String[] args) {
    if(0 < args.length) {
      if(args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("h") || args[0].equalsIgnoreCase("-h") || args[0].equalsIgnoreCase("--help")) {
        System.out.println("HELP OUTPUT");
      }
      if(args[0].equalsIgnoreCase("-Qt") || args[0].equalsIgnoreCase("Qt")) {
        // use Qt
      } else if(args[0].equalsIgnoreCase("-GTK") || args[0].equalsIgnoreCase("GTK")) {
        // use GTK
      } else {
        // use swing
      }
     
    }
    Main win = new Main();

  }
 
  public Main() {
    MainWindow win = new MainWindow("JBoincManager");
    win.setVisible(true);
    win.setSize(200, 200);
  }
 
  private void version(){
   
      System.out.printf("JBoincManager,  built from %s \n", "PACKAGE_STRING" );
      System.exit(0);
  }

  private void help() {
      System.out.print("\n\n" +
          "      usage: boinc_cmd [--host hostname] [--passwd passwd] command\n\n" +
          "  Commands:\n" +
          "   --get_state                   show entire state\n" +
          "   --get_results                 show results\n" +
          "   --get_file_transfers            show file transfers\n" +
          "   --get_project_status            show status of all projects\n" +
          "   --get_disk_usage\n" +
          "   --result url result_name {suspend | resume | abort | graphics_window | graphics_fullscreen}\n" +
          "   --project url {reset | detach | update | suspend | resume | nomorework | allowmorework}\n" +
          "   --project_attach url auth\n" +
          "   --file_transfer url filename {retry | abort}\n" +
          "   --get_run_mode\n" +
          "   --set_run_mode {always | auto | never}\n" +
          "   --get_network_mode\n" +
          "   --set_network_mode {always | auto | never}\n" +
          "   --get_proxy_settings\n" +
          "   --set_proxy_settings\n" +
          "   --get_messages seqno            show messages > seqno\n" +
          "   --get_host_info\n" +
          "   --acct_mgr_rpc url name password\n" +
          "   --run_benchmarks\n" +
          "   --get_screensaver_mode\n" +
          "   --set_screensaver_mode on|off blank_time {desktop window_station}\n" +
          "   --get_project_config url\n" +
          "   --get_project_config_poll\n" +
          "   --lookup_account url email passwd\n" +
          "   --lookup_account_poll\n" +
          "   --create_account url email passwd name\n" +
          "   --create_account_poll\n" +
          "   --quit\n");
      System.exit(1);
  }

  public static void quit() {
    System.exit(0);   
  }

  public static void quit_error(int number) {
    System.exit(number);
  }

}
TOP

Related Classes of core.Main

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.