예제 #1
0
        /// <summary>
        /// Trees the clean.
        /// </summary>
        /// <param name="delete">if set to <c>true</c> [delete].</param>
        /// <returns></returns>
        internal string TreeClean(bool delete)
        {
            string        errorMessage;
            StringBuilder output = new StringBuilder();

            try
            {
                StringBuilder arguments = new StringBuilder();
                arguments.Append("treeclean");
                if (delete)
                {
                    arguments.Append(" -delete");
                }

                StringBuilder cmdBuilder = new StringBuilder();
                cmdBuilder.Append("\"" + tfptLocation + "\"");
                cmdBuilder.Append(" ");
                cmdBuilder.Append(arguments.ToString());

                CreateBatchFile(cmdBuilder);
                output.Append(CmdLine.Run(BATCH_FILE, string.Empty, out errorMessage));
                output.Append((string.IsNullOrEmpty(errorMessage) ? string.Empty : errorMessage));
            }
            catch (CommandLineException ex)
            {
                output.Append(ex.Message);
            }

            return(output.ToString());
        }
예제 #2
0
        /// <summary>
        /// Processes the command.
        /// </summary>
        /// <param name="command">The command.</param>
        private void ProcessCommand(string command)
        {
            string errorMessage;

            output = new StringBuilder();

            try
            {
                output.Append(CmdLine.Run(BATCH_FILE, string.Empty, out errorMessage));
                output.Append((string.IsNullOrEmpty(errorMessage) ? string.Empty : errorMessage));
            }
            catch (CommandLineException ex)
            {
                output.Append(ex.Message);
            }
        }