我需要连接一个WPF项目和一个Windows游戏项目。
我有一个项目做Windows游戏和另一个项目做WPF。
我需要通过单击WPF中的一个按钮从Game1项目中打开DemoScene。
这是在WPF项目中按一下按钮.
私有空Playgame_Click(对象发送方,RoutedEventArgs e) {
System.Diagnostics.Process.Start(i don't know how to put on this);
}我该怎么做?(我是初学者)
发布于 2013-09-06 04:24:44
System.Diagnostics.Process.Start(@"c:\game\Game1.exe");在你的道路上尝试以上的方法。
这里有更多信息:http://msdn.microsoft.com/en-us/library/53ezey2s.aspx
发布于 2013-09-06 04:38:53
将您的两个项目放在同一个文件夹中,例如,在WPF应用程序文件夹中,存在一个路径"game\Game1.exe“。然后,您可以在WPF应用程序按钮中尝试下面的代码,单击event。
System.Diagnostics.Process.Start(AppDomain.CurrentDomain.StartupPath + "game\\Game1.exe");https://stackoverflow.com/questions/18649844
复制相似问题