private static string Build(Parameters p) { List<ArgModel> args = p.ConsoleArgs(); StringBuilder sb = new StringBuilder(); foreach (var arg in args) { sb.AppendFormat(" {0}", arg.ToString()); } return sb.ToString(); }
private void Bind() { parameter = new Parameters(); parameter.Console = true; parameter.Insecure = true; parameter.Steam = true; parameter.Lan = true; parameter.LobbyOnly = true; parameter.Difficulty = 1; parameter.MaxPlayers = 8; parameter.Physcannon = true; parameter.Cheats = true; DataContext = parameter; MapList.ItemsSource = DataHelper.LoadMaps(); }
public static void Execute(Parameters p) { string target = string.Format("{0}\\{1}",Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), Parameters.TargetName); string arguments = Build(p); new Thread(() => _Execute(target,arguments)).Start(); }