private void StopCaptureButton_Click(object sender, RoutedEventArgs e) { //GameDataContext context = new GameDataContext(); //var list = context.PlayerInfos.ToList(); //int count = 0; //foreach (var item in list) //{ // count = count + int.Parse(item.UGold) + int.Parse(item.Gold); //} //Console.WriteLine(count); //Console.ReadLine(); CaptureService.GetInstance().Shutdown(); }
private void Button_Click(object sender, RoutedEventArgs e) { Debug.WriteLine("SharpPcap版本:" + SharpPcap.Version.VersionString); int i = 0; if (File.Exists(@"E:\nox\Nox\bin\nox_adb.exe")) { i = 0; } if (File.Exists(@"E:\Nox\bin\nox_adb.exe")) { i = 1; } CaptureService.GetInstance().StartCapture(i, "host " + SoftContext.ServerIp); }
private async System.Threading.Tasks.Task MainWindow_Loaded(object sender, RoutedEventArgs e) { try { // GameLogin game = new GameLogin("huang77", "huang77"); //game.Login(PlatformLogin.Platform.楚游_070703sy); } catch (Exception ex) { Debug.WriteLine(ex.Message); } //初始化大漠对象,注册,新建一个大漠对象 OperationResult initResult = SoftContext.Initialize(); if (!initResult.Successed) { await SoftContext.ShowMessageAsync("初始化失败", initResult.Message); SoftContext.RunStatus = SoftRunStatus.StartFail; Locator.Main.StatusBar = $"初始化失败:{initResult.Message}"; return; } else { Debug.WriteLine("SharpPcap版本:" + SharpPcap.Version.VersionString); int i = 0; if (File.Exists(@"E:\nox\Nox\bin\nox_adb.exe")) { i = 0; } if (File.Exists(@"E:\Nox\bin\nox_adb.exe")) { i = 0; } CaptureService.GetInstance().StartCapture(i, "host " + SoftContext.ServerIp); Locator.Main.StatusBar = "准备就绪"; return; } }