Exemplo n.º 1
0
        private void unpackCommandline()
        {
            string cmdLn = "";

            foreach (string arg in Environment.GetCommandLineArgs())
            {
                cmdLn += arg;
            }

            if (cmdLn.IndexOf('|') == -1)
            {
                called = false;
                info info = new info();
                info.ShowDialog();
                Close();
            }


            string[] tmpCmd = cmdLn.Split('|');

            for (int i = 1; i < tmpCmd.GetLength(0); i++)
            {
                if (tmpCmd[i] == "downloadFile")
                {
                    downloadFile = tmpCmd[i + 1];
                }
                if (tmpCmd[i] == "URL")
                {
                    URL = tmpCmd[i + 1];
                }
                if (tmpCmd[i] == "destinationFolder")
                {
                    destinationFolder = tmpCmd[i + 1];
                }
                if (tmpCmd[i] == "processToEnd")
                {
                    processToEnd = tmpCmd[i + 1];
                }
                if (tmpCmd[i] == "postProcess")
                {
                    postProcessFile = tmpCmd[i + 1];
                }
                if (tmpCmd[i] == "command")
                {
                    postProcessCommand += @" /" + tmpCmd[i + 1];
                }
                i++;
            }
        }
Exemplo n.º 2
0
        private void unpackCommandline()
        {
            string cmdLn = "";

            foreach (string arg in Environment.GetCommandLineArgs())
            {
                cmdLn += arg;

            }

            if (cmdLn.IndexOf('|') == -1)
            {
                called = false;
                info info = new info();
                info.ShowDialog();
                Close();
            }

            string[] tmpCmd = cmdLn.Split('|');

            for (int i = 1; i < tmpCmd.GetLength(0); i++)
            {
                if (tmpCmd[i] == "downloadFile") downloadFile = tmpCmd[i + 1];
                if (tmpCmd[i] == "URL") URL = tmpCmd[i + 1];
                if (tmpCmd[i] == "destinationFolder") destinationFolder = tmpCmd[i + 1];
                if (tmpCmd[i] == "processToEnd") processToEnd = tmpCmd[i + 1];
                if (tmpCmd[i] == "postProcess") postProcessFile = tmpCmd[i + 1];
                if (tmpCmd[i] == "command") postProcessCommand += @" /" + tmpCmd[i + 1];
                i++;
            }
        }