using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Threading;
using System.Collections.Generic;
using System.Threading;

namespace 简单程序__20180817__1
{
#region 创建宠物
//限定宠物性别
public enum sex
{
公, 母
}

//狗狗种类
public enum DogBreed
{藏獒, 西伯利亚雪橇犬, 卷毛比雄犬, 边境牧羊犬, 吉娃娃, 斗牛犬,北京狮子狗, 西施犬, 哈叭狗, 冠毛狗, 西藏狮子犬, 小曼彻斯特犬, 猎狐犬,威尔斯柯基犬, 可卡犬, 格备犬, 拉萨狮子狗, 法国玩具贵宾犬, 博美犬, 腊肠犬, 马耳他犬,中华田园犬, 结束
}
//猫猫品种
public enum CatBreed
{挪威森林猫, 安哥拉猫, 金吉拉猫, 英国短毛猫, 美国短毛猫, 欧洲短毛猫, 东方短毛猫, 暹罗猫, 卷毛猫,哈瓦那猫, 新加坡猫, 曼岛猫, 埃及猫, 孟加拉猫, 苏格兰折耳猫, 美国卷耳猫, 加州闪亮猫, 加拿大无毛猫,日本短尾猫, 呵叻猫, 阿比西尼亚猫, 孟买猫, 俄罗斯蓝猫,中华大花猫, 结束
}//乌龟品种
public enum TortoiseBreed
{水龟, 泥龟, 箱龟, 巴西龟, 象龟, 乌龟, 地龟, 星点水龟, 星龟, 蛛网陆龟,安布闭壳龟, 饼干龟, 鳄鱼龟, 黄喉拟水龟, 黄缘盒龟, 金头龟, 猪鼻龟,中华花龟, 结束
}//熊猫种类
public enum PandeBreed
{中华熊猫, 功夫熊猫, 结束
}//派生类 狗
public class Dog : CreatPet
{public DogBreed _dogBreed;//狗狗种类public Dog(){}}//派生类 猫
public class Cat : CreatPet
{public CatBreed _catBreed;//猫猫种类public Cat(){}
}//宠物
public class CreatPet
{private bool bo = false;private string _petName;//宠物名字private sex _petSex;//宠物性别private int _hierarchy;//等级private int _EXP;//经验值private int _ATK;//攻击力private int _DEF;//防御力private int _HP;//血量值//品种private int _appetite;//食量private int _PetPrice;//宠物价格//后台管理验证public void backstaGeverify(){Console.WriteLine("请输入后台管理密码");string possword = Console.ReadLine();if (possword == "zsq520"){Function();}else{Quit();}}//功能private void Function(){Console.WriteLine("****************");Console.WriteLine("*  请选择操作  *");Console.WriteLine("*  1.创建宠物  *");Console.WriteLine("*  2.删除宠物  *");Console.WriteLine("*  3.创建怪物  *");Console.WriteLine("*  4.删除怪物  *");Console.WriteLine("*  5.创建宝箱  *");Console.WriteLine("*  6.删除宝箱  *");Console.WriteLine("*  0.退出      *");Console.WriteLine("****************");while (true){int n = new CreateID().InputDigit();switch (n){case 1: PetKing(); break;case 2: DeleteKing(); break;case 3: CreatMonster(); break;case 4: RemoveMonster(); break;case 5: CreatGift(); break;case 6: RemoveGift(); break;case 0: Quit(); break;default:Console.WriteLine("输入有误,请重新输入");break;}}}//选择宠物种类private void PetKing(){Console.WriteLine("************************");Console.WriteLine("*    请选择宠物种类    *");Console.WriteLine("*       1.小狗         *");Console.WriteLine("*       2.小猫         *");Console.WriteLine("*       3.熊猫         *");Console.WriteLine("*       4.乌龟         *");Console.WriteLine("*       5.返回         *");Console.WriteLine("************************");int n = int.Parse(Console.ReadLine());switch (n){case 1:CreatePets(n, "dog"); break;case 2:CreatePets(n, "cat"); break;case 3:CreatePets(n, "pande"); break;case 4:CreatePets(n, "tortoise"); break;case 5:Function(); break;default:Console.WriteLine("输入错误,请重新输入");PetKing();break;}}//删除宠物种类private void DeleteKing(){Console.WriteLine("************************");Console.WriteLine("*    请选择宠物种类    *");Console.WriteLine("*       1.小狗         *");Console.WriteLine("*       2.小猫         *");Console.WriteLine("*       3.熊猫         *");Console.WriteLine("*       4.乌龟         *");Console.WriteLine("*       5.返回         *");Console.WriteLine("************************");int n = int.Parse(Console.ReadLine());switch (n){case 1:RemovePet("dog"); break;case 2:RemovePet("cat"); break;case 3:RemovePet("pande"); break;case 4:RemovePet("tortoise"); break;case 5:Function(); break;default:Console.WriteLine("输入错误,请重新输入");PetKing();break;}}/// <summary>/// 创建宠物/// </summary>//创建宠物private void CreatePets(int num, string petStr){bo = File.Exists(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt");if (bo == false){FileStream file = File.Create(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt");file.Dispose();}string[] str1 = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt");//姓名:{1}  年龄:{2}岁  性别:{3}  体重:{4}kg  身高:{5}cm   品种:{6}  价格:{7}金"CreatPet pet = new CreatPet();//实例化宠物对象Console.WriteLine("创建{0}宠物", petStr);//输入宠物名字Console.WriteLine("请输入宠物姓名:");pet._petName = Console.ReadLine();if (str1.Length == 0){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", pet._petName);//在原有文本文件上添加}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._petName);//在原有文本文件上添加}//选择宠物性别Console.WriteLine("选择宠物性别:");CreateSex(petStr);//输入宠物等级Console.WriteLine("请输入宠物等级:(1-5)");pet._hierarchy = int.Parse(Console.ReadLine());File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._hierarchy.ToString());//在原有文本文件上添加//宠物经验值Console.WriteLine("宠物经验值:");pet._EXP = 0;File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._EXP.ToString());//在原有文本文件上添加//输入宠物攻击力Console.WriteLine("输入宠物攻击力:(1-100)");pet._ATK = int.Parse(Console.ReadLine());File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._ATK.ToString());//在原有文本文件上添加//输入宠物防御力Console.WriteLine("输入宠物防御力:(1-100)");pet._DEF = int.Parse(Console.ReadLine());File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._DEF.ToString());//在原有文本文件上添加//输入宠物血量值Console.WriteLine("输入宠物血量值:(10-500)");pet._HP = int.Parse(Console.ReadLine());File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._HP.ToString());//在原有文本文件上添加//选择宠物品种Console.WriteLine("选择宠物品种");switch (num){case 1:dogKing(petStr); break;case 2:catKing(petStr); break;case 3:pandeKing(petStr); break;case 4:tortoiseKing(petStr); break;}//输入宠物食量pet._appetite = pet._hierarchy;Console.WriteLine("宠物食量为:{0}", pet._appetite);File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._appetite.ToString());//在原有文本文件上添加//输入宠物价格           pet._PetPrice = pet._hierarchy * pet._HP;Console.WriteLine("宠物金额w为:{0}", pet._PetPrice);File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + pet._PetPrice);//在原有文本文件上添加ChooseOperation();//每创建一只宠物成功之后进入选择           }//创建完成后选择操作private void ChooseOperation(){Console.WriteLine("********************");Console.WriteLine("*     选择操作     *");Console.WriteLine("*     1.继续创建   *");Console.WriteLine("*     2.退出       *");Console.WriteLine("********************");for (int i = 0; true; i++){int n = int.Parse(Console.ReadLine());switch (n){case 1: PetKing(); bo = true; break;case 2: Quit(); bo = true; break;default:Console.WriteLine("输入错误,请重新输入");break;}if (bo == true){break;}}}//选择宠物性别private void CreateSex(string petStr){Console.WriteLine("************");Console.WriteLine("*   1.公   *");Console.WriteLine("*   2.母   *");Console.WriteLine("************");for (int i = 0; true; i++){int n = int.Parse(Console.ReadLine());if (n == 1 || n == 2){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + (sex)(n - 1));//在原有文本文件上添加bo = true;}if (bo == true){break;}}}//狗狗种类private void dogKing(string petStr){int num = 0;Console.WriteLine("--------------------");for (int i = 0; true; i++){if (((DogBreed)i) == DogBreed.结束){break;}num++;Console.WriteLine("{0}.{1}", i + 1, (DogBreed)i);}Console.WriteLine("--------------------");Console.WriteLine("请输入对应数字");for (int i = 0; true; i++){int n = int.Parse(Console.ReadLine());if (n > 0 && n <= num){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + (DogBreed)(n - 1));//在原有文本文件上添加bo = true;}else{Console.WriteLine("输入错误,请重新输入");}if (bo == true){break;}}}//小猫种类private void catKing(string petStr){int num = 0;Console.WriteLine("--------------------");for (int i = 0; true; i++){if (((CatBreed)i) == CatBreed.结束){break;}num++;Console.WriteLine("{0}.{1}", i + 1, (CatBreed)i);}Console.WriteLine("--------------------");Console.WriteLine("请输入对应数字");for (int i = 0; true; i++){int n = int.Parse(Console.ReadLine());if (n > 0 && n <= num){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + (CatBreed)(n - 1));//在原有文本文件上添加bo = true;}else{Console.WriteLine("输入错误,请重新输入");}if (bo == true){break;}}}//熊猫种类private void pandeKing(string petStr){int num = 0;Console.WriteLine("--------------------");for (int i = 0; true; i++){if (((PandeBreed)i) == PandeBreed.结束){break;}num++;Console.WriteLine("{0}.{1}", i + 1, (PandeBreed)i);}Console.WriteLine("--------------------");Console.WriteLine("请输入对应数字");for (int i = 0; true; i++){int n = int.Parse(Console.ReadLine());if (n > 0 && n <= num){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + (PandeBreed)(n - 1));//在原有文本文件上添加bo = true;}else{Console.WriteLine("输入错误,请重新输入");}if (bo == true){break;}}}//乌龟种类private void tortoiseKing(string petStr){int num = 0;Console.WriteLine("--------------------");for (int i = 0; true; i++){if (((TortoiseBreed)i) == TortoiseBreed.结束){break;}num++;Console.WriteLine("{0}.{1}", i + 1, (TortoiseBreed)i);}Console.WriteLine("--------------------");Console.WriteLine("请输入对应数字");for (int i = 0; true; i++){int n = int.Parse(Console.ReadLine());if (n > 0 && n <= num){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt", "\n" + (TortoiseBreed)(n - 1));//在原有文本文件上添加bo = true;}else{Console.WriteLine("输入错误,请重新输入");}if (bo == true){break;}}}/// <summary>/// 修改宠物/// </summary>//删除宠物public void RemovePet(string petName){string[] PetStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petName + ".txt");PetList(petName);Console.WriteLine("请选择要删除的宠物序号");while (true){int n = new CreateID().InputDigit();if (n <= petName.Length && n > 0){for (int i = n * 10; i < PetStr.Length; i++){PetStr[i - 10] = PetStr[i];}PetRefresh(PetStr, petName);Console.WriteLine("删除成功");Function();}else{Console.WriteLine("输入错误");}}}//宠物列表public void PetList(string petName){string[] PetStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petName + ".txt");int n = 0;for (int i = 0; i < PetStr.Length; i += 10){n++;Console.WriteLine("{0}:姓名;{1}  性别:{2}  等级:{3}  经验值:{4}  攻击力:{5}  防御力:{6}  血量值:{7}  品种:{8}   食量;{9}   价格:{10}", n, PetStr[i], PetStr[i + 1], PetStr[i + 2], PetStr[i + 3], PetStr[i + 4], PetStr[i + 5], PetStr[i + 6], PetStr[i + 7], PetStr[i + 8], PetStr[i + 9]);}}//宠物刷新public void PetRefresh(string[] PetStr, string petName){for (int i = 0; i < PetStr.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petName + ".txt", PetStr[i]);}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petName + ".txt", "\n" + PetStr[i]);}}}//创建怪物public void CreatMonster(){bool bo1 = File.Exists(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt");if (bo1 == false){FileStream file = File.Create(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt");file.Dispose();}string[] Str = new string[5];Console.WriteLine("请输入怪物名称:");Str[0] = Console.ReadLine();Console.WriteLine("请输入怪物等级(1--10):");Str[1] = Console.ReadLine();Console.WriteLine("请输入怪物攻击力(10--500):");Str[2] = Console.ReadLine();Console.WriteLine("请输入怪物防御力(1--500):");Str[3] = Console.ReadLine();Console.WriteLine("请输入怪物血量值(100--1000):");Str[4] = Console.ReadLine();Console.WriteLine("是否创建(是或者否):");bool bo = new CreateID().IsAffirm();if (bo){for (int i = 0; i < Str.Length; i++){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt", "\n" + Str[i]);}Console.WriteLine("创建成功!");MonsterSort();//创建后排序Function();}}//删除怪物public void RemoveMonster(){string[] Monster = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt");int n = 0;for (int i = 0; i < Monster.Length; i += 5){n++;Console.WriteLine("{0}: 姓名;{1}  等级:{2}  攻击力:{3}  防御力:{4}  血量值:{5}", n, Monster[i], Monster[i + 1], Monster[i + 2], Monster[i + 3], Monster[i + 4]);Console.WriteLine();}while (true){int num = new CreateID().InputDigit();if (num > 0 && num <= Monster.Length){for (int i = n * 10; i < Monster.Length; i++){Monster[i - 10] = Monster[i];}MonsterRefresh(Monster);Console.WriteLine("删除成功!!!");Function();}}}//怪物排序sortpublic void MonsterSort(){string[] Monster = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt");for (int i = 0; i < Monster.Length; i += 5){for (int j = i; j < Monster.Length; j += 5){if (int.Parse(Monster[i + 1]) > int.Parse(Monster[j + 1])){string[] Str = new string[5];for (int k = 0; k < 5; k++){Str[k] = Monster[i + k];}for (int k = 0; k < 5; k++){Monster[i + k] = Monster[j + k];}for (int k = 0; k < 5; k++){Monster[j + k] = Str[k];}}else if (int.Parse(Monster[i + 1]) == int.Parse(Monster[j + 1])){if (int.Parse(Monster[i + 2]) > int.Parse(Monster[j + 2])){string[] Str = new string[5];for (int k = 0; k < 5; k++){Str[k] = Monster[i + k];}for (int k = 0; k < 5; k++){Monster[i + k] = Monster[j + k];}for (int k = 0; k < 5; k++){Monster[j + k] = Str[k];}}}}}MonsterRefresh(Monster);}//怪物刷新public void MonsterRefresh(string[] Monster){for (int i = 0; i < Monster.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt", Monster[i]);}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt", "\n" + Monster[i]);}}}//创建宝物public void CreatGift(){bool bo1 = File.Exists(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt");if (bo1 == false){FileStream file = File.Create(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt");file.Dispose();}string[] Str = new string[2];Console.WriteLine("请输入宠爱药丸数量:(1--10)");Str[0] = Console.ReadLine();Console.WriteLine("请输入金币数量:(10--100)");Str[1] = Console.ReadLine();bool bo = new CreateID().IsAffirm();if (bo){for (int i = 0; i < 2; i++){File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt", "\n" + Str[i]);}GiftSort();Console.WriteLine("创建成功!!!");Function();}}//删除宝物public void RemoveGift(){string[] GiftStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt");int n1 = 0;for (int i = 1; i < GiftStr.Length; i += 2){n1++;Console.WriteLine("{0}: 药丸:{1}  金币:{2}", n1, GiftStr[i], GiftStr[i + 1]);Console.WriteLine();}Console.WriteLine("请输入所要删除宝物序号");while (true){int n = new CreateID().InputDigit();if (n > 0 && n <= GiftStr.Length){for (int i = n * 2; i < GiftStr.Length; i++){GiftStr[i - 2] = GiftStr[i];}GiftRefresh(GiftStr);Console.WriteLine("删除成功!!");Function();}}}//宝物排序public void GiftSort(){string[] GiftStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt");for (int i = 1; i < GiftStr.Length; i += 2){for (int j = i; j < GiftStr.Length; j += 2){if (int.Parse(GiftStr[i]) > int.Parse(GiftStr[j])){string[] strss = new string[2];for (int k = 0; k < 2; k++){strss[k] = GiftStr[i + k];}for (int k = 0; k < 2; k++){GiftStr[i + k] = GiftStr[j + k];}for (int k = 0; k < 2; k++){GiftStr[j + k] = strss[k];}}else if (int.Parse(GiftStr[i]) == int.Parse(GiftStr[j])){if (int.Parse(GiftStr[i + 1]) > int.Parse(GiftStr[j + 1])){string[] strss = new string[2];for (int k = 0; k < 2; k++){strss[k] = GiftStr[i + k];}for (int k = 0; k < 2; k++){GiftStr[i + k] = GiftStr[j + k];}for (int k = 0; k < 2; k++){GiftStr[j + k] = strss[k];}}}}}GiftRefresh(GiftStr);//排序完刷新}//刷新宝物public void GiftRefresh(string[] GiftStr){for (int i = 0; i < GiftStr.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt", GiftStr[i]);}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt", "\n" + GiftStr[i]);}}}//退出private void Quit(){Console.WriteLine("退出成功");Environment.Exit(0);}
}//修改宠物#endregionpublic class Vection2
{public int x;public int y;
}public class World
{}//创建身份
public class CreateID
{public bool bo = false;//界面public void Inter(){Console.WriteLine("*********************************");Console.WriteLine("*        欢迎来到本系统         *");Console.WriteLine("*          请选择操作           *");Console.WriteLine("*          1.登录账户           *");Console.WriteLine("*          2.注册账户           *");Console.WriteLine("*          3.找回密码           *");Console.WriteLine("*          4.账户解锁           *");Console.WriteLine("*          5.退出               *");Console.WriteLine("*********************************");for (int i = 0; true; i++){int n = InputDigit();switch (n){case 1: Register(); break;case 2: Console.Clear(); RegisteredAaccount(); break;case 3: Console.Clear(); ForgotPassword(); break;case 4: Console.Clear(); Unlock(); break;case 5: Quit(); break;case 10086: new CreatPet().backstaGeverify(); break;default:Console.WriteLine("输入错误");break;}}}//登录成功后选择public void RegisterInter(string account){Console.WriteLine("*********************************");Console.WriteLine("*          请选择操作           *");Console.WriteLine("*          1.修改密码           *");Console.WriteLine("*          2.开始历程           *");Console.WriteLine("*          3.返回登录           *");Console.WriteLine("*          4.注销账户           *");Console.WriteLine("*          5.退出               *");Console.WriteLine("*********************************");int n = int.Parse(Console.ReadLine());switch (n){case 1: Console.Clear(); ChangePassword(account); break;case 2: Console.Clear(); new School().SchoolMap(account); ; break;case 3: Console.Clear(); Register(); break;case 4: Console.Clear(); CancelUser(account); break;case 5: Console.Clear(); Quit(); break;default:Console.WriteLine("输入错误");break;}}//修改密码后选择public void changePasswordInter(){Console.WriteLine("*********************************");Console.WriteLine("*         修改密码成功           *");Console.WriteLine("*          请选择操作           *");Console.WriteLine("*          1.返回主界面         *");Console.WriteLine("*          2.重新登录           *");Console.WriteLine("*          3.退出               *");Console.WriteLine("*********************************");for (int i = 0; true; i++){int n = int.Parse(Console.ReadLine());switch (n){case 1: Console.Clear(); Inter(); break;case 2: Console.Clear(); Register(); break;case 3: Console.Clear(); Quit(); break;default:Console.WriteLine("输入错误,请重新输入");break;}}}//登录失败public void LogonFailed(){Console.WriteLine("*********************************");Console.WriteLine("*          请选择操作           *");Console.WriteLine("*          1.重新登录           *");Console.WriteLine("*          2.注册账户           *");Console.WriteLine("*          3.找回密码           *");Console.WriteLine("*          4.退出               *");Console.WriteLine("*********************************");for (int i = 0; i < 3; i++){int n = int.Parse(Console.ReadLine());switch (n){case 1: Console.Clear(); Register(); break;case 2: Console.Clear(); RegisteredAaccount(); break;case 3: Console.Clear(); ForgotPassword(); break;case 4: Console.Clear(); Quit(); break;default:Console.WriteLine("输入错误,请重新输入");break;}if (2 - i == 0){Quit();}Console.WriteLine("您还有{0}次机会", 2 - i);}}//登录public void Register(){string account;//1.账号string password = "";//2.密码string sex;//3.性别string encrypted;//4.密保问题string result;//5.密保答案string photo;//6.手机号码//7.待定//8.待定//9.注册时间//10.账号锁 trueList<string> list = PlayerFilename();Console.WriteLine("请输入账号");for (int k = 0; k < 3; k++){account = Console.ReadLine();for (int i = 0; i < list.Count; i++){if (account == list[i]){string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");if (Convert.ToBoolean(AccountStr[9]) == true){for (int j = 0; j < 3; j++){Console.WriteLine("请输入密码");password = Console.ReadLine();if (AccountStr[1] == password){Console.WriteLine("登录成功!");Console.Clear();RegisterInter(account);}if (2 - j == 0){AccountStr[9] = "false";DeleteAndReinsertMessage(AccountStr, account);Console.WriteLine("输入错误超过三次,账号已被锁定,自动退出登录");LogonFailed();}else{Console.WriteLine("密码输入错误,请重新输入,还有{0}次机会", 2 - j);}}}else{Console.WriteLine("该账号已被锁定,请前往解锁");Inter();}}if (i == list.Count - 1){break;}}if (2 - k == 0){Console.WriteLine("输入错误超过三次,自动退出登录");LogonFailed();}else{Console.WriteLine("密码输入错误,请重新输入,还有{0}次机会", 2 - k);}}}//注册账户public void RegisteredAaccount(){List<string> playList = PlayerFilename();if (Directory.Exists(@"D:\AllMyLife\DataCenter\PlayerData")){}foreach (string content in Directory.GetFileSystemEntries(@"D:\AllMyLife\DataCenter\PlayerData"))//遍历玩家信息文件夹,找到文件夹所对应的子文件名{playList.Add(Path.GetFileNameWithoutExtension(content));}string account;//1.账号string password = "";//2.密码string sex;//3.性别string encrypted;//4.密保问题string result;//5.密保答案string photo;//6.手机号码string screeName;///7.网名//8.待定//9.注册时间//10.账号锁 truestring[] playInformation = new string[10];//1.生成随机账号           //account = RandomAccount(playList);playInformation[0] = RandomAccount(playList);Console.WriteLine("账号生成成功:{0}", playInformation[0]);//2.输入密码//password = CreatePassword();playInformation[1] = CreatePassword();Console.WriteLine("密码创建成功!");//3.选择性别//sex = ChangSex();playInformation[2] = ChangSex();Console.WriteLine("性别选择完成!");//4.选择密保问题//encrypted = Encrypted();playInformation[3] = Encrypted();Console.WriteLine("密保问题选择完成!");//5.输入密保答案Console.WriteLine("请输入密保问题答案");//result = Console.ReadLine();playInformation[4] = Console.ReadLine();Console.WriteLine("密保创建成功");//6.验证手机号//photo = VerifyPhone();playInformation[5] = VerifyPhone();//7.网名playInformation[6] = Screenname();//8.待定playInformation[7] = "待定";//9.注册时间playInformation[8] = DateTime.Now.ToLongDateString().ToString();//10.账户锁playInformation[9] = "true";Console.WriteLine("是否注册");bo = IsAffirm();if (bo){File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerData\" + playInformation[0] + ".txt", playInformation[0]);for (int i = 1; i < playInformation.Length; i++){File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerData\" + playInformation[0] + ".txt", "\n" + playInformation[i]);}Directory.CreateDirectory(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + playInformation[0]);//qwe为文件夹名称File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + playInformation[0] + @"\attribute.txt", "VIP0" + "\n" + "1" + "\n" + "20" + "\n" + "20" + "\n" + "20" + "\n" + "20" + "\n" + "20" + "\n" + "20" + "\n" + "20" + "\n" + "20");//人物属性File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + playInformation[0] + @"\backpack.txt", "1000" + "\n" + "1000" + "\n" + "500" + "\n" + "5" + "\n" + "500" + "\n" + "0" + "\n" + "0" + "\n" + "0" + "\n" + "0" + "\n" + "false");//人物背包File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + playInformation[0] + @"\RPGVection2.txt", "5" + "\n" + "19");//人物坐标Console.Clear();Console.WriteLine("注册成功!");Inter();}else{Console.Clear();Console.WriteLine("自动返回主界面");Inter();}}//修改密码public void ChangePassword(string account){string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");Console.WriteLine("请输入旧密码");for (int i = 0; i < 3; i++){string oldPassworld = Console.ReadLine();if (oldPassworld == AccountStr[1]){Console.WriteLine("请输入新密码");for (int j = 0; j < 3; j++){string newPassword = Console.ReadLine();Console.WriteLine("再次确认新密码");string newPassword1 = Console.ReadLine();if (newPassword == newPassword1){AccountStr[1] = newPassword;DeleteAndReinsertMessage(AccountStr, account);Console.Clear();Console.WriteLine("密码修改成功,请重新登陆");changePasswordInter();}if (2 - j == 0){Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("两次输入不相同,请重新输入,还有{0}次机会", 2 - j);}}}if (2 - i == 0){Console.Clear();Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("旧密码输入错误,请重新输入,还有{0}次机会", 2 - i);}}}//注销账户public void CancelUser(string account){string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");Console.WriteLine("请输入密保:“{0}” 的答案", AccountStr[3]);for (int i = 0; i < 3; i++){string result = Console.ReadLine();if (result == AccountStr[4]){for (int j = 0; j < 3; j++){int num = AuthorizedCode();Console.WriteLine("手机授权码{0}以发送至手机,请输入授权码", num);int num1 = 0;string num2 = Console.ReadLine();if (int.TryParse(num2, out num1) && num == int.Parse(num2)){bool bo = IsAffirm();if (bo){string HowSex = "";//注销宿舍床铺if (AccountStr[2] == "男"){HowSex = "DormitoryMan";}if (AccountStr[2] == "女"){HowSex = "DormitoryWoman";}string[] DormitoryStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\" + HowSex + @"\Vection2.txt");for (int k = 0; k < DormitoryStr.Length; k += 10){if (int.Parse(DormitoryStr[i + 2]) > 0){for (int m = 3 + i; m < 7 + m; j++){if (DormitoryStr[j] == AccountStr[6]){DormitoryStr[j] = "0";DormitoryStr[i + 2] = (float.Parse(DormitoryStr[i + 2]) - 1).ToString();new Dormitory().DormitoryVection2Refresh(account, DormitoryStr);break;}}break;}}File.Delete(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");Directory.Delete(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account, true);Console.Clear();Console.WriteLine("注销成功!自动返回主界面!");Inter();}else{Console.Clear();Console.WriteLine("已经取消注销");Inter();}}if (2 - j == 0){Console.Clear();Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("授权码输入错误,请重新输入,还有{0}次机会", 2 - j);}}}if (2 - i == 0){Console.Clear();Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("密保答案输入错误,请重新输入,还有{0}次机会", 2 - i);}}}//找回密码public void ForgotPassword(){List<string> list = PlayerFilename();Console.WriteLine("请输入账号");for (int i = 0; i < 3; i++){string account = Console.ReadLine();for (int j = 0; j < list.Count; j++){if (list[j] == account){Console.WriteLine("*********************************");Console.WriteLine("*          请选择操作           *");Console.WriteLine("*          1.密保找回           *");Console.WriteLine("*          2.手机号找回         *");Console.WriteLine("*          3.返回登录           *");Console.WriteLine("*          4.主界面             *");Console.WriteLine("*          5.退出               *");Console.WriteLine("*********************************");while (true){int n = InputDigit();switch (n){case 1: Console.Clear(); EncryptedBackPassword(account); break;case 2: Console.Clear(); PhotoBackPassword(account); break;case 3: Console.Clear(); Register(); break;case 4: Console.Clear(); Inter(); break;case 5: Console.Clear(); Quit(); break;default:Console.WriteLine("输入错误");break;}}}}if (2 - i == 0){Console.WriteLine("账号输入错误超过三次,返回主界面");Inter();}else{Console.WriteLine("账号输入错误,请重新输入,还有{0}次机会", 2 - i);}}}//密保找回public void EncryptedBackPassword(string account){string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");Console.WriteLine("密保问题:{0}", AccountStr[3]);Console.WriteLine("请输入密保答案:");for (int i = 0; i < 3; i++){string result = Console.ReadLine();if (result == AccountStr[4]){Console.WriteLine("请输入新密码");for (int j = 0; j < 3; j++){string newPassword = Console.ReadLine();Console.WriteLine("再次确认新密码");string newPassword1 = Console.ReadLine();if (newPassword == newPassword1){AccountStr[1] = newPassword;DeleteAndReinsertMessage(AccountStr, account);Console.Clear();Console.WriteLine("密码修改成功,请从新登陆");changePasswordInter();}if (2 - j == 0){Console.Clear();Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("两次输入不相同,请重新输入,还有{0}次机会", 2 - j);}}}if (2 - i == 0){Console.Clear();Console.WriteLine("输入次数超过三次,自动返回主界面");Inter();}else{Console.WriteLine("密保答案输入错误,请重新输入,还有{0}次机会", 2 - i);}}}//手机号找回public void PhotoBackPassword(string account){string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");Console.WriteLine("请输入绑定手机号");for (int i = 0; i < 3; i++){string photoStr = Console.ReadLine();if (photoStr == AccountStr[5]){for (int k = 0; k < 3; k++){int num = AuthorizedCode();Console.WriteLine("授权码{0}已经发送至你的手机,请输入授权码", num);string num1 = Console.ReadLine();int num2 = 0;if (int.TryParse(num1, out num2) && int.Parse(num1) == num){Console.WriteLine("请输入新密码");for (int j = 0; j < 3; j++){string newPassword = Console.ReadLine();Console.WriteLine("再次确认新密码");string newPassword1 = Console.ReadLine();if (newPassword == newPassword1){AccountStr[1] = newPassword;DeleteAndReinsertMessage(AccountStr, account);Console.Clear();Console.WriteLine("密码修改成功,请重新登陆");changePasswordInter();}if (2 - j == 0){Console.Clear();Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("两次输入不相同,请重新输入,还有{0}次机会", 2 - j);}}}if (2 - k == 0){Console.WriteLine("输入错误超过三次,自动返回主界面");Inter();}else{Console.WriteLine("授权码输入错误,请重新输入,还有{0}次机会", 2 - k);}}}if (2 - i == 0){Console.Clear();Console.WriteLine("输入次数超过三次,自动返回主界面");Inter();}else{Console.WriteLine("手机号错误,请重新输入,还有{0}次机会", 2 - i);}}}//随机账号public string RandomAccount(List<string> playList){string account;while (true){Random rd = new Random();int n = rd.Next(8, 10);if (n == 8){account = (n.ToString()) + (rd.Next(10000000, 100000000).ToString());}else{account = (rd.Next(1, 4).ToString()) + (rd.Next(1, 6).ToString()) + (rd.Next(10000000, 100000000).ToString());}if (playList.Count == 0){return account;}else{for (int i = 0; i < playList.Count; i++){string[] str = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + playList[i] + ".txt");//每行读取if (account == str[0]){break;}if (i == playList.Count - 1){return account;break;}}}}}//创建密码public string CreatePassword(){string password;Console.WriteLine("创建密码,长度为8为,不能为纯数字");Console.WriteLine("请输入密码");while (true){password = Console.ReadLine();Console.WriteLine("请再次确认密码");string password1 = Console.ReadLine();if (password == password1){if (password.Length >= 8){int n = 0;int num;for (int i = 0; i < password.Length; i++){if (int.TryParse(password[i].ToString(), out num)){n++;}if (i == password.Length - 1 && n != password.Length){return password;}if (i == password.Length - 1 && n == password.Length){Console.WriteLine("密码不能用纯数字");break;}}}else{Console.WriteLine("密码长度小于8位");}}else{Console.WriteLine("两次密码不相同,请重新输入!");}}}//选择性别public string ChangSex(){Console.WriteLine("********");Console.WriteLine("* 1.男 *");Console.WriteLine("* 2.女 *");Console.WriteLine("********");Console.WriteLine("请选择性别");while (true){int n = InputDigit();switch (n){case 1: return "男"; break;case 2: return "女"; break;default:Console.WriteLine("输入错误,请重新选择");break;}}}//验证手机号public string VerifyPhone(){List<string> playList = PlayerFilename();Console.WriteLine("请输入手机号");//13 15 18while (true){string photoStr = Console.ReadLine();if (photoStr.Length == 11){if (int.Parse(photoStr[0].ToString()) == 1 && (int.Parse(photoStr[1].ToString()) == 3 || int.Parse(photoStr[1].ToString()) == 5 || int.Parse(photoStr[1].ToString()) == 8)){if (playList.Count == 0){return photoStr;}else{for (int i = 0; i < playList.Count; i++){string[] playerStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + playList[i] + ".txt");if (playerStr[5] == photoStr){break;}if (i == playList.Count - 1){return photoStr;}}}}else{Console.WriteLine("没有该形式手机号码,请重新输入!");}}else{Console.WriteLine("输入手机号码不正确,请重新输入");}}}//创建网名public string Screenname(){List<string> playList = PlayerFilename();Console.WriteLine("请输入网名:");while (true){string name = Console.ReadLine();if (playList.Count == 0){return name;}else{for (int i = 0; i < playList.Count; i++){string[] playerStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + playList[0] + ".txt");if (name == playerStr[6]){break;}if (i == playList.Count - 1){return name;}}Console.WriteLine("该网名已被注册,请重新输入");}}}//解锁public void Unlock(){List<string> list = PlayerFilename();Console.WriteLine("请输入已经被锁定账号");for (int m = 0; m < 3; m++){string account = Console.ReadLine();for (int k = 0; k < list.Count; k++){if (account == list[k]){string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");if (Convert.ToBoolean(AccountStr[9]) == false){Console.WriteLine("请输入密保:“{0}” 的答案", AccountStr[3]);for (int i = 0; i < 3; i++){string result = Console.ReadLine();if (result == AccountStr[4]){for (int j = 0; j < 3; j++){int num = AuthorizedCode();Console.WriteLine("手机授权码{0}以发送至手机,请输入授权码", num);int num1 = 0;string num2 = Console.ReadLine();if (int.TryParse(num2, out num1) && num == int.Parse(num2)){AccountStr[9] = "true";DeleteAndReinsertMessage(AccountStr, account);Console.WriteLine("解锁成功");Inter();}if (2 - j == 0){Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("授权码输入错误,请重新输入,还有{0}次机会", 2 - j);}}}if (2 - i == 0){Console.WriteLine("输入错误超过三次,自动退出");RegisterInter(account);}else{Console.WriteLine("密保答案输入错误,请重新输入,还有{0}次机会", 2 - i);}}}else{Console.WriteLine("该账号未被锁定");Inter();}}if (k == list.Count - 1){break;}}if (2 - m == 0){Console.WriteLine("输入次数超过三次,自动返回到主界面");}else{Console.WriteLine("账号输入错误,请重新输入,还有{0}次机会", 2 - m);}}}//退出public void Quit(){Console.WriteLine("退出成功");Environment.Exit(0);}//验证码public int AuthCode(){Random rand1 = new Random();int a = rand1.Next(1000, 9000);return a;}//密保问题public string Encrypted(){Console.WriteLine("*********************************");Console.WriteLine("*        请选择密保问题         *");Console.WriteLine("*         1.最崇拜的人          *");Console.WriteLine("*         2.最喜欢数字          *");Console.WriteLine("*         3.女友姓名            *");Console.WriteLine("*         4.初恋对象            *");Console.WriteLine("*********************************");string[] str = new string[] { "最崇拜的人", "最喜欢数字", "女友姓名", "初恋对象" };while (true){int n = InputDigit();if (n <= 4 && n >= 1){return str[n - 1];}else{Console.WriteLine("输入错误,请重新输入");}}}//产品授权码public int AuthorizedCode(){Random rand1 = new Random();return rand1.Next(100000, 999999);}//删除并重新插入(账号)public void DeleteAndReinsertMessage(string[] accountStr, string account){for (int i = 0; i < accountStr.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt", accountStr[i]);//在原有文本文件替换}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt", "\n" + accountStr[i]);//在原有文本文件上替换}}}//键盘输入数字public int InputDigit(){while (true){string str = Console.ReadLine();int n = 0;if (int.TryParse(str, out n)){return n;Console.WriteLine(n);}else{Console.WriteLine("请输入数字");}}}//获取玩家文件名public List<string> PlayerFilename(){List<string> playList = new List<string>();foreach (string content in Directory.GetFileSystemEntries(@"D:\AllMyLife\DataCenter\PlayerData"))//遍历玩家信息文件夹,找到文件夹所对应的子文件名{playList.Add(Path.GetFileNameWithoutExtension(content));}return playList;}//确认方法public bool IsAffirm(){Console.WriteLine("**********");Console.WriteLine("*  1.是  *");Console.WriteLine("*  2.否  *");Console.WriteLine("**********");Console.WriteLine("请输入:");while (true){int n = InputDigit();switch (n){case 1: return true; break;case 2: return false; break;default:Console.WriteLine("输入错误,请重新输入");break;}}}//玩家属性,背包,坐标刷新//玩家背包刷新public void backpackRefresh(string[] backpackStr, string account){for (int i = 0; i < backpackStr.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", backpackStr[i]);//在原有文本文件替换}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", "\n" + backpackStr[i]);//在原有文本文件上替换}}}//玩家属性刷新public void attributeRefresh(string[] attributeStr, string account){string[] playerBackpack = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//获取玩家背包,用来刷新背包容量attributeStr[6] = (int.Parse(attributeStr[7]) - ((playerBackpack.Length - 10) / 10) - (int.Parse(playerBackpack[2]) / 100) - int.Parse(playerBackpack[3]) - (int.Parse(playerBackpack[4]) / 120)).ToString();//刷新背包容量for (int i = 0; i < attributeStr.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt", attributeStr[i]);//在原有文本文件替换}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt", "\n" + attributeStr[i]);//在原有文本文件上替换}}}//玩家坐标刷新public void Vection2Refresh(string[] Vection2Str, string account){for (int i = 0; i < Vection2Str.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\RPGVection2.txt", Vection2Str[i]);//在原有文本文件替换}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\RPGVection2.txt", "\n" + Vection2Str[i]);//在原有文本文件上替换}}}//判断耐久力是否为0public void DurabilityVerdict(string[] DurabilityStr, string account){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");if (backpackStr[9] == "true"){if (float.Parse(DurabilityStr[4]) <= 1){Console.WriteLine("需要休息了");Console.WriteLine("自动返回宿舍");string[] accountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");string HowSex = "";if (accountStr[2] == "男"){HowSex = "DormitoryMan";}if (accountStr[2] == "女"){HowSex = "DormitoryWoman";}string[] dormStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\" + HowSex + @"\Vection2.txt");for (int i = 0; i < dormStr.Length; i += 10){int bedWhile = 0;for (int j = i + 3; j < i + 7; j++){bedWhile++;if (dormStr[j] == accountStr[6]){Console.Write("休息中:");for (int k = 0; k < 5; k++){Thread.Sleep(800);Console.Write(">");}Console.WriteLine();DurabilityStr[4] = DurabilityStr[5];attributeRefresh(DurabilityStr, account);string[] Vection2Str = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\RPGVection2.txt");if (accountStr[2] == "男"){Vection2Str[0] = "3";Vection2Str[1] = "10";}if (accountStr[2] == "女"){Vection2Str[0] = "7";Vection2Str[1] = "10";}Vection2Refresh(Vection2Str, account);int BedX = 0;int BedY = 0;if (bedWhile == 1){BedX = 2;BedY = 2;}if (bedWhile == 2){BedX = 2;BedY = 4;}if (bedWhile == 3){BedX = 6;BedY = 2;}if (bedWhile == 4){BedX = 2;BedY = 4;}new DormitoryRoom().DormitoryRoomMap(account, BedX, BedY);//if (accountStr[2] == "男")//{//    //new Dormitory().DormitoryMap(account, int.Parse(dormStr[i]), int.Parse(dormStr[i + 1]));//}//if (accountStr[2] == "女")//{//    new Dormitory().DormitoryWomanMap(account, int.Parse(dormStr[i]), int.Parse(dormStr[i + 1]));//}}}}}}else{Console.WriteLine("你还不是该学校学生,没有办法回到宿舍补充耐力");}}//等级判断public void HierarchyVerdict(string[] attributeStr, string account){float num1 = 0;int length = (attributeStr.Length - 2) / 2;float[] num = new float[length];int n = 0;for (int i = 3; i < attributeStr.Length; i += 2){num[n] = float.Parse(attributeStr[i]);num1 += float.Parse(attributeStr[i]);n++;}//等级值集合int[] Hierarchy = new int[] { 100, 300, 600, 1000 };int tmp = 0;for (int i = 0; i < Hierarchy.Length; i++){if (float.Parse(attributeStr[1]) == i + 1){tmp = Hierarchy[i];break;}}if (num1 > tmp){for (int i = 0; i < num.Length; i++){if (num[i] <= (tmp / length)){break;}if (i == num.Length - 1){attributeStr[1] = "2";//更新完等级后刷新背包new CreateID().attributeRefresh(attributeStr, account);}}}}//宠物等级判断public void PetVerdict(string[] backpackStr, string account){backpackRefresh(backpackStr, account);int[] PetGrade = new int[] { 0, 100, 300, 600, 1000, 1500, 2100, 2800, 3600, 4500, 5500 };//经验值达到,某个值升级for (int i = 10; i < backpackStr.Length; i += 10){if (float.Parse(backpackStr[i + 3]) > PetGrade[int.Parse(backpackStr[i + 2])]){backpackStr[i + 2] = (int.Parse(backpackStr[i + 2]) + 1).ToString();backpackStr[i + 4] = (int.Parse(backpackStr[i + 4]) * 100 / 85).ToString();backpackStr[i + 5] = (int.Parse(backpackStr[i + 5]) * 100 / 85).ToString();backpackStr[i + 6] = (int.Parse(backpackStr[i + 6]) * 100 / 85).ToString();backpackStr[i + 8] = backpackStr[2];backpackStr[i + 9] = (int.Parse(backpackStr[i + 6]) * int.Parse(backpackStr[i + 2])).ToString();//宠物价格等于血量*等级}}backpackRefresh(backpackStr, account);}//查看所有属性信息public void AllInformation(string account, int a, int b){string[] playerID = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + @".txt");string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//背包string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt"); //属性Console.WriteLine("用户名称:{0}\n\n用户金额:{1}\n用户食物:{2}\n用户药品:{3}\n宠物食物:{4} ", playerID[6], backpackStr[0], backpackStr[2], backpackStr[3], backpackStr[4]);Console.WriteLine("VIP等级:{0}\n人物等级:{1}\n智力:{2}\n耐久力:{3}\n剩余耐久力:{4}\n负重:{5}\n剩余负重:{6}\n幸运值:{7}\n", attributeStr[0], attributeStr[1], attributeStr[2], attributeStr[5], attributeStr[4], attributeStr[7], attributeStr[6], attributeStr[8]);string petStr = "姓名性别等级经验攻击防御血量品种食量价格";int n = 0;Console.WriteLine("宠物信息:");for (int i = 10; i < backpackStr.Length; i++){Console.Write(petStr[n]);n++;Console.Write(petStr[n] + ":");n++;Console.WriteLine(backpackStr[i]);if ((i + 1) % 10 == 0){n = 0;Console.WriteLine("-------------------");}}new DormitoryRoom().RoomChange(account, a, b);}//玩家没走一步,耐久减一和宠物食物相应实物量public void Consume(string account){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//背包string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt"); //属性attributeStr[4] = (int.Parse(attributeStr[4]) - 1).ToString();//没走一步耐久力下降一backpackStr[2] = (int.Parse(backpackStr[2]) - 1).ToString();//没走一步玩家食物下降一for (int i = 10; i < backpackStr.Length; i += 10)//没走一步减少相应的宠物食物{backpackStr[4] = (int.Parse(backpackStr[4]) - int.Parse(backpackStr[i + 8])).ToString();}backpackRefresh(backpackStr, account);attributeRefresh(attributeStr, account);}//判断食物是否充足public void Adequatefood(string account){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//背包string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt"); //属性if (int.Parse(backpackStr[2]) < int.Parse(attributeStr[5])){Console.WriteLine("玩家食物不足,请到商店购买");}int petFood = 0;for (int i = 10; i < backpackStr.Length; i += 10){petFood += int.Parse(backpackStr[i + 8]);}float moneyPet=0;for (int i = 10; i < backpackStr.Length; i+=10){moneyPet += float.Parse(backpackStr[i + 9]);}if (int.Parse(backpackStr[4])<= petFood){Console.WriteLine("宠物被活活饿死,是否花{0}金救活宠物", (moneyPet/4));if (float.Parse(backpackStr[0]) > (moneyPet / 4)){bool bo = new CreateID().IsAffirm();if (bo){Console.WriteLine("宠物已被救活");backpackStr[0] = (float.Parse(backpackStr[0]) - (moneyPet / 4)).ToString();backpackStr[4] = "500";new CreateID().backpackRefresh(backpackStr, account);}else{Console.WriteLine("金钱不足,宠物死亡");string[] backpack = new string[10];for (int i = 0; i < 10; i++){backpack[i] = backpackStr[i];}new CreateID().backpackRefresh(backpack, account);}}else{Console.WriteLine("金钱不足,宠物死亡");string[] backpack = new string[10];for (int i = 0; i < 10; i++){backpack[i] = backpackStr[i];}new CreateID().backpackRefresh(backpack,account);}}if (int.Parse(backpackStr[4]) < petFood * int.Parse(attributeStr[5])){Console.WriteLine("宠物食物不足,请到商店购买");}}}//学校
public class School
{//生成学校地图public void SchoolMap(string account){//File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", "暂无");//人物背包string[] rpgVection2 = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\RPGVection2.txt");//获取人物初始坐标int a = 0;int b = 0;int[,] schoolMapStr = new int[,]{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },{1,0,0,0,0,0,0,0,2,2,9,2,2,0,2,2,2,2,2,1 },{1,0,2,2,2,2,2,0,2,9,2,9,2,0,2,9,9,9,2,1 },{1,0,2,2,9,2,2,0,2,2,0,2,2,0,2,2,0,2,2,1 },{1,0,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,2,1 },{1,0,2,2,9,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },{1,0,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,2,1 },{1,0,2,2,9,2,2,0,2,2,0,2,2,0,2,2,0,2,2,1 },{1,0,2,2,2,2,2,0,2,9,2,9,2,0,2,9,9,9,2,1 },{1,0,0,0,0,0,0,0,2,2,9,2,2,0,2,2,2,2,2,1 },{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }};schoolMapStr[int.Parse(rpgVection2[0]), int.Parse(rpgVection2[1])] = 3;string phraseStr = "男宿舍冒险岛教学楼宿舍宠物店女";int n = 0;for (int i = 0; i < schoolMapStr.GetLength(0); i++){for (int j = 0; j < schoolMapStr.GetLength(1); j++){if (schoolMapStr[i, j] == 0){Console.Write("  ");}if (schoolMapStr[i, j] == 1){Console.Write("■");}if (schoolMapStr[i, j] == 2){Console.Write("※");}if (schoolMapStr[i, j] == 3){Console.Write("★");}if (schoolMapStr[i, j] == 9){Console.Write(phraseStr[n]);n++;}}Console.WriteLine();}SchoolRpgRemove(account, schoolMapStr);}//人物在学校移动public void SchoolRpgRemove(string account, int[,] schoolMapStr){string phraseStr = "男宿舍冒险岛教学楼宿舍宠物店女";string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");string[] rpgVection2 = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\RPGVection2.txt");//获取人物坐标int x = int.Parse(rpgVection2[0]);int y = int.Parse(rpgVection2[1]);while (true){new CreateID().Adequatefood(account);//判断玩家食物以及宠物食物是否充足//没运动一次刷新玩家背包string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//玩家属性string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//玩家耐久力判断,一旦达到某个值就会自动休息new CreateID().DurabilityVerdict(attributeStr, account);//等级判断new CreateID().HierarchyVerdict(attributeStr, account);bool bo = false;int rpgX = 0;//控制人物上下int rpgY = 0;//控制人物左右char ch = Console.ReadKey().KeyChar;Console.WriteLine();#region 判断移动方向if (ch == 'w' || ch == 'W'){rpgX = -1;}if (ch == 's' || ch == 'S'){rpgX = 1;}if (ch == 'a' || ch == 'A'){rpgY = -1;}if (ch == 'd' || ch == 'D'){rpgY = 1;}#endregionif (x + rpgX >= schoolMapStr.GetLength(0) || y + rpgY >= schoolMapStr.GetLength(1)){continue;}if (schoolMapStr[x + rpgX, y + rpgY] == 1 && x + rpgX == 5 && y + rpgY == 0){Console.WriteLine("隐藏上网任务,增加属性");new SecretMissions().surfTheInternet(account);}else if (schoolMapStr[x + rpgX, y + rpgY] == 2 && x + rpgX == 9 && y + rpgY == 12){if (AccountStr[2] == "男"){Console.WriteLine("愉快的进入女生宿舍撩妹纸(^_^)");Console.WriteLine("撩妹纸中勿扰");new SecretMissions().IsomerismRoom(account);}Console.WriteLine("撩完赶紧跑");continue;}else if (schoolMapStr[x + rpgX, y + rpgY] == 2 && x + rpgX == 1 && y + rpgY == 12){if (AccountStr[2] == "女"){Console.WriteLine("老娘愉快的进入男生宿舍撩汉纸(^_^)哈哈哈~~~");Console.WriteLine("撩汉纸中:");new SecretMissions().IsomerismRoom(account);}Console.WriteLine("撩完赶紧跑");continue;}else if (schoolMapStr[x + rpgX, y + rpgY] == 1 || schoolMapStr[x + rpgX, y + rpgY] == 2 || schoolMapStr[x + rpgX, y + rpgY] == 9){continue;}else{schoolMapStr[x + rpgX, y + rpgY] = 3;schoolMapStr[x, y] = 0;SchoolMapRefresh(schoolMapStr, phraseStr);Console.Clear();SchoolMapRefresh(schoolMapStr, phraseStr);if (x + rpgX == 5 && y + rpgY == 18)//判断是否缴费{if (Convert.ToBoolean(backpackStr[9]) == true){Console.WriteLine("欢迎{0}同学回校!", AccountStr[6]);}else{Console.WriteLine("欢迎{0}新同学,请缴纳学费100金,是否缴纳", AccountStr[6]);string HowSex = "";if (AccountStr[2] == "男"){HowSex = "DormitoryMan";}if (AccountStr[2] == "女"){HowSex = "DormitoryWoman";}bool bo1 = new CreateID().IsAffirm();if (bo1 == true){backpackStr[0] = (float.Parse(backpackStr[0]) - 100).ToString();backpackStr[9] = "true";new CreateID().backpackRefresh(backpackStr, account);//获取宿舍情况string[] DormitoryStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\" + HowSex + @"\Vection2.txt");for (int i = 0; i < DormitoryStr.Length; i += 10){if (int.Parse(DormitoryStr[i + 2]) < 4){for (int j = 3 + i; j < 7 + i; j++){if (DormitoryStr[j] == "0"){DormitoryStr[j] = AccountStr[6];DormitoryStr[i + 2] = (float.Parse(DormitoryStr[i + 2]) + 1).ToString();new Dormitory().DormitoryVection2Refresh(account, DormitoryStr);Console.WriteLine("宿舍已经分好{0}生宿舍为{1}号寝", AccountStr[2], DormitoryStr[i + 9]);break;}}break;}}Console.WriteLine("缴费成功,欢迎新同学!");}else{Console.WriteLine("您未缴费,可以进入学校但不能进入学校相关区域");}}}if (x + rpgX == 3 && y + rpgY == 10){if (backpackStr[9] == "true"){if (AccountStr[2] == "男"){Console.WriteLine("进入男生宿舍");new Dormitory().DormitoryMap(account, 6, 9);}else{Console.WriteLine("男生宿舍,女生止步!");}}else{Console.WriteLine("由于你不是本校学生,不能进入该建筑,请缴费成为本校学生");}}if (x + rpgX == 7 && y + rpgY == 10){if (backpackStr[9] == "true"){if (AccountStr[2] == "女"){Console.WriteLine("进入女生宿舍");new Dormitory().DormitoryWomanMap(account, 0, 9);}else{Console.WriteLine("女生宿舍,男生止步!");}}else{Console.WriteLine("由于你不是本校学生,不能进入该建筑,请缴费成为本校学生");}}if (x + rpgX == 3 && y + rpgY == 16){if (backpackStr[9] == "true"){Console.WriteLine("进入冒险岛");new Adventure().AdventureMap(account, 10, 8);}else{Console.WriteLine("由于你不是本校学生,不能进入该建筑,请缴费成为本校学生");}}if (x + rpgX == 7 && y + rpgY == 16){if (backpackStr[9] == "true"){Console.WriteLine("进入商店");new Shop().ShopMap(account, 0, 5);}else{Console.WriteLine("由于你不是本校学生,不能进入该建筑,请缴费成为本校学生");}}if (x + rpgX == 5 && y + rpgY == 6){if (backpackStr[9] == "true"){Console.WriteLine("进入教学楼");new TeachingBuild().TeachingBuildMap(account);}else{Console.WriteLine("由于你不是本校学生,不能进入该建筑,请缴费成为本校学生");}}bo = true;}if (bo == true){x += rpgX;y += rpgY;//刷新玩家坐标   File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\RPGVection2.txt", x.ToString() + "\n" + y.ToString());//移动后更新人物坐标//刷新玩家耐久力attributeStr[4] = (float.Parse(attributeStr[4]) - 1).ToString();new CreateID().attributeRefresh(attributeStr, account);new CreateID().Consume(account);//减少玩家耐久以及食物}}}//地图刷新public void SchoolMapRefresh(int[,] MapStr, string str){int n = 0;for (int i = 0; i < MapStr.GetLength(0); i++){for (int j = 0; j < MapStr.GetLength(1); j++){if (MapStr[i, j] == 0){Console.Write("  ");}if (MapStr[i, j] == 1){Console.Write("■");}if (MapStr[i, j] == 2){Console.Write("※");}if (MapStr[i, j] == 3){Console.Write("★");}if (MapStr[i, j] == 4){Console.Write("●");}if (MapStr[i, j] == 9){Console.Write(str[n]);n++;}}Console.WriteLine();}}}//商店
public class Shop
{//商店地图public void ShopMap(string account, int a, int b){int[,] ShopMapStr = new int[,]{{1,1,1,1,1,0,1,1,1,1,1 },{1,9,2,0,0,0,0,0,2,9,1 },{1,9,2,0,0,0,0,0,2,9,1 },{1,9,0,0,0,0,0,0,0,9,1 },{1,9,2,0,0,0,0,0,2,9,1 },{1,2,2,0,2,2,2,0,2,2,1 },{1,9,9,9,9,2,9,9,9,9,1 },{1,1,1,1,1,1,1,1,1,1,1 }};ShopMapStr[a, b] = 3;string shopStr = "购出买售商商品品充值中心商品转赠";int n = 0;for (int i = 0; i < ShopMapStr.GetLength(0); i++){for (int j = 0; j < ShopMapStr.GetLength(1); j++){if (ShopMapStr[i, j] == 0){Console.Write("  ");}if (ShopMapStr[i, j] == 1){Console.Write("■");}if (ShopMapStr[i, j] == 2){Console.Write("※");}if (ShopMapStr[i, j] == 3){Console.Write("★");}if (ShopMapStr[i, j] == 9){Console.Write(shopStr[n]);n++;}}Console.WriteLine();}ShopMapRemove(account, ShopMapStr, a, b);}//商店里面移动public void ShopMapRemove(string account, int[,] ShopMapStr, int a, int b){string shopStr = "购出买售商商品品充值中心商品转赠";//string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");int x = a;int y = b;while (true){new CreateID().Adequatefood(account);//判断玩家食物以及宠物食物是否充足//获取玩家属性string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//玩家耐久力判断,一旦达到某个值就会自动休息new CreateID().DurabilityVerdict(attributeStr, account);bool bo = false;int rpgX = 0;//控制人物上下int rpgY = 0;//控制人物左右char ch = Console.ReadKey().KeyChar;#region 判断移动方向if (ch == 'w' || ch == 'W'){rpgX = -1;}if (ch == 's' || ch == 'S'){rpgX = 1;}if (ch == 'a' || ch == 'A'){rpgY = -1;}if (ch == 'd' || ch == 'D'){rpgY = 1;}#endregionif (x + rpgX < 0 && y + rpgY == 5){continue;}if (ShopMapStr[x + rpgX, y + rpgY] == 1 || ShopMapStr[x + rpgX, y + rpgY] == 2 || ShopMapStr[x + rpgX, y + rpgY] == 9){continue;}else{ShopMapStr[x + rpgX, y + rpgY] = 3;ShopMapStr[x, y] = 0;new School().SchoolMapRefresh(ShopMapStr, shopStr);Console.Clear();new School().SchoolMapRefresh(ShopMapStr, shopStr);if (x + rpgX == 0 && y + rpgY == 5){Console.WriteLine("退出商店");new School().SchoolMap(account);}if (x + rpgX == 3 && y + rpgY == 2){Console.WriteLine("购买商品");Commodity(account, "buy");}if (x + rpgX == 3 && y + rpgY == 8){Console.WriteLine("出售商品");Commodity(account, "sell");}if (x + rpgX == 5 && y + rpgY == 3){Console.WriteLine("充值中心");rechargeInter(account);}if (x + rpgX == 5 && y + rpgY == 7){Console.WriteLine("商品转赠");GiveInter(account);}bo = true;}if (bo == true){x += rpgX;y += rpgY;new CreateID().attributeRefresh(attributeStr, account);new CreateID().Consume(account);//减少玩家耐久以及食物}}}//商品界面public void Commodity(string account, string fromWhile){Console.WriteLine("************************");Console.WriteLine("*  请选择购买商品种类  *");Console.WriteLine("*        1.食物        *");Console.WriteLine("*        2.药品        *");Console.WriteLine("*        3.宠物        *");Console.WriteLine("*        4.宠物食物    *");Console.WriteLine("*        5.玩家背包    *");Console.WriteLine("*        6.退出        *");Console.WriteLine("************************");while (true){int n = new CreateID().InputDigit();switch (n){case 1: Aliment(account, fromWhile); break;case 2: Drug(account, fromWhile); break;case 3:if (fromWhile == "buy"){PetKing(account);}if (fromWhile == "sell"){sellPet(account);}break;case 4: petFood(account, fromWhile); break;case 5: accounterPacksack(account, "buy"); break;case 6:if (fromWhile == "buy"){ShopMap(account, 3, 2);}if (fromWhile == "sell"){ShopMap(account, 3, 8);}break;default:Console.WriteLine("输入错误");break;}}}//宠物种类public void PetKing(string account){string[] str = new string[Directory.GetFileSystemEntries(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop").Length];//声明一个数组,用来装D:\AllMyLife\DataCenter\SystemMessage\PetShop中文件名,int n = 0;                                                                          //Directory.GetFileSystemEntries(@"D:\PetShop\Pet").Length 表示文件中含有子文件个数Console.WriteLine("************************");Console.WriteLine("   请选择查看宠物种类  ");foreach (string content in Directory.GetFileSystemEntries(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop")){Console.WriteLine("       {0}.{1}          ", (n + 1), Path.GetFileNameWithoutExtension(content));str[n] = Path.GetFileNameWithoutExtension(content);n++;}Console.WriteLine("************************");Console.WriteLine("请输入对应序号");for (int i = 0; true; i++){n = new CreateID().InputDigit();if (n > Directory.GetFileSystemEntries(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop").Length){Console.WriteLine("输入错误,请重新输入!!!");}else{petShow(account, str[n - 1]); break;}}}//看完宠物之后选择public void petInterLast(string account, string petStr){Console.WriteLine("**********************");Console.WriteLine("*     请选择操作     *");Console.WriteLine("*     1.购买宠物     *");Console.WriteLine("*     2.退出         *");Console.WriteLine("**********************");for (int i = 0; true; i++){int n = new CreateID().InputDigit();switch (n){case 1: changeDogPet(account, petStr); break;case 2: ShopMap(account, 3, 2); ; break;default:Console.WriteLine("输入错误,请重新输入 ");break;}}}//宠物列表public void petShow(string account, string petStr){int num = 0;string[] str = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt");//每行读取Console.WriteLine("{0}宠物目录如下:", petStr);for (int i = 0; i < str.Length; i += 10){num++;Console.WriteLine("{0}.  姓名:{1}  性别:{2}  等级:{3}  经验值:{4}  攻击力:{5}   防御力:{6}  血量值:{7}   品种:{8}  食量:{9}  价格:{10}  ", num, str[i], str[i + 1], str[i + 2], str[i + 3], str[i + 4], str[i + 5], str[i + 6], str[i + 7], str[i + 8], str[i + 9]);}petInterLast(account, petStr);//跳转选择界面}//购买宠物,并且加入到背包public void changeDogPet(string account, string petStr){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//每行读取玩家背包string[] str = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\PetShop\" + petStr + ".txt");//每行读取宠物列表string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");if (int.Parse(attributeStr[6]) < 1){Console.WriteLine("背包空间不足,请扩充背包空间");Commodity(account, "buy");}Console.WriteLine("*请输入序号*");for (int i1 = 0; true; i1++){int n = new CreateID().InputDigit();int num = n - 1;for (int i2 = 0; i2 < backpackStr.Length; i2 += 10){if (backpackStr.Length != 10 && backpackStr[i2] == str[num * 10]){Console.WriteLine("用户已经存在该宠物,请重新选择");petInterLast(account, petStr);//跳转选择界面break;}if (i2 == backpackStr.Length - 10 || backpackStr.Length == 10){if (float.Parse(backpackStr[0]) < float.Parse(str[num * 10 + 9])){Console.WriteLine("余额不足,请充值!");Commodity(account, "buy");break;}else{backpackStr[0] = (float.Parse(backpackStr[0]) - float.Parse(str[num * 10 + 9])).ToString();new CreateID().backpackRefresh(backpackStr, account);//背包刷新new CreateID().attributeRefresh(attributeStr, account);//属性刷新,这里刷新背包空间for (int i = 0; i < 10; i++){File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", "\n" + str[num * 10 + i]);//在原有文本文件上添加}Console.WriteLine("购买成功");Commodity(account, "buy");}}}}}//观看背包列表public void accounterPacksack(string account, string fromWhile){string[] playerID = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + @".txt");string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//每行读取背包string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//每行玩家属性Console.WriteLine("用户名称:{0}\n会员等级:{1}\n用户等级:{2}\n用户金额:{3}\n用户食物:{4}\n用户药品:{5}\n宠物食物:{6}\n背包剩余空间:{7} ", playerID[6], attributeStr[0], attributeStr[1], backpackStr[0], backpackStr[2], backpackStr[3], backpackStr[4], attributeStr[6]);string petStr = "姓名性别等级经验攻击防御血量品种食量价格";int n = 0;Console.WriteLine("宠物信息:");for (int i = 10; i < backpackStr.Length; i++){Console.Write(petStr[n]);n++;Console.Write(petStr[n] + ":");n++;Console.WriteLine(backpackStr[i]);if ((i + 1) % 10 == 0){n = 0;Console.WriteLine("-------------------");}}returnWhile(account, fromWhile);}//卖掉宠物public void sellPet(string account){string[] accountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//每行读取背包string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//每行读取属性Console.WriteLine("宠物信息:");string petStr = "姓名性别等级经验攻击防御血量品种食量价格";int n = 0;Console.WriteLine("宠物信息:");for (int i = 10; i < accountStr.Length; i++){Console.Write(petStr[n]);n++;Console.Write(petStr[n] + ":");n++;Console.WriteLine(accountStr[i]);if ((i + 1) % 10 == 0){n = 0;Console.WriteLine("-------------------");}}Console.WriteLine("卖掉宠物将会以原来价格六折折现");Console.WriteLine("请输入宠物姓名:");for (int k = 0; k < 3; k++){string name = Console.ReadLine();for (int i = 10; i < accountStr.Length; i += 10){if (accountStr[i] == name){Console.WriteLine("再次确认是否卖掉,请输入“是”或者“否”");string notarize = Console.ReadLine();if (notarize == "是"){accountStr[0] = (float.Parse(accountStr[0]) + (0.6 * float.Parse(accountStr[i + 9]))).ToString();for (int m = 0; m < i; m++){if (m == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", accountStr[m]);//在原有文本文件替换}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", "\n" + accountStr[m]);//在原有文本文件上替换}}for (int m = i + 10; m < accountStr.Length; m++){File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", "\n" + accountStr[m]);//在原有文本文件上替换}Console.WriteLine("删除成功");new CreateID().attributeRefresh(attributeStr, account);//在这里是为了刷新背包Commodity(account, "sell");break;}else{Console.WriteLine("返回宠物界面");Commodity(account, "sell");break;}}}if (2 - k == 0){Console.WriteLine("输入次数超过三次,自动退出");Commodity(account, "sell");break;}Console.WriteLine("还有{0}次机会,请重新输入宠物名字:", 2 - k);}}//充值界面public void rechargeInter(string account){string[] accountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");//每行读取背包Console.WriteLine("**********************");Console.WriteLine("*   请选择充值金额   *");Console.WriteLine("*    1.10元1000金    *");Console.WriteLine("*    2.30元5000金    *");Console.WriteLine("*    3.50元12000金   *");Console.WriteLine("*    4.100元30000金  *");Console.WriteLine("*    5.退出          *");Console.WriteLine("**********************");int n = new CreateID().InputDigit();float num = 0;switch (n){case 1: num = 1000; break;case 2: num = 5000; break;case 3: num = 12000; break;case 4: num = 30000; break;case 5: ShopMap(account, 5, 3); break;default:Console.WriteLine("输入错误,请重新输入,返回宠物商店界面");break;}string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//每行玩家属性float money = float.Parse(accountStr[1]) + num;if (money >= 5000 && money < 150000){attributeStr[0] = "VIP黑铁";//替换等级}else if (money >= 15000 && money < 50000){attributeStr[0] = "VIP青铜";//替换等级}else if (money >= 50000 && money < 100000){attributeStr[0] = "VIP白银";//替换等级}else if (money >= 100000){attributeStr[0] = "VIP黄金";//替换等级}else{attributeStr[0] = "VIP0";//替换等级}accountStr[0] = (float.Parse(accountStr[0]) + num).ToString();//增加金钱accountStr[1] = (float.Parse(accountStr[1]) + num).ToString();//增加金钱//背包刷新new CreateID().backpackRefresh(accountStr, account);//刷新属性new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("充值成功!");rechargeInter(account);}//事物public void Thing(string account, string fromWhile, int _num){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");Console.WriteLine("当前剩余{0}单位粮食", backpackStr[2]);//购买食品if (fromWhile == "buy"){Console.WriteLine("1金等于100单位粮食 \n请输入购买金额:");int amount = new CreateID().InputDigit();if (float.Parse(attributeStr[6]) > amount)//判断背包空间{bool bo = new CreateID().IsAffirm();Console.WriteLine("是否确认购买{0}金{1}单位的粮食", amount, amount * 100);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) - amount).ToString();//金钱backpackStr[2] = (float.Parse(backpackStr[2]) + (amount * 100)).ToString();//人的事物new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("购买成功!!!");}else{Console.WriteLine("退出购买!!!");}}else{Console.WriteLine("背包空间不足,退出购买!");}}//卖出食品if (fromWhile == "sell"){Console.WriteLine("100单位粮食等于0.8金 \n请输入卖出粮食数量:");int amount = new CreateID().InputDigit();bool bo = new CreateID().IsAffirm();if (int.Parse(backpackStr[2]) > amount){Console.WriteLine("是否确认卖出{0}单位粮食", amount);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) + amount * 0.008f).ToString();//金钱backpackStr[2] = (float.Parse(backpackStr[2]) - amount).ToString();//人的背包--粮食new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("卖出成功!!!");}else{Console.WriteLine("退出卖出!!!");}}else{Console.WriteLine("粮食不足,退出卖出");}}returnWhile(account, fromWhile);}//人食品public void Aliment(string account, string fromWhile){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");Console.WriteLine("当前剩余{0}单位粮食", backpackStr[2]);//购买食品if (fromWhile == "buy"){Console.WriteLine("1金等于100单位粮食 \n请输入购买金额:");int amount = new CreateID().InputDigit();if (float.Parse(attributeStr[6]) > amount)//判断背包空间{bool bo = new CreateID().IsAffirm();Console.WriteLine("是否确认购买{0}金{1}单位的粮食", amount, amount * 100);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) - amount).ToString();//金钱backpackStr[2] = (float.Parse(backpackStr[2]) + (amount * 100)).ToString();//人的事物new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("购买成功!!!");}else{Console.WriteLine("退出购买!!!");}}else{Console.WriteLine("背包空间不足,退出购买!");}}//卖出食品if (fromWhile == "sell"){Console.WriteLine("100单位粮食等于0.8金 \n请输入卖出粮食数量:");int amount = new CreateID().InputDigit();bool bo = new CreateID().IsAffirm();if (int.Parse(backpackStr[2]) > amount){Console.WriteLine("是否确认卖出{0}单位粮食", amount);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) + amount * 0.008f).ToString();//金钱backpackStr[2] = (float.Parse(backpackStr[2]) - amount).ToString();//人的背包--粮食new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("卖出成功!!!");}else{Console.WriteLine("退出卖出!!!");}}else{Console.WriteLine("粮食不足,退出卖出");}}returnWhile(account, fromWhile);}//药品public void Drug(string account, string fromWhile){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");Console.WriteLine("当前剩余{0}粒药品", backpackStr[3]);//购买食品if (fromWhile == "buy"){Console.WriteLine("5金等于1粒药品 \n请输入购买药品数目:");int amount = new CreateID().InputDigit();if (float.Parse(attributeStr[6]) > amount)//判断背包空间{bool bo = new CreateID().IsAffirm();Console.WriteLine("是否确认购买{0}金{1}单位的粮食", amount * 5, amount);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) - amount * 5).ToString();//金钱backpackStr[3] = (float.Parse(backpackStr[3]) + amount).ToString();//人的背包--药品new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("购买成功!!!");}else{Console.WriteLine("退出购买!!!");}}else{Console.WriteLine("背包空间不足,退出购买!");}}//卖出食品if (fromWhile == "sell"){Console.WriteLine("1粒药品等于3金 \n请输入出售药品数目:");int amount = new CreateID().InputDigit();bool bo = new CreateID().IsAffirm();if (int.Parse(backpackStr[3]) > amount){Console.WriteLine("是否确认卖出{0}粒药品", amount);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) + amount * 3).ToString();//金钱backpackStr[3] = (float.Parse(backpackStr[3]) - amount).ToString();//人的背包--药品new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("购买成功!!!");}else{Console.WriteLine("退出卖出!!!");}}else{Console.WriteLine("药品不足,退出卖出");}}returnWhile(account, fromWhile);}//宠物食物public void petFood(string account, string fromWhile){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");Console.WriteLine("当前剩余{0}单位宠物粮食", backpackStr[3]);//购买食品if (fromWhile == "buy"){Console.WriteLine("1金等于120单位宠物粮食 \n请输入购买金额:");int amount = new CreateID().InputDigit();if (float.Parse(attributeStr[6]) > amount)//判断背包空间{bool bo = new CreateID().IsAffirm();Console.WriteLine("是否确认购买{0}金{1}单位的宠物粮食", amount, amount * 120);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) - amount).ToString();//金钱backpackStr[4] = (float.Parse(backpackStr[4]) + (amount * 120)).ToString();//人的背包--宠物食物new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("购买成功!!!");}else{Console.WriteLine("退出购买!!!");}}else{Console.WriteLine("背包空间不足,退出购买!");}}//卖出食品if (fromWhile == "sell"){Console.WriteLine("100单位粮食等于0.6金 \n请输入卖出数量:");int amount = new CreateID().InputDigit();bool bo = new CreateID().IsAffirm();if (int.Parse(backpackStr[4]) > amount){Console.WriteLine("是否确认卖出{0}单位宠物粮食", amount);if (bo){backpackStr[0] = (float.Parse(backpackStr[0]) + amount * 0.006f).ToString();//金钱backpackStr[4] = (float.Parse(backpackStr[4]) - amount).ToString();//人的背包--宠物食物new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("卖出成功!!!");}else{Console.WriteLine("退出卖出!!!");}}else{Console.WriteLine("事物不足,退出赠送");}}returnWhile(account, fromWhile);}//判断返回到哪里public void returnWhile(string account, string fromWhile){if (fromWhile == "buy"){Commodity(account, "buy");}if (fromWhile == "sell"){Commodity(account, "sell");}if (fromWhile == "give"){GiveInter(account);}}//赠送界面public void GiveInter(string account){Console.WriteLine("************************");Console.WriteLine("*  请选择购买商品种类  *");Console.WriteLine("*        1.赠送对象    *");Console.WriteLine("*        2.玩家背包    *");Console.WriteLine("*        3.返回        *");Console.WriteLine("************************");while (true){int n = new CreateID().InputDigit();switch (n){case 1: GivingFriend(account); break;case 2: accounterPacksack(account, "give"); break;case 3: ShopMap(account, 5, 7); break;default:Console.WriteLine("输入错误");break;}}}//赠送商品public void GiveCommodity(string account, string friendAccount){Console.WriteLine("************************");Console.WriteLine("*  请选择赠送商品种类  *");Console.WriteLine("*        1.食物        *");Console.WriteLine("*        2.药品        *");Console.WriteLine("*        3.宠物        *");Console.WriteLine("*        4.宠物食物    *");Console.WriteLine("*        5.退出        *");Console.WriteLine("************************");while (true){int n = new CreateID().InputDigit();switch (n){case 1: Console.Write("食物"); GivingThing(account, friendAccount, 2); break;case 2: Console.Write("药品"); GivingThing(account, friendAccount, 3); break;case 3: GivingPet(account, friendAccount); break;case 4: Console.Write("宠物食物"); GivingThing(account, friendAccount, 4); break;case 5: GiveInter(account); break;default:Console.WriteLine("输入错误");break;}}}//赠送宠物public void GivingPet(string account, string friendAccount){string[] accountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] friendStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + friendAccount + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");string petStr = "姓名性别等级经验攻击防御血量品种食量价格";int n = 0;Console.WriteLine("宠物信息:");Console.WriteLine("宠物1.");for (int i = 10; i < accountStr.Length; i++){Console.Write(petStr[n]);n++;Console.Write(petStr[n] + ":");n++;Console.WriteLine(accountStr[i]);if ((i + 1) % 10 == 0){n = 0;Console.WriteLine("-------------------");Console.WriteLine("宠物{0}: ", ((i + 1) / 10) - 1);}}Console.WriteLine("请输入赠送宠物序号");while (true){int num = new CreateID().InputDigit();if ((accountStr.Length / 10) > num){for (int i = 10; i <= friendStr.Length; i += 10){if (friendStr.Length != 10 && accountStr[10 * num] == friendStr[i]){Console.WriteLine("您的朋友已有该宠物,请重新");GiveCommodity(account, friendAccount);}if (friendStr.Length == 10 || i == friendStr.Length - 10){int tmp = num * 10;//好友背包刷新for (int m = 0; m < 10; m++){File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + friendAccount + @"\backpack.txt", "\n" + accountStr[tmp + m]);//在原有文本文件上增加}//玩家自己刷新背包for (int m = 0; m < tmp; m++){if (m == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", accountStr[m]);//在原有文本文件替换}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", "\n" + accountStr[m]);//在原有文本文件上增加}}for (int m = tmp + 10; m < accountStr.Length; m++){File.AppendAllText(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt", "\n" + accountStr[m]);//在原有文本文件上增加}new CreateID().attributeRefresh(attributeStr, account);//刷新玩家背包空间Console.WriteLine("赠送成功");GiveCommodity(account, friendAccount);}}}else{Console.WriteLine("请重新输入");}}}//赠送食品public void GivingThing(string account, string friendAccount, int _num){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] friendStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + friendAccount + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");Console.WriteLine("当前剩余量为{0}", backpackStr[_num]);Console.WriteLine("请输入赠送数量");int amount = new CreateID().InputDigit();if (int.Parse(backpackStr[_num]) >= amount){bool bo = new CreateID().IsAffirm();Console.WriteLine("是否确认赠送");if (bo){if (_num == 2){backpackStr[2] = (float.Parse(backpackStr[2]) - amount).ToString();//人的背包--食物}if (_num == 3){backpackStr[3] = (float.Parse(backpackStr[3]) - amount).ToString();//人的背包--药品}if (_num == 4){backpackStr[4] = (float.Parse(backpackStr[4]) - amount).ToString();//人的背包--食物}new CreateID().backpackRefresh(backpackStr, account);new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("赠送成功!!!");}else{Console.WriteLine("退出赠送!!!");}}else{Console.WriteLine("数量不足,请重新选择");}GiveCommodity(account, friendAccount);}//判断玩家是否存在public void GivingFriend(string account){List<string> list = new CreateID().PlayerFilename();//获取所有玩家账号           Console.WriteLine("请输入对方网名");string friendAccount = Console.ReadLine();for (int i = 0; i < list.Count; i++){string[] playerID = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + list[i] + @".txt");if (friendAccount == playerID[6]){GiveCommodity(account, list[i]);}if (list.Count == i - 1){Console.WriteLine("没有该玩家");GiveInter(account);}}}}//教学楼
public class TeachingBuild
{//生成教学楼地图public void TeachingBuildMap(string account){int a = 0;int b = 0;int[,] TeachingBuildStr = new int[,]{{1,1,1,1,1,1,1,1,1,1,1,1 },{1,2,2,2,2,0,0,2,2,2,2,1 },{1,9,2,9,2,0,0,2,9,2,9,1 },{1,2,2,2,2,0,0,2,2,2,2,1 },{1,9,2,9,2,0,0,2,9,2,9,1 },{1,2,2,2,0,0,0,0,2,2,2,1 },{1,2,2,2,2,0,0,2,2,2,2,1 },{1,0,0,0,0,0,0,0,0,0,3,0 },{1,2,2,2,2,0,0,2,2,2,2,1 },{1,2,2,2,0,0,0,0,2,2,2,1 },{1,9,2,9,2,0,0,2,9,2,9,1 },{1,2,2,2,2,0,0,2,2,2,2,1 },{1,9,2,9,2,0,0,2,9,2,9,1 },{1,2,2,2,2,0,0,2,2,2,2,1 },{1,1,1,1,1,1,1,1,1,1,1,1}};string phraseStr = "学堂耐久教室教室负重幸运教室教室";int n = 0;for (int i = 0; i < TeachingBuildStr.GetLength(0); i++){for (int j = 0; j < TeachingBuildStr.GetLength(1); j++){if (TeachingBuildStr[i, j] == 0){Console.Write("  ");}if (TeachingBuildStr[i, j] == 1){Console.Write("■");}if (TeachingBuildStr[i, j] == 2){Console.Write("※");}if (TeachingBuildStr[i, j] == 3){a = i;b = j;Console.Write("★");}if (TeachingBuildStr[i, j] == 9){Console.Write(phraseStr[n]);n++;}}Console.WriteLine();}TeachingBuildRemove(account, TeachingBuildStr, a, b);}//人物在教学楼移动public void TeachingBuildRemove(string account, int[,] TeachingBuildStr, int a, int b){string phraseStr = "学堂耐久教室教室负重幸运教室教室";//string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");int x = a;int y = b;while (true){new CreateID().Adequatefood(account);//判断玩家食物以及宠物食物是否充足//获取玩家属性string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//玩家耐久力判断,一旦达到某个值就会自动休息new CreateID().DurabilityVerdict(attributeStr, account);bool bo = false;int rpgX = 0;//控制人物上下int rpgY = 0;//控制人物左右char ch = Console.ReadKey().KeyChar;#region 判断移动方向if (ch == 'w' || ch == 'W'){rpgX = -1;}if (ch == 's' || ch == 'S'){rpgX = 1;}if (ch == 'a' || ch == 'A'){rpgY = -1;}if (ch == 'd' || ch == 'D'){rpgY = 1;}#endregionif (x + rpgX >= TeachingBuildStr.GetLength(0) || y + rpgY >= TeachingBuildStr.GetLength(1)){continue;}else if (TeachingBuildStr[x + rpgX, y + rpgY] == 1 || TeachingBuildStr[x + rpgX, y + rpgY] == 2 || TeachingBuildStr[x + rpgX, y + rpgY] == 9){continue;}else{TeachingBuildStr[x + rpgX, y + rpgY] = 3;TeachingBuildStr[x, y] = 0;new School().SchoolMapRefresh(TeachingBuildStr, phraseStr);//TeachingBuildMapRefresh(TeachingBuildStr);Console.Clear();new School().SchoolMapRefresh(TeachingBuildStr, phraseStr);//TeachingBuildMapRefresh(TeachingBuildStr);if (x + rpgX == 7 && y + rpgY == 11){Console.WriteLine("退出教学楼");new School().SchoolMap(account);}if (x + rpgX == 5 && y + rpgY == 4){Console.WriteLine("进入学堂教室");Console.WriteLine("正在提高智力,请稍后");for (int i = 0; i < 4; i++){Thread.Sleep(800);Console.Write(">");}attributeStr[2] = (float.Parse(attributeStr[2]) + 4).ToString();attributeStr[3] = (float.Parse(attributeStr[3]) + 4).ToString();Console.WriteLine("提高完成!");}if (x + rpgX == 5 && y + rpgY == 7){Console.WriteLine("进入耐久教室");Console.WriteLine("正在提高耐久力,请稍后");for (int i = 0; i < 5; i++){Thread.Sleep(800);Console.Write(">");}attributeStr[4] = (float.Parse(attributeStr[4]) + 5).ToString();attributeStr[5] = (float.Parse(attributeStr[5]) + 5).ToString();Console.WriteLine("提高完成!");}if (x + rpgX == 9 && y + rpgY == 4){Console.WriteLine("进入负重教室");Console.WriteLine("正在提高负重,请稍后");for (int i = 0; i < 4; i++){Thread.Sleep(800);Console.Write(">");}attributeStr[6] = (float.Parse(attributeStr[6]) + 4).ToString();attributeStr[7] = (float.Parse(attributeStr[7]) + 4).ToString();Console.WriteLine("提高完成!");}if (x + rpgX == 9 && y + rpgY == 7){Console.WriteLine("进入魅力教室");Console.WriteLine("正在提高魅力,请稍后");for (int i = 0; i < 2; i++){Thread.Sleep(800);Console.Write(">");}attributeStr[8] = (float.Parse(attributeStr[8]) + 2).ToString();attributeStr[9] = (float.Parse(attributeStr[9]) + 2).ToString();Console.WriteLine("提高完成!");}bo = true;}if (bo == true){x += rpgX;y += rpgY;new CreateID().attributeRefresh(attributeStr, account);new CreateID().Consume(account);//减少玩家耐久以及食物}}}}//宿舍
public class Dormitory
{//宿舍地图public void DormitoryMap(string account, int a, int b){int[,] DormitoryMapStr = new int[,]{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },{1,9,9,9,2,9,9,9,2,0,2,9,9,9,2,9,9,9,1 },{1,2,0,2,2,2,0,2,2,0,2,2,0,2,2,2,0,2,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,2,0,2,2,2,0,2,2,0,2,2,0,2,2,2,0,2,1 },{1,9,9,9,2,9,9,9,2,0,2,9,9,9,2,9,9,9,1 },{1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1 }};DormitoryMapStr[a, b] = 3;string DormitoryStr = "一号寝三号寝五号寝七号寝二号寝四号寝六号寝四号寝";int n = 0;for (int i = 0; i < DormitoryMapStr.GetLength(0); i++){for (int j = 0; j < DormitoryMapStr.GetLength(1); j++){if (DormitoryMapStr[i, j] == 0){Console.Write("  ");}if (DormitoryMapStr[i, j] == 1){Console.Write("■");}if (DormitoryMapStr[i, j] == 2){Console.Write("※");}if (DormitoryMapStr[i, j] == 3){Console.Write("★");}if (DormitoryMapStr[i, j] == 9){Console.Write(DormitoryStr[n]);n++;}}Console.WriteLine();}BedNo(account);DormitoryRpgRemove(account, DormitoryMapStr, a, b);}//女生宿舍public void DormitoryWomanMap(string account, int a, int b){int[,] DormitoryMapStr = new int[,]{{1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1 },{1,9,9,9,2,9,9,9,2,0,2,9,9,9,2,9,9,9,1 },{1,2,0,2,2,2,0,2,2,0,2,2,0,2,2,2,0,2,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,2,0,2,2,2,0,2,2,0,2,2,0,2,2,2,0,2,1 },{1,9,9,9,2,9,9,9,2,0,2,9,9,9,2,9,9,9,1 },{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }};DormitoryMapStr[a, b] = 3;string DormitoryStr = "一号寝三号寝五号寝七号寝二号寝四号寝六号寝四号寝";int n = 0;for (int i = 0; i < DormitoryMapStr.GetLength(0); i++){for (int j = 0; j < DormitoryMapStr.GetLength(1); j++){if (DormitoryMapStr[i, j] == 0){Console.Write("  ");}if (DormitoryMapStr[i, j] == 1){Console.Write("■");}if (DormitoryMapStr[i, j] == 2){Console.Write("※");}if (DormitoryMapStr[i, j] == 3){Console.Write("★");}if (DormitoryMapStr[i, j] == 9){Console.Write(DormitoryStr[n]);n++;}}Console.WriteLine();}BedNo(account);DormitoryRpgRemove(account, DormitoryMapStr, a, b);}//人物在宿舍移动public void DormitoryRpgRemove(string account, int[,] DormitoryMapStr, int a, int b){string DormitoryStr = "一号寝三号寝五号寝七号寝二号寝四号寝六号寝四号寝";//string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");int x = a;int y = b;while (true){new CreateID().Adequatefood(account);//判断玩家食物以及宠物食物是否充足//获取玩家属性string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//玩家耐久力判断,一旦达到某个值就会自动休息new CreateID().DurabilityVerdict(attributeStr, account);bool bo = false;int rpgX = 0;//控制人物上下int rpgY = 0;//控制人物左右char ch = Console.ReadKey().KeyChar;#region 判断移动方向if (ch == 'w' || ch == 'W'){rpgX = -1;}if (ch == 's' || ch == 'S'){rpgX = 1;}if (ch == 'a' || ch == 'A'){rpgY = -1;}if (ch == 'd' || ch == 'D'){rpgY = 1;}#endregionif (x + rpgX >= DormitoryMapStr.GetLength(0) || y + rpgY >= DormitoryMapStr.GetLength(1)){continue;}if (x + rpgX < 0 || x + rpgX >= DormitoryMapStr.Length){continue;}else if (DormitoryMapStr[x + rpgX, y + rpgY] == 1 || DormitoryMapStr[x + rpgX, y + rpgY] == 2 || DormitoryMapStr[x + rpgX, y + rpgY] == 9){continue;}else{DormitoryMapStr[x + rpgX, y + rpgY] = 3;DormitoryMapStr[x, y] = 0;new School().SchoolMapRefresh(DormitoryMapStr, DormitoryStr);//DormitoryMapRefresh(DormitoryMapStr);Console.Clear();new School().SchoolMapRefresh(DormitoryMapStr, DormitoryStr);//DormitoryMapRefresh(DormitoryMapStr);if ((x + rpgX == 6 && y + rpgY == 9) || (x + rpgX == 0 && y + rpgY == 9)){Console.WriteLine("退出宿舍");new School().SchoolMap(account);}if (x + rpgX == 2 && y + rpgY == 2){Console.WriteLine("进入宿舍房间");new DormitoryRoom().DormitoryRoomMap(account, 8, 3);}bo = true;}if (bo == true){x += rpgX;y += rpgY;//刷新玩家属性attributeStr[4] = (float.Parse(attributeStr[4]) - 1).ToString();new CreateID().attributeRefresh(attributeStr, account);new CreateID().Consume(account);//减少玩家耐久以及食物}}}//宿舍坐标以及成员更新public void DormitoryVection2Refresh(string account, string[] DormitoryStr){string[] accountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");string HowSex = "";if (accountStr[2] == "男"){HowSex = "DormitoryMan";}if (accountStr[2] == "女"){HowSex = "DormitoryWoman";}for (int i = 0; i < DormitoryStr.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\SystemMessage\" + HowSex + @"\Vection2.txt", DormitoryStr[i]);//在原有文本文件替换}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\" + HowSex + @"\Vection2.txt", "\n" + DormitoryStr[i]);//在原有文本文件上替换}}}//判断床铺号public void BedNo(string account){bool bo = false;int n = 0;string[] accountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");string HowSex = "";if (accountStr[2] == "男"){HowSex = "DormitoryMan";}if (accountStr[2] == "女"){HowSex = "DormitoryWoman";}//获取宿舍情况string[] DormitoryStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\" + HowSex + @"\Vection2.txt");//获取玩家网名string[] PlayerStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");for (int i = 0; i < DormitoryStr.Length; i += 10){for (int j = i + 3; j < i + 7; j++){if (DormitoryStr[j] == PlayerStr[6]){Console.WriteLine("{0}同学的宿舍位置是{1}号寝{2}号铺", PlayerStr[6], DormitoryStr[i + 9], n + 1);bo = true;break;}n++;}if (bo == true){break;}}}}//宿舍房间
public class DormitoryRoom
{//宿舍地图public void DormitoryRoomMap(string account, int a, int b){//获取宿舍情况string[] DormitoryStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\DormitoryMan\Vection2.txt");int[,] DormitoryRoomStr = new int[,]{{1,1,1,1,1,1,1},{1,9,2,0,2,9,1},{1,9,0,0,0,9,1},{1,9,2,0,2,9,1},{1,2,2,0,2,2,1},{1,9,2,0,2,9,1},{1,9,0,0,0,9,1},{1,9,2,0,2,9,1},{1,1,1,0,1,1,1}};DormitoryRoomStr[a, b] = 3;string RoomStr = "一二号号铺铺三四号号铺铺";int n = 0;for (int i = 0; i < DormitoryRoomStr.GetLength(0); i++){for (int j = 0; j < DormitoryRoomStr.GetLength(1); j++){if (DormitoryRoomStr[i, j] == 0){Console.Write("  ");}if (DormitoryRoomStr[i, j] == 1){Console.Write("■");}if (DormitoryRoomStr[i, j] == 2){Console.Write("※");}if (DormitoryRoomStr[i, j] == 3){Console.Write("★");}if (DormitoryRoomStr[i, j] == 9){Console.Write(RoomStr[n]);n++;}}Console.WriteLine();}DormitoryRoomRemove(account, DormitoryRoomStr, a, b);}//在宿舍房间里移动public void DormitoryRoomRemove(string account, int[,] DormitoryRoomStr, int a, int b){string RoomStr = "一二号号铺铺三四号号铺铺";string[] AccountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");int x = a;int y = b;while (true){new CreateID().Adequatefood(account);//判断玩家食物以及宠物食物是否充足//获取玩家属性string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//玩家耐久力判断,一旦达到某个值就会自动休息new CreateID().DurabilityVerdict(attributeStr, account);bool bo = false;int rpgX = 0;//控制人物上下int rpgY = 0;//控制人物左右char ch = Console.ReadKey().KeyChar;#region 判断移动方向if (ch == 'w' || ch == 'W'){rpgX = -1;}if (ch == 's' || ch == 'S'){rpgX = 1;}if (ch == 'a' || ch == 'A'){rpgY = -1;}if (ch == 'd' || ch == 'D'){rpgY = 1;}#endregionif (x + rpgX >= DormitoryRoomStr.GetLength(0) || y + rpgY >= DormitoryRoomStr.GetLength(1)){continue;}if (DormitoryRoomStr[x + rpgX, y + rpgY] == 1 || DormitoryRoomStr[x + rpgX, y + rpgY] == 2 || DormitoryRoomStr[x + rpgX, y + rpgY] == 9){continue;}else{DormitoryRoomStr[x + rpgX, y + rpgY] = 3;DormitoryRoomStr[x, y] = 0;new School().SchoolMapRefresh(DormitoryRoomStr, RoomStr);//DormitoryMapRefresh(DormitoryMapStr);Console.Clear();new School().SchoolMapRefresh(DormitoryRoomStr, RoomStr);//DormitoryMapRefresh(DormitoryMapStr);bool bo1 = false;int n = 0;string[] accountStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");string HowSex = "";if (accountStr[2] == "男"){HowSex = "DormitoryMan";}if (accountStr[2] == "女"){HowSex = "DormitoryWoman";}//获取宿舍情况string[] DormitoryStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\" + HowSex + @"\Vection2.txt");//获取玩家网名string[] PlayerStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerData\" + account + ".txt");if (x + rpgX == 8 && y + rpgY == 3){for (int i = 0; i < DormitoryStr.Length; i += 10){for (int j = i + 3; j < i + 7; j++){if (DormitoryStr[j] == PlayerStr[6]){if (accountStr[2] == "男"){new Dormitory().DormitoryMap(account, int.Parse(DormitoryStr[0]), int.Parse(DormitoryStr[1]));}if (accountStr[2] == "女"){new Dormitory().DormitoryWomanMap(account, int.Parse(DormitoryStr[0]), int.Parse(DormitoryStr[1]));}break;}}}}int bedWhile = 0;bool bolBed = false;for (int i = 0; i < DormitoryStr.Length; i += 10){int numBed = 0;for (int j = i + 3; j < i + 7; j++){numBed++;if (DormitoryStr[j] == PlayerStr[6]){bedWhile = numBed;bolBed = true;break;}}if (bolBed == true){break;}}if (bedWhile == 1 && x + rpgX == 2 && y + rpgY == 2){RoomChange(account, x + rpgX, y + rpgY);}if (bedWhile == 2 && x + rpgX == 2 && y + rpgY == 4){RoomChange(account, x + rpgX, y + rpgY);}if (bedWhile == 3 && x + rpgX == 6 && y + rpgY == 2){RoomChange(account, x + rpgX, y + rpgY);}if (bedWhile == 4 && x + rpgX == 6 && y + rpgY == 4){RoomChange(account, x + rpgX, y + rpgY);}bo = true;}if (bo == true){x += rpgX;y += rpgY;new CreateID().attributeRefresh(attributeStr, account);new CreateID().Consume(account);//减少玩家耐久以及食物}}}//进入床铺后选项public void RoomChange(string account, int a, int b){Console.WriteLine("****************");Console.WriteLine("*  请选择操作  *");Console.WriteLine("*   1.休息     *");Console.WriteLine("*   2.贪吃蛇   *");Console.WriteLine("*   3.推箱子   *");Console.WriteLine("*   4.玩家属性 *");Console.WriteLine("*   5.退出     *");Console.WriteLine("****************");while (true){int n = new CreateID().InputDigit();switch (n){case 1: RecoverEndurance(account, a, b); break;case 2: new SnakeCoordinate().Inter(account, a, b); break;case 3: new Sokoban().Inter(account, a, b); break;case 4: new CreateID().AllInformation(account, a, b); break;case 5: DormitoryRoomMap(account, a, b); break;default:Console.WriteLine("输入错误");break;}}}//恢复耐力public void RecoverEndurance(string account, int a, int b){string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");attributeStr[4] = attributeStr[5];new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("休息中:");for (int i = 0; i < 10; i++){Thread.Sleep(800);Console.Write(">");}Console.WriteLine();Console.WriteLine("休息一下真好!!!");RoomChange(account, a, b);}}//冒险岛
public class Adventure
{//冒险岛地图public void AdventureMap(string account, int a, int b){int[,] AdventureMapStr = new int[,]{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },{1,2,0,1,0,0,0,0,0,0,0,0,0,0,0,2,1 },{1,1,0,1,0,1,0,1,1,0,1,1,1,1,1,1,1 },{1,2,0,0,0,1,0,0,1,0,1,2,1,0,0,2,1 },{1,1,1,1,1,1,1,0,1,0,1,0,1,0,1,1,1 },{1,2,0,0,0,0,0,0,1,0,0,0,0,0,1,2,1 },{1,1,1,1,0,1,1,1,1,0,1,1,1,0,1,0,1 },{1,0,0,0,0,0,0,2,1,2,1,2,0,0,1,0,1 },{1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1 },{1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1 },{1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1 }};AdventureMapStr[a, b] = 3;for (int i = 0; i < AdventureMapStr.GetLength(0); i++){for (int j = 0; j < AdventureMapStr.GetLength(1); j++){if (AdventureMapStr[i, j] == 0){Console.Write("  ");}if (AdventureMapStr[i, j] == 1){Console.Write("■");}if (AdventureMapStr[i, j] == 2){Console.Write("※");}if (AdventureMapStr[i, j] == 3){Console.Write("★");}}Console.WriteLine();}AdventureRemove(account, AdventureMapStr, a, b);}//人物移动public void AdventureRemove(string account, int[,] AdventureMapStr, int a, int b){string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//获取玩家属性里面的幸运值int LickValue = int.Parse(attributeStr[8]) / 20;int x = a;int y = b;while (true){new CreateID().Adequatefood(account);//判断玩家食物以及宠物食物是否充足//玩家耐久力判断,一旦达到某个值就会自动休息new CreateID().DurabilityVerdict(attributeStr, account);bool boBad1 = false;bool boBad2 = false;for (int i = 0; i < AdventureMapStr.GetLength(0); i++){for (int j = 0; j < AdventureMapStr.GetLength(1); j++){if (AdventureMapStr[i, j] == 4){boBad1 = true;boBad2 = true;break;}if (i == AdventureMapStr.GetLength(0) - 1 && j == AdventureMapStr.GetLength(1) - 1){boBad1 = false;boBad2 = true;break;}}if (boBad2 == true){break;}}if (boBad1 == false){Vection2 GiftBad = RandomGiftBad(AdventureMapStr);//随机生成礼包AdventureMapStr[GiftBad.x, GiftBad.y] = 4;}////没运动一次刷新玩家背包//string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");////玩家属性//string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");////玩家耐久力判断,一旦达到某个值就会自动休息//new CreateID().DurabilityVerdict(attributeStr, account);////等级判断//new CreateID().HierarchyVerdict(attributeStr, account);bool bo = false;int rpgX = 0;//控制人物上下int rpgY = 0;//控制人物左右char ch = Console.ReadKey().KeyChar;#region 判断移动方向if (ch == 'w' || ch == 'W'){rpgX = -1;}if (ch == 's' || ch == 'S'){rpgX = 1;}if (ch == 'a' || ch == 'A'){rpgY = -1;}if (ch == 'd' || ch == 'D'){rpgY = 1;}#endregionif (AdventureMapStr[x + rpgX, y + rpgY] == 1){continue;}else{if (x + rpgX == 10 && y + rpgY == 8 || x + rpgX == 10 && y + rpgY == 10){Console.WriteLine("冒险返回");new School().SchoolMap(account);}//遇到宝物bool boGift = false;if (AdventureMapStr[x + rpgX, y + rpgY] == 4){boGift = true;}AdventureMapStr[x + rpgX, y + rpgY] = 3;AdventureMapStr[x, y] = 0;new School().SchoolMapRefresh(AdventureMapStr, "  ");Console.Clear();new School().SchoolMapRefresh(AdventureMapStr, "  ");if (boGift){string[] TreasureStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt");Console.WriteLine("遇到宝物");Random LickRdom = new Random();GetTreasure(account, (LickRdom.Next(LickValue, TreasureStr.Length + 1)) / 2);}if (x + rpgX == 2 && y + rpgY == 9){Console.WriteLine("怪物等级偏高,请慎入!!!");}if (x + rpgX == 8 && y + rpgY == 15){Console.WriteLine("即将遇到最终大boos");}Random radMonster = new Random();//怪物1                            //怪物2                         //怪物3                            //怪物4                            //怪物5                                if (x + rpgX == 7 && y + rpgY == 7 || x + rpgX == 5 && y + rpgY == 1 || x + rpgX == 1 && y + rpgY == 1 || x + rpgX == 3 && y + rpgY == 1 || x + rpgX == 7 && y + rpgY == 7){Console.WriteLine("遭遇怪物");EncounterMonster(account, radMonster.Next(1, 6), x + rpgX, y + rpgY, rpgX, rpgY);}//怪物6--9if (x + rpgX == 1 && y + rpgY == 15 || x + rpgX == 3 && y + rpgY == 11 || x + rpgX == 3 && y + rpgY == 15 || x + rpgX == 7 && y + rpgY == 11){Console.WriteLine("遭遇怪物");EncounterMonster(account, radMonster.Next(6, 10), x + rpgX, y + rpgY, rpgX, rpgY);}//怪物10if (x + rpgX == 5 && y + rpgY == 15){Console.WriteLine("遭遇怪物");EncounterMonster(account, 10, x + rpgX, y + rpgY, rpgX, rpgY);}bo = true;}if (bo == true){x += rpgX;y += rpgY;new CreateID().Consume(account);//减少玩家耐久以及食物}}}//遭遇怪物public void EncounterMonster(string account, int MonNum, int x, int y, int RpgX, int RpgY){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");Console.WriteLine("是否战斗");bool bo = new CreateID().IsAffirm();if (bo){PetList(account);Console.WriteLine("请选择出战宠物,输入序号:");while (true){int n = new CreateID().InputDigit();if (n < (backpackStr.Length / 10) && n > 0){Random rd = new Random();int num = rd.Next(1, 3);//backpackStr[i+0],backpackStr[i + 2],backpackStr[i + 3],backpackStr[i + 4],backpackStr[i + 5]File.WriteAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\PlayerPet.txt", backpackStr[n * 10 + 0]);File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\PlayerPet.txt", "\n" + backpackStr[n * 10 + 2]);File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\PlayerPet.txt", "\n" + backpackStr[n * 10 + 4]);File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\PlayerPet.txt", "\n" + backpackStr[n * 10 + 5]);File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\PlayerPet.txt", "\n" + backpackStr[n * 10 + 6]);string[] MonsterStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\Monster.txt");for (int i = 0; i < 5; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\HitOut.txt", MonsterStr[(MonNum - 1) * 5 + i]);}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\HitOut.txt", "\n" + MonsterStr[(MonNum - 1) * 5 + i]);}}Autofight(account, n, x, y);//自动战斗}else{Console.WriteLine("输入错误,请重新输入");}}}else{AdventureMap(account, x - RpgX, y - RpgY);}}//自动战斗public void Autofight(string account, int n, int x, int y){while (true){string[] playerPetStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\PlayerPet.txt");string[] enemyStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\HitOut.txt");string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");//获取玩家属性里面的幸运值if (float.Parse(playerPetStr[4]) <= 0){Console.WriteLine("宠物死亡,任务失败");Quit(account, n, x, y);}if (float.Parse(enemyStr[4]) <= 0){Console.WriteLine("宠物胜利,过关");PetWin(account, n, x, y);}Thread.Sleep(500);//玩家宠物攻击Console.WriteLine("我方宠物开始攻击-->");Random pet = new Random();int petNum = pet.Next(2, 6);if (petNum >= 4){Console.WriteLine("怪物轻飘飘闪避我方宠物攻击!");}else{if (petNum == 2){Console.WriteLine("怪物竟然反击也发起攻击");if (float.Parse(playerPetStr[2]) > float.Parse(enemyStr[2])){Console.WriteLine("我方宠物攻击力大于怪物攻击力,怪物受到{0}点伤害", (float.Parse(playerPetStr[2]) - float.Parse(enemyStr[2])));enemyStr[4] = (float.Parse(enemyStr[4]) - float.Parse(playerPetStr[2]) + float.Parse(enemyStr[2])).ToString();}else{Console.WriteLine("怪物宠物反击见效,我方宠物受到{0}点伤害", (float.Parse(enemyStr[2]) - float.Parse(playerPetStr[2])));playerPetStr[4] = (float.Parse(playerPetStr[4]) - float.Parse(enemyStr[2]) + float.Parse(playerPetStr[2])).ToString();}}if (petNum == 3){Console.WriteLine("怪物进行防御>>>");if (float.Parse(playerPetStr[2]) > float.Parse(enemyStr[3])){Console.WriteLine("我方宠物攻破怪物防御,怪物受到{0}点伤害", (float.Parse(playerPetStr[2]) - float.Parse(enemyStr[3])));enemyStr[4] = (float.Parse(enemyStr[4]) - float.Parse(playerPetStr[2]) + float.Parse(enemyStr[3])).ToString();}else{Console.WriteLine("怪物皮糙肉厚,我方宠物未攻破怪物防御!!!(*_*)");}}}Thread.Sleep(500);//怪物攻击Console.WriteLine("怪物发动攻击-->");int NumStr = int.Parse(attributeStr[2]) / 50;//智力值来让玩家宠物躲避攻击Random enemy = new Random();int enenyNum = enemy.Next(2, 5 + NumStr);if (enenyNum >= 4){Console.WriteLine("我方宠物麻溜地躲避了攻击!!!");}else{if (enenyNum == 2){Console.WriteLine("再怪物发动攻击之际,我方宠物奋起反击,也发动攻击-->");if (float.Parse(enemyStr[2]) > float.Parse(playerPetStr[2])){Console.WriteLine("我方宠物反击无效,受到了{0}点伤害", (float.Parse(enemyStr[2]) - float.Parse(playerPetStr[2])));playerPetStr[4] = (float.Parse(playerPetStr[4]) - float.Parse(enemyStr[2]) + float.Parse(playerPetStr[2])).ToString();}else{Console.WriteLine("我方宠物反击有见效,使得怪物受到{0}点伤害", (float.Parse(playerPetStr[2]) - float.Parse(enemyStr[2])));enemyStr[4] = (float.Parse(enemyStr[4]) - float.Parse(playerPetStr[2]) + float.Parse(enemyStr[2])).ToString();}}if (enenyNum == 3){Console.WriteLine("我方宠物进行防御抗揍>>>");if (float.Parse(enemyStr[2]) > float.Parse(playerPetStr[3])){Console.WriteLine("皮薄防御未见成效,受到了{0}点伤害", (float.Parse(enemyStr[2]) - float.Parse(playerPetStr[3])));playerPetStr[4] = (float.Parse(playerPetStr[4]) - float.Parse(enemyStr[2]) + float.Parse(playerPetStr[3])).ToString();}else{Console.WriteLine("我方宠物拼命护住脸,保住了脸面,未受到伤害!!!(^_^)");}}}Console.WriteLine("按F键加血,按T撤退");Thread.Sleep(1000);Console.WriteLine(">");if (Console.KeyAvailable){ConsoleKeyInfo info = Console.ReadKey(true);if (info.Key == ConsoleKey.F){playerPetStr[4] = (float.Parse(playerPetStr[4]) + 50).ToString();backpackStr[3] = (int.Parse(backpackStr[3]) - 1).ToString(); ;new CreateID().backpackRefresh(backpackStr, account);}if (info.Key == ConsoleKey.T){Console.WriteLine("战略撤退!!!");AdventureMap(account, x, y);}}Refresh(playerPetStr, "PlayerPet");Refresh(enemyStr, "HitOut");}}//宠物列表public void PetList(string account){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");int n = 0;for (int i = 10; i < backpackStr.Length; i += 10){n++;Console.WriteLine("{0}: 姓名:{1}  等级:{2}  攻击:{3}  防御:{4}  血量:{5}", n, backpackStr[i + 0], backpackStr[i + 2], backpackStr[i + 4], backpackStr[i + 5], backpackStr[i + 6]);}}//怪物信息刷新public void Refresh(string[] _str, string _name){for (int i = 0; i < _str.Length; i++){if (i == 0){File.WriteAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\" + _name + ".txt", _str[i]);}else{File.AppendAllText(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\" + _name + ".txt", "\n" + _str[i]);}}Console.WriteLine("姓名:{0}  等级:{1}  攻击:{2}  防御:{3}  血量:{4}", _str[0], _str[1], _str[2], _str[3], _str[4]);}//失败public void Quit(string account, int n, int x, int y){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");Console.WriteLine("宠物死亡,是否复活宠物,需要{0}金", (int.Parse(backpackStr[n * 10 + 9]) * 6 / 10));bool bo = new CreateID().IsAffirm();if (bo && int.Parse(backpackStr[0]) > (int.Parse(backpackStr[n * 10 + 9]) * 6 / 10)){backpackStr[0] = (int.Parse(backpackStr[0]) - (int.Parse(backpackStr[n * 10 + 9]) * 6 / 10)).ToString(); ;Console.WriteLine("{0}已经被复活", backpackStr[n * 10]);}else{if (int.Parse(backpackStr[0]) < (int.Parse(backpackStr[n * 10 + 9]) * 6 / 10)){Console.WriteLine("金钱不足,宠物死亡");}Console.WriteLine("{0}死亡", backpackStr[n * 10]);string[] backpack = new string[backpackStr.Length - 10];for (int i = 0; i < n * 10; i++){backpack[i] = backpackStr[i];}for (int i = n * 10 + 10; i < backpackStr.Length; i++){backpack[i - 10] = backpackStr[i];}new CreateID().PetVerdict(backpack, account);//刷新等级以及背包}AdventureMap(account, x, y);//Thread.Sleep(2000);//Environment.Exit(0);}//宠物胜利public void PetWin(string account, int n, int x, int y){string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");string[] enemyStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\HitOut.txt");Console.WriteLine("获得金币:{0}金,药丸:{1}粒", enemyStr[3], enemyStr[1]);backpackStr[0] = (float.Parse(backpackStr[0]) + float.Parse(enemyStr[3])).ToString(); //怪物的防御作为金币backpackStr[3] = (int.Parse(backpackStr[3]) + int.Parse(enemyStr[1])).ToString(); ;//怪物等级作为药丸量backpackStr[n * 10 + 3] = (int.Parse(backpackStr[n * 10 + 3]) + int.Parse(enemyStr[2])).ToString(); ;//怪物的攻击作经验值new CreateID().PetVerdict(backpackStr, account);//等级判断并且刷新背包new CreateID().attributeRefresh(attributeStr, account);AdventureMap(account, x, y);}//随机宝物public Vection2 RandomGiftBad(int[,] AdventureMapStr){while (true){Random rd = new Random();int x = rd.Next(0, AdventureMapStr.GetLength(0));int y = rd.Next(0, AdventureMapStr.GetLength(1));if (AdventureMapStr[x, y] == 1 || AdventureMapStr[x, y] == 3 || AdventureMapStr[x, y] == 2 || (x == 10 && y == 8) || (x == 10 && y == 10)){continue;}else{return new Vection2() { x = x, y = y };}}}//获得宝物public void GetTreasure(string account, int lickNum){string[] TreasureStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\SystemMessage\Adventure\LuckyValue.txt");string[] backpackStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\backpack.txt");Console.WriteLine("获得宝物:\n{0}粒药丸\n{1}金", TreasureStr[lickNum * 2 - 1], TreasureStr[lickNum * 2]);backpackStr[0] = (float.Parse(backpackStr[0]) + float.Parse(TreasureStr[lickNum * 2])).ToString();backpackStr[3] = (float.Parse(backpackStr[3]) + float.Parse(TreasureStr[lickNum * 2 - 1])).ToString();new CreateID().backpackRefresh(backpackStr, account);}
}//游戏
//
//贪吃蛇游戏
public class SnakeCoordinate
{public int x;public int y;public SnakeCoordinate(){}//贪吃蛇首界面public void Inter(string account, int a, int b){Console.WriteLine("**************");Console.WriteLine("*   请选择   *");Console.WriteLine("* 1.开始游戏 *");Console.WriteLine("* 2.退出     *");Console.WriteLine("**************");for (int i = 0; true; i++){string str = Console.ReadLine();int n = 0;if (int.TryParse(str, out n)){switch (n){case 1: Remove(account, a, b); break;case 2: Quit(account, a, b); break;default:Console.WriteLine("输入不正确,请重新输入");break;}}else{Console.WriteLine("输入不正确,请重新输入");}}}//游戏失败后选择public void RemoveAgain(string account, int a, int b){Console.WriteLine("**************");Console.WriteLine("*   请选择   *");Console.WriteLine("* 1.重新开始 *");Console.WriteLine("* 2.退出     *");Console.WriteLine("**************");for (int i = 0; true; i++){string str = Console.ReadLine();int n = 0;if (int.TryParse(str, out n)){switch (n){case 1: Remove(account, a, b); break;case 2: new DormitoryRoom().RoomChange(account, a, b); break;default:Console.WriteLine("输入不正确,请重新输入");break;}}else{Console.WriteLine("输入不正确,请重新输入");}}}//退出public void Quit(string account, int a, int b){Console.WriteLine("游戏失败!自动返回宿舍房间");new DormitoryRoom().RoomChange(account, a, b);//Environment.Exit(0);}//游戏通关public void GameVictory(string account, int a, int b){string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");attributeStr[4] = (float.Parse(attributeStr[4]) + 10).ToString();attributeStr[5] = (float.Parse(attributeStr[5]) + 10).ToString();new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("游戏通关,耐久力加10!自动返回宿舍房间");new DormitoryRoom().RoomChange(account, a, b);}//刷新界面public void Labyrinth(int[,] num, List<SnakeCoordinate> list){for (int i = 0; i < num.GetLength(0); i++){for (int j = 0; j < num.GetLength(1); j++){if (num[i, j] == 1){Console.Write("■");}if (num[i, j] == 0){Console.Write("  ");}if (num[i, j] == 3){Console.Write("◆");}if (i == list[list.Count - 1].x && j == list[list.Count - 1].y){Console.Write("♀");}else if (num[i, j] == 2){Console.Write("●");}}Console.WriteLine();}}//随机生成方块public SnakeCoordinate RandeDiamonds(int[,] num, List<SnakeCoordinate> list){Random tmp = new Random();Random tmps = new Random();bool bo = false;int tmp1 = 0;int tmp2 = 0;while (true){tmp1 = tmp.Next(0, num.GetLength(0));tmp2 = tmps.Next(0, num.GetLength(1));if (num[tmp1, tmp2] == 1){continue;}else{for (int k = 0; k < list.Count; k++){if (list[k].x == tmp1 && list[k].y == tmp2){break;}if (k == list.Count - 1){return new SnakeCoordinate() { x = tmp1, y = tmp2 };bo = true;}}}if (bo == true){break;}}return new SnakeCoordinate() { x = tmp1, y = tmp2 };}//是否包含方块public bool IsContains(int[,] num){for (int i = 0; i < num.GetLength(0); i++){for (int j = 0; j < num.GetLength(1); j++){if (num[i, j] == 3){return false;break;}if (i == num.GetLength(0) - 1 && j == num.GetLength(1) - 1){return true;break;}}}return true;}//是否包含蛇自己public bool IsIsContainsSelf(List<SnakeCoordinate> list, SnakeCoordinate snake){for (int i = 0; i < list.Count; i++){if (list[i].x == snake.x && list[i].y == snake.y){return false;}if (i == list.Count - 1){return true;}}return true;}//是否包含墙壁public bool ISContainsCube(int[,] num, SnakeCoordinate snake){if (num[snake.x, snake.y] == 1){return false;}else{return true;}}//移动public void Remove(string account, int x, int y){List<SnakeCoordinate> list = new List<SnakeCoordinate>();int a = 0;int b = 0;bool bo;int[,] num = new int[,]{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 },{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }};for (int i = 0; i < num.GetLength(0); i++){for (int j = 0; j < num.GetLength(1); j++){if (num[i, j] == 1){Console.Write("■");}if (num[i, j] == 0){Console.Write("  ");}if (num[i, j] == 2){list.Add(new SnakeCoordinate() { x = i, y = j });a = i;b = j;Console.Write("♀");}if (num[i, j] == 3){Console.Write("◆");}}Console.WriteLine();}while (true){if (list.Count == 10){Console.WriteLine("game over,player victory");GameVictory(account, x, y);}bo = false;if (new SnakeCoordinate().IsContains(num)){//SnakeCoordinate sna = new SnakeCoordinate().RandeDiamonds(num, list);num[new SnakeCoordinate().RandeDiamonds(num, list).x, new SnakeCoordinate().RandeDiamonds(num, list).y] = 3;}int aa = 0;int bb = 0;Console.WriteLine("按英文格式下w,s,a,d控制♀移动吃掉◆!");Console.WriteLine("    现在:{0}分", list.Count - 1);char str = Console.ReadKey().KeyChar;Console.WriteLine();if (str == 'w'){aa = -1;}if (str == 's'){aa = 1;}if (str == 'a'){bb = -1;}if (str == 'd'){bb = 1;}if (num[a + aa, b + bb] == 1){Console.WriteLine("game over,player death");RemoveAgain(account, x, y);break;}else{if (num[a + aa, b + bb] == 3){list.Add(new SnakeCoordinate() { x = a + aa, y = b + bb });num[a + aa, b + bb] = 2;new SnakeCoordinate().Labyrinth(num, list);Console.Clear();new SnakeCoordinate().Labyrinth(num, list);bo = true;}else{if (new SnakeCoordinate().IsIsContainsSelf(list, new SnakeCoordinate() { x = a + aa, y = b + bb }) == true){list.Add(new SnakeCoordinate() { x = a + aa, y = b + bb });num[a + aa, b + bb] = 2;SnakeCoordinate snake = list[0];num[snake.x, snake.y] = 0;list.RemoveAt(0);new SnakeCoordinate().Labyrinth(num, list);Console.Clear();new SnakeCoordinate().Labyrinth(num, list);bo = true;}else{Console.WriteLine("game over,player death");RemoveAgain(account, x, y);break;}}if (bo == true){a += aa;b += bb;}}}}
}//推箱子游戏
public class Sokoban
{public int x;public int y;//贪吃蛇首界面public void Inter(string account, int x, int y){Console.WriteLine("**************");Console.WriteLine("*   请选择   *");Console.WriteLine("* 1.开始游戏 *");Console.WriteLine("* 2.退出     *");Console.WriteLine("**************");for (int i = 0; true; i++){string str = Console.ReadLine();int n = 0;if (int.TryParse(str, out n)){switch (n){case 1: SokobanMap(account, x, y); break;case 2: Quit(account, x, y); break;default:Console.WriteLine("输入不正确,请重新输入");break;}}else{Console.WriteLine("输入不正确,请重新输入");}}}//游戏失败后选择public void RemoveAgain(string account, int x, int y){Console.WriteLine("**************");Console.WriteLine("*   请选择   *");Console.WriteLine("* 1.重新开始 *");Console.WriteLine("* 2.退出     *");Console.WriteLine("**************");for (int i = 0; true; i++){string str = Console.ReadLine();int n = 0;if (int.TryParse(str, out n)){switch (n){case 1: SokobanMap(account, x, y); break;case 2: new DormitoryRoom().RoomChange(account, x, y); break;default:Console.WriteLine("输入不正确,请重新输入");break;}}else{Console.WriteLine("输入不正确,请重新输入");}}}//退出public void Quit(string account, int x, int y){Console.WriteLine("游戏失败!自动返回宿舍房间");new DormitoryRoom().RoomChange(account, x, y);//Environment.Exit(0);}//游戏通关public void GameVictory(string account, int a, int b){string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");attributeStr[6] = (float.Parse(attributeStr[6]) + 6).ToString();attributeStr[7] = (float.Parse(attributeStr[7]) + 6).ToString();new CreateID().attributeRefresh(attributeStr, account);Console.WriteLine("游戏通关,负重加6!自动返回宿舍房间");new DormitoryRoom().RoomChange(account, a, b);}//推箱子地图public void SokobanMap(string account, int x, int y){int a = 0;int b = 0;int[,] num = new int[10, 10]//制作地图{{1,1,1,1,1,1,1,1,1,1 },{1,2,1,1,4,1,1,4,1,1 },{1,0,3,0,0,3,0,0,4,1 },{1,1,1,0,0,1,1,3,1,1 },{1,4,3,0,1,0,0,0,0,1 },{1,1,0,0,0,0,0,1,0,1 },{1,4,1,0,0,1,0,3,0,1 },{1,0,3,3,1,1,1,1,0,1 },{1,0,0,0,0,0,4,1,4,1 },{1,1,1,1,1,1,1,1,1,1 }};for (int i = 0; i < num.GetLength(0); i++){for (int j = 0; j < num.GetLength(1); j++){if (num[i, j] == 0){Console.Write("  ");}if (num[i, j] == 1){Console.Write("■");}if (num[i, j] == 2){a = i;b = j;Console.Write("♀");}if (num[i, j] == 3){Console.Write("◆");}if (num[i, j] == 4){Console.Write("○");}}Console.WriteLine();}Stater(num, a, b, account, x, y);}//开始控制人物移动public void Stater(int[,] num, int a, int b, string account, int x, int y){int n = 0;while (true){bool bo = false;if (IsContains4(num) == false){Console.WriteLine("Game Over,Player Victory");GameVictory(account, x, y);}if (n == 55){Console.WriteLine("游戏结束");RemoveAgain(account, x, y);}Console.WriteLine("按英文格式下w,s,a,d控制♀推◆到○处!");Console.WriteLine("还剩{0}步", 55 - n);char str = Console.ReadKey().KeyChar;//从键盘上输入键int aa = 0;int bb = 0;if (str == 'w'){aa = -1;}if (str == 's'){aa = 1;}if (str == 'a'){bb = -1;}if (str == 'd'){bb = 1;}if (num[a + aa, b + bb] == 1 || num[a + aa, b + bb] == 4)//判断任务移动坐标是否包含1和4{continue;}if (num[a + aa, b + bb] == 0){num[a + aa, b + bb] = 2;num[a, b] = 0;Remove(num);Console.Clear();Remove(num);bo = true;}if (num[a + aa, b + bb] == 3 && num[a + aa + aa, b + bb + bb] != 1 && num[a + aa + aa, b + bb + bb] != 3)//判断箱子移动坐标是否包含3和不能包含1{num[a + aa + aa, b + bb + bb] = 3;num[a + aa, b + bb] = 2;num[a, b] = 0;Remove(num);Console.Clear();Remove(num);bo = true;}if (bo == true){a += aa;b += bb;n++;}}}//刷新物体坐标public void Remove(int[,] num){for (int i = 0; i < num.GetLength(0); i++){for (int j = 0; j < num.GetLength(1); j++){if (num[i, j] == 0){Console.Write("  ");}if (num[i, j] == 1){Console.Write("■");}if (num[i, j] == 2){Console.Write("♀");}if (num[i, j] == 3){Console.Write("◆");}if (num[i, j] == 4){Console.Write("○");}}Console.WriteLine();}}//判断是否还有空地○public bool IsContains4(int[,] num){for (int i = 0; i < num.GetLength(0); i++){for (int j = 0; j < num.GetLength(1); j++){if (num[i, j] == 4){return true;}if (i == num.GetLength(0) - 1 && j == num.GetLength(1)){return false;}}}return false;}//获取箱子对应的点public List<Sokoban> Is(int[,] num){List<Sokoban> list = new List<Sokoban>();for (int i = 0; i < num.GetLength(0); i++){for (int j = 0; j < num.GetLength(1); j++){if (num[i, j] == 4){list.Add(new Sokoban() { x = i, y = j });}}}return list;}}//隐藏任务
public class SecretMissions
{//上网public void surfTheInternet(string account){string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");Console.WriteLine("愉快的逃出学校上网中(^_^)");for (int i = 0; i < 10; i++){Thread.Sleep(800);Console.WriteLine(">");}attributeStr[2] = (int.Parse(attributeStr[2]) + 10).ToString();attributeStr[3] = (int.Parse(attributeStr[3]) + 10).ToString();new CreateID().attributeRefresh(attributeStr, account);}//进入异性宿舍public void IsomerismRoom(string account){string[] attributeStr = File.ReadAllLines(@"D:\AllMyLife\DataCenter\PlayerBackpack\" + account + @"\attribute.txt");for (int i = 0; i < 10; i++){Thread.Sleep(800);Console.WriteLine(">");}attributeStr[8] = (int.Parse(attributeStr[8]) + 5).ToString();//幸运值attributeStr[9] = (int.Parse(attributeStr[9]) + 5).ToString();new CreateID().attributeRefresh(attributeStr, account);}
}class Program
{static void Main(string[] args){new CreateID().Inter();// new Adventure().AdventureMap("1369276274", 10,8);Console.ReadKey();}
}

}

//在D盘创建一个文件夹,做数据库,如下图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 在WinCE下绘制半透的效果要注意的问题

