private void Button_Remove(object sender, RoutedEventArgs e) { HackData a = DataGrid.SelectedItem as HackData; HackDataList.Remove(a); HackDateListSave(HackDataList); dataBinding(); }
private void Button_OpenEAWeb(object sender, RoutedEventArgs e) { InfoWindows a; HackData data = DataGrid.SelectedItem as HackData; if (data.HackEAID == null) { MessageBox.Show("该档案为离线档案,只能通过名字检索打开对方资料页,如果对方改名,将无法正确访问主页"); eahttp.NameGetID(data.HackName); a = new InfoWindows(eahttp.IDgetLink(eahttp.HackerEAID)); eahttp.HackerEAID = null; } else { a = new InfoWindows(eahttp.IDgetLink(data.HackEAID)); } a.Show(); a.WindowState = WindowState.Normal; a.ShowInTaskbar = true; }
public string AllToComment(HackData hackData) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("Cheater's in-" + hackData.Game + ": "); stringBuilder.AppendLine("--------"); foreach (string a in hackData.HackCheckType) { stringBuilder.AppendLine("- " + a); } stringBuilder.AppendLine("--------"); if (hackData.Class != null & hackData.Weapon != null & hackData.Map != null & hackData.K != null & hackData.D != null) { stringBuilder.AppendLine("Related Information:"); } if (hackData.Map != null) { stringBuilder.AppendLine("Map: " + hackData.Map); } if (hackData.Class != null) { stringBuilder.AppendLine("Class: " + hackData.Class); } if (hackData.Weapon != null) { stringBuilder.AppendLine("Use: " + hackData.Weapon); } if (hackData.K != null) { stringBuilder.AppendLine("Kill: " + hackData.K); } if (hackData.D != null) { stringBuilder.AppendLine("Death: " + hackData.D); } return(stringBuilder.ToString()); }
/// <summary> /// 举报至EA按钮被点击时 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Report_But_Click(object sender, RoutedEventArgs e) { TextProcessing a = new TextProcessing(); if (HackName.Text == "") { return; } if (((TextBlock)((Button)sender).Content).Text == "生成并复制举报文本") { List <string> EnCheckTypesList = new List <string>(); foreach (string aaa in CheckTypesList) { EnCheckTypesList.Add(CHENDATA.Games[GameName].CheckTypes[aaa].Name); } string EnGame = CHENDATA.Games[GameName].Name; string EnWeaponList = CHENDATA.Games[GameName].Arms[GameClass.Text].EquipmentSets[WeaponClass.Text].Equipments[WeaponList.Text].Name; string EnClass = CHENDATA.Games[GameName].Arms[GameClass.Text].Name; string EnMap = CHENDATA.Games[GameName].Maps[GameMap.Text].Name; Clipboard.SetText(a.AllToComment(EnGame, EnCheckTypesList, EnClass, EnWeaponList, EnMap, K.Text, D.Text)); HackData Hdata = new HackData(); Hdata.Key = HackDataList.Count + 1; Hdata.NameList.Add(HackName.Text); Hdata.HackEAID = null; Hdata.HackCheckType = CheckTypesList; Hdata.Game = GameName; Hdata.Class = GameClass.Text; Hdata.Map = GameMap.Text; Hdata.K = K.Text; Hdata.D = D.Text; Hdata.PlayerName = "未登陆账户"; Hdata.PlayerEAID = null; Hdata.ReportTime = eahttp.GetNetDateTime(); Hdata.SaveInfo = "离线档案"; Hdata.IsUpToServer = "未上传"; Hdata.IsBan = "未检测"; HackDataList.Add(Hdata); HackDateListSave(HackDataList); dataBinding(); MessageBox.Show("文本已经复制到粘贴板"); } else { if (!IDCheck()) { return; } HackData Hdata = new HackData(); Hdata.Key = HackDataList.Count + 1; Hdata.NameList.Add(HackName.Text); Hdata.HackEAID = eahttp.HackerEAID; Hdata.HackCheckType = CheckTypesList; Hdata.Game = GameName; Hdata.Class = GameClass.Text; Hdata.Map = GameMap.Text; Hdata.K = K.Text; Hdata.D = D.Text; Hdata.PlayerName = eahttp.PlayerName; Hdata.PlayerEAID = eahttp.PlayerEAID; Hdata.ReportTime = eahttp.GetNetDateTime(); Hdata.SaveInfo = "在线档案"; Hdata.IsUpToServer = "未上传"; Hdata.IsBan = "未检测"; HackDataList.Add(Hdata); HackDateListSave(HackDataList); dataBinding(); List <string> EnCheckTypesList = new List <string>(); foreach (string aaa in CheckTypesList) { EnCheckTypesList.Add(CHENDATA.Games[GameName].CheckTypes[aaa].Name); } string EnGame = CHENDATA.Games[GameName].Name; string EnWeaponList = CHENDATA.Games[GameName].Arms[GameClass.Text].EquipmentSets[WeaponClass.Text].Equipments[WeaponList.Text].Name; string EnClass = CHENDATA.Games[GameName].Arms[GameClass.Text].Name; string EnMap = CHENDATA.Games[GameName].Maps[GameMap.Text].Name; bool end = eahttp.ReportCheat(a.AllToComment(EnGame, EnCheckTypesList, EnClass, EnWeaponList, EnMap, K.Text, D.Text)); if (end) { MessageBox.Show("举报成功!"); } else { MessageBox.Show("举报失败!"); } } }