Exemplo n.º 1
0
        public static Process StartTable(PinballSystem system, PinballTable table)
        {
            var proc = new Process();

            proc.StartInfo.FileName       = GetSystemPath(system);
            proc.StartInfo.Arguments      = GetSystemParameters(system, table);
            proc.StartInfo.WindowStyle    = ProcessWindowStyle.Minimized;
            proc.StartInfo.CreateNoWindow = true;
            proc.Start();
            return(proc);
        }
Exemplo n.º 2
0
        public static string GetSystemParameters(PinballSystem system, PinballTable table)
        {
            //Replace [TABLENAME]
            var regex = new Regex(@"\[TABLENAME\]");
            var param = regex.Replace(system.Parameters, table.Name);

            //Replace [SYSTEMPATH]
            regex = new Regex(@"\[SYSTEMPATH\]");
            param = regex.Replace(param, system.WorkingPath);

            return(param);
        }
Exemplo n.º 3
0
 public static string GetSystemPath(PinballSystem system)
 {
     return($@"{system.WorkingPath}\{system.Executable}");
 }