Ejemplo n.º 1
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     TextProcessing a  = new TextProcessing();
     string         c  = a.ToString(CheckTypesList);
     List <string>  aa = a.ToList(c);
 }
Ejemplo n.º 2
0
        /// <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("举报失败!");
                }
            }
        }