    在Windows XP 中实现半透明效果并不是件难事,仅仅只需要调SetLayeredWindowAttributes函数即可。如果同样的效果也想在Windows CE 中重现呢?因为Windows CE没有SetLayeredWindowAttributes 函数,不过在Windows CE 5.0开始支持AlphaBlend,该函数的作用是将两个HDC根据一定的比…...

    2024/4/21 8:53:00
  2. 基于状态模式的简单工作流实现

    **欢迎关注公众号****微信扫一扫**工作流技术(Workflow) 是工作流程的计算模型,即将工作流程中的工作如何前后组织在一起的逻辑和规则在计算机中以恰当的模型进行表示,并对其实施计算。工作流要解决的主要问题是:为实现某个业务目标,在多个参与者之间,利用计算机,按某种…...

    2024/4/21 8:52:59
  3. 关于sql和MySQL的语句执行顺序(必看!!!)

    今天遇到一个问题就是mysql中insert into 和update以及delete语句中能使用as别名吗?目前还在查看,但是在查阅资料时发现了一些有益的知识,给大家分享一下,就是关于sql以及MySQL语句执行顺序:sql和mysql执行顺序,发现内部机制是一样的。最大区别是在别名的引用上。 一、s…...

    2024/4/20 9:11:27
  4. VS2010/MFC 中MessageBox函数显示变量的用法(显示数字、字符串)

