public override void SetDeep() { var saver = new SerializeDataSaver(); var p = @"C:\Users\Programmer\Desktop\Projects\MVPFish — копия — копия\Fishing.BL\Model\Waters" + Path.DirectorySeparatorChar + Game.Game.GetGame().CurrentWater.Name + Path.DirectorySeparatorChar + "Болото"; var deepField = saver.Load <LabelInfo[, ]>(p + "\\" + "DeepField.dat"); DeepArray = new Label[Widgth, Height]; for (var y = 0; y < Height; y++) { for (var x = 0; x < Widgth; x++) { DeepArray[x, y] = new Label() { Left = DeepTiesStartX + 5 + x * 40, Top = DeepTiesStartY + y * 23, Height = 23, TextAlign = ContentAlignment.MiddleLeft, ForeColor = Color.White, Width = 40, Visible = true, Font = new Font("Arial", 8, FontStyle.Regular), BorderStyle = BorderStyle.FixedSingle, Text = deepField[x, y].Deep, Tag = deepField[x, y].IsSnag }; } } }
public override Water GetLVL(string name) { var path = @"C:\Users\Programmer\Desktop\Projects\MVPFish — копия — копия\Fishing.BL\Model\Waters" + "\\" + name; var s = new SerializeDataSaver(); var sb = File.ReadAllText(path + "\\" + "WaterInfo"); var ar = sb.Split(' '); MapImage = Image.FromFile(path + "\\" + "MapImg.png"); Name = ar[0]; MinLVL = Convert.ToInt32(ar[1]); DailyPrice = Convert.ToInt32(ar[2]); KmFromNearestStation = Convert.ToInt32(ar[3]); Locations = s.Load <List <PicturesBoxInfo> >(path + "\\" + "Map.dat"); return(this); }