Example #1
0
        protected override bool XStartProgram(XInput xargs, out XProgram xprogram)
        {
            bool bRes = true;

            xprogram = null;
            bRes     = xargs.XRead();
            if (bRes)
            {
                List <string> args = null;
                bRes = xargs.XReadStrings(out args);
                if (bRes)
                {
                    Process proc = new Process();
                    proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
                    //proc.StartInfo.FileName = xargs.XFirst + ".bat";
                    proc.StartInfo.FileName        = "dotnet";
                    proc.StartInfo.UseShellExecute = false;
                    proc.StartInfo.CreateNoWindow  = false;
                    proc.StartInfo.Arguments       = xargs.XFirst + ".dll " + string.Join(" ", args);
                    bRes = proc.Start();
                    if (bRes)
                    {
                        CSProgram program = new CSProgram();
                        program.Process = proc;
                        xprogram        = program;
                    }
                }
            }
            return(bRes);
        }
Example #2
0
        static void Main(string[] args)
        {
            CSProgram cs    = new CSProgram();
            XArgs     xargs = new XArgs(args);

            cs.XMain(xargs);
        }