    在VS2010/MFC中明显感觉到MessageBox()的用法和VC6.0不一样了。 今天用到了MessageBox()函数的时候,用VC6.0的方式貌似行不通的说, 各种尝试之后,找到了一种显示变量的比较简单的方式,共享一下。//VS/MFC中MessageBox用法//(1)、弹出数字CString msg;msg.Format(_T("…...

    2024/4/21 8:52:57
  5. 《大富翁8》中智力问答的题目、答案

    去了一次现金流俱乐部,回来想想还是拿《大富翁8》练练手,当夜就熬到3点,最后以破产告终。还是觉得这个游戏有些弱智,不过比较适合几个朋友或者男女朋友之间娱乐之用,还是有些意思。其中的一些问答对于我们这些richman的非忠实玩家来说还是有些难度,网上搜了题目和答案,附…...

    2024/4/24 11:37:46
  6. SQL - 单引号和双引号的区别

    原文转载至:SQL中的单引号和双引号有区别吗?在标准 SQL 中,字符串使用的是单引号。 如果字符串本身也包括单引号,则使用两个单引号(注意,不是双引号,字符串中的双引号不需要另外转义)。 但在其它的数据库中可能存在对 SQL 的扩展,比如在 MySQL 中允许使用单引号和双引…...

    2024/4/20 18:21:20
  7. GDI绘制png

