/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package de.nplusc.izc.Utilities.WPCMgr;

/**
 *
 * @author LH
 */
public class Main
{
    public static void main(String[] args)
    {
        System.out.println(args.length);
        if (args.length>0)
        {
            System.out.println(args[0]);
            if(args[0].equals("--help")||args[0].equals("-h")||args[0].equals("/?"))
            {
                printHelp();
            }
            if(args.length>2)
            {
                System.out.println(args[1]);
                System.out.println(args[2]);
                switch (args[0])
                {
                    case "--wpcprocess":
                        Synchronizer.main(new String[]{args[1],args[2]});
                        break;
                    case "--initDirectory":
                        WPCUtils.initCache(args[1], args[2]);
                        break;
                    default:
                        printHelp();
                        break;
                }
            }
            return;
        }
        printHelp();
    }
    
    private static void printHelp()
    {
        System.out.println("Cmdline usage of WPC-Mgr");
        System.out.println("wpc-mgr.jar [mode] <values>");
        System.out.println("Modes and its values");
        System.out.println("--wpcprocess : Processes the given cacheDictory");
        System.out.println("usage: --wpcprocess P:\\ath\\to\\CacheDir screenWidthxScreenHeight");
        System.out.println("--initDirectory : initializes a CacheDirectory for being used by wpcprocess");
        System.out.println("P:\\ath\\to\\CacheDir");
        System.out.println("T:\\arged\\Directory\\Of\\ProcessedFiles");
        System.out.println("No parameter:");
        System.out.println("currently help; later :starts in GUI-Mode to manage the lt opened Cache");
        
        
    }
}