    最近做的一个项目,用GDI+来做绘制,最后发现效率很慢,和GDI的效率相差不止一个数量级。 最后决定还是用GDI来绘制。 问题很快出现了,以前的很多效果是带alpha透明的png来贴图实现的,这用GDI+很容易做到,但是用GDI就很麻烦了。 我想了一个折中的办法,是这样做的:用GDI+把…...

    2024/4/20 10:00:53
  8. C#中,messagebox 用法大全,珍藏!

    我们在程序中经常会用到MessageBox, MessageBox.Show()共有21中重载方法。现将其常见用法总结如下: 1.MessageBox.Show("Hello~~~~");最简单的,只显示提示信息。2.MessageBox.Show("There are something wrong!","ERROR");可以给消息框加上标…...

    2024/4/20 1:43:09
  9. 图形图像处理-之-任意角度的高质量的快速的图像旋转 下篇 补充话题

    tag:图像旋转,任意角度,图像缩放,速度优化,定点数优化,近邻取样插值,二次线性插值, 三次卷积插值,MipMap链,三次线性插值,MMX/SSE优化,CPU缓存优化,AlphaBlend,颜色混合,并行摘要: 该文章是《任意角度的高质量的快速的图像旋转》的一些高级补充话题; 给出了一个完整的Al…...

    2024/4/20 18:21:17
  10. 宫本茂的童心和乔布斯的叛逆--设计哲学背后的文化基因 zt

    2008-02-02 13:05 任天堂的掌上游戏机NDSL里有一个叫《吉娃娃》的养狗游戏,让我这个对真狗兴趣不大的人忽然有了对宠物的兴趣。用笔可以以不同的手法去抚摸狗,不同的抚摸方式,会让那条狗作出各种可爱的动作,通过语音识别技术,我可以给狗起名字,并用说话来训练狗“坐下,…...

    2024/4/21 8:52:55
  11. JavaActivity工作流

    一、 什么是工作流 以请假为例,现在大多数公司的请假流程是这样的 员工打电话(或网聊)向上级提出请假申请——上级口头同意——上级将请假记录下来——月底将请假记录上交公司——公司将请假录入电脑 采用工作流技术的公司的请假流程是这样的 员工使用账户登录系统——点击请…...

    2024/4/21 8:52:54
  12. hive函数 -- stddev , stddev_pop , stddev_samp , var_pop , var_samp

    标准差是方差的平方根 1.方差公式: m为x1,x2...xn数列的期望值(平均数) s^2 = [(x1-m)^2 + (x2-m)^2 + ... (xn-m)^2]/n s即为标准差 s^2为方差。 2.实例: hive> select * from dim_row_num limit 10; O…...

    2024/4/20 17:17:25
  13. 【Activiti】 Activiti工作流引擎 - 提交审批和审批处理示例详解 【精品】

    在上一篇的文章中,我给大家分享了Activiti工作流引擎的API的封装代码,通过我们自己封装的代码,在实际的项目中我们就可以进行工作流相关的开发了。以下内容我们分三个部分:提交审批,审批列表查询,审批处理。一、提交审批提交审批之前,我们需要做好相关的准备工作。在上文…...

    2024/4/21 8:52:52
  14. MFC中MessageBox()用法!

    函数原型:int MessageBox( HWND hWnd, LPCTSTR lpText, LPCSTR lpCaption,UINT uStyle ); 注:应先将项目属性中的字符集属性改为多字符集(Unicode)。参数解释:hwnd:父窗口的句柄,为NULL说明消息框没有父窗口;大多数情况下可以省略不写。lpText:指向要显示字符串的指针…...

    2024/4/21 8:52:55
  15. Ernest Adams总结50个最伟大的游戏创意

    作者:Ernest Adams 50年以前,William Higinbotham用一个示波器和一些模拟电路制作了第一款电子游戏。虽然自那以后,游戏已经发生了翻天覆地的变化,但今天的AAA游戏大作的成功也部分归功于数年以前就存在的设计创新。在本文中,我将罗列我认为特别重要的50个设计创新(或某天…...

    2024/4/21 8:52:50
  16. 图形图像处理-之-任意角度的高质量的快速的图像旋转

    图形图像处理-之-任意角度的高质量的快速的图像旋转 转自:http://blog.chinaunix.net/uid-20306372-id-1707267.html 上篇 纯软件的任意角度的快速旋转 HouSisong@GMail.com 2007.04.26tag:图像旋转,任意角度,图像缩放,速度优化,定点数优化,…...

    2024/4/21 8:52:49
  17. 基于J2EE的柔性工作流引擎的设计与实现

    摘要 工作流的柔性问题日益成为研究的热点,本文在分析工作流和分布式计算技术J2EE的基础上,给出一个基于J2EE的柔性工作流引擎的设计方案及其关键部分的实现技术。 关键词 工作流引擎,柔性,J2EE1 引言在一个企业或部门的日常活动中,70%以上属于流程类的活动,如生产流程,…...

    2024/4/21 8:52:48
  18. 【ASP.NET】2.SQL server2008卸载怎么清理注册表

    标准的卸载方法无法完全清除sqlserver2008,导致重装sqlserver报错,下面介绍一下不借助任何软件完全卸载sqlserver2008数据库软件。(1)点击计算机右下角“开始”,点击“控制面板”,点击“程序”。在程序列表中找到“Microsoft SQL Server 2008”,右击 选“卸载”(或双击…...

    2024/4/21 8:52:47
  19. 高科技公司名字的由来

    1. Google - 谷歌 - googol 巨大的數字2. Microsoft - 微軟 - microcomputer and software 微電腦和軟件3. Twitter - 推特Twitter(中文称:推特)是国外的一个社交网络及微博客服务的网站。Twitter这一名称是从帽子中抓阄抓出来的。一天,旧金山的播客 (视频分享)创业公司Odeo几…...

    2024/4/21 8:52:46
  20. SQL数据库快速入门基础

    SQL(Structure Query Language,结构化查询语言)语言是国际标准化组织(ISO)采纳的标准数据库语言。 数据库就是一幢大楼,我们要先盖楼,然后再招住户(住户当然就是数据库对象,)。我们盖得大楼的基本格局设计师们已经为我们设计好,我们在创建数据库过程中,系统(设计师)…...

    2024/4/21 8:52:45

最新文章

  1. Web前端开发 小实训(二) 简易计算器

    实训目的 学生能够使用函数完成简易计算器编写 操作步骤 1、请将加减乘除四个方法生成为以下函数&#xff0c;且有返回值 中文英语加法add减法subtract乘法multi除法division次幂pow()平方根sqrt() 提示&#xff1a; 除法中的除数不能为0&#xff01; 参考代码&#xff1…...

    2024/4/28 1:28:37
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. 北航2023年考研机试题

    【问题描述】一共6个手机基站&#xff0c;具有记录手机连接基站的能力&#xff0c;6个手机基站分别为ABCDEF&#xff0c;他们具有自己的覆盖范围且任何两个基站的覆盖范围不想交&#xff0c;基站保存的手机登陆日志包括手机号&#xff08;11位&#xff0c;用字符串保存&#xf…...

    2024/4/23 6:26:10
  4. Node.js------Express

    ◆ 能够使用 express.static( ) 快 速 托 管 静 态 资 源◆ 能够使用 express 路 由 精 简 项 目 结 构◆ 能够使用常见的 express 中间件◆ 能够使用 express 创建API接口◆ 能够在 express 中启用cors跨域资源共享 一.初识Express 1.Express 简介 官方给出的概念&#xff…...

    2024/4/25 23:12:27
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/4/26 18:09:39
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/4/26 20:12:18
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/26 23:05:52
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/4/27 4:00:35
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/27 17:58:04
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/27 14:22:49
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/28 1:28:33
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/27 9:01:45
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/27 17:59:30
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/4/25 18:39:16
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/25 18:39:16
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/26 19:03:37
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/28 1:22:35
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/25 18:39:14
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/4/26 23:04:58
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/27 23:24:42
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/25 18:39:00
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/26 19:46:12
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/4/27 11:43:08
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/27 8:32:30
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57