Ejemplo n.º 1
0
 public TeamPicksAndViews ParseJsonToRadPick(PicksBans pb)
 {
     TeamPicksAndViews teamPicks = new TeamPicksAndViews ();
     List<HeroAndView> listPB = new List<HeroAndView> ();
     HeroAndView hav = new HeroAndView ();
     //Radiant Picks
     hav.HeroId = pb.ListPicks [0];
     hav.ResourceId = Resource.Id.radiantPick1;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListPicks [1];
     hav.ResourceId = Resource.Id.radiantPick2;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListPicks [2];
     hav.ResourceId = Resource.Id.radiantPick3;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListPicks [3];
     hav.ResourceId = Resource.Id.radiantPick4;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListPicks [4];
     hav.ResourceId = Resource.Id.radiantPick5;
     listPB.Add (hav);
     teamPicks.ListPicksView = listPB;
     //Radiant bans
     hav = new HeroAndView ();
     listPB = new List<HeroAndView> ();
     hav.HeroId = pb.ListBans [0];
     hav.ResourceId = Resource.Id.radiantBan1;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListBans [1];
     hav.ResourceId = Resource.Id.radiantBan2;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListBans [2];
     hav.ResourceId = Resource.Id.radiantBan3;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListBans [3];
     hav.ResourceId = Resource.Id.radiantBan4;
     listPB.Add (hav);
     hav = new HeroAndView ();
     hav.HeroId = pb.ListBans [4];
     hav.ResourceId = Resource.Id.radiantBan5;
     listPB.Add (hav);
     teamPicks.ListBanView = listPB;
     return teamPicks;
 }
Ejemplo n.º 2
0
		public List<HeroAndView> JoinViewPicks(PicksBans team1,PicksBans team2)
		{
			var n=new List<HeroAndView>();
			HeroAndView vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantBan1;
			vh.HeroId = team1.ListBans [0];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direBan1;
			vh.HeroId = team2.ListBans [0];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantBan2;
			vh.HeroId = team1.ListBans [1];
			vh.PickFlag = false;
			n.Add (vh);	
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direBan2;
			vh.HeroId = team2.ListBans [1];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantPick1;
			vh.HeroId = team1.ListPicks [0];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direPick1;
			vh.HeroId = team2.ListPicks [0];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direPick2;
			vh.HeroId = team2.ListPicks [1];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantPick2;
			vh.HeroId = team1.ListPicks [1];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantBan3;
			vh.HeroId = team1.ListBans [2];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direBan3;
			vh.HeroId = team2.ListBans [2];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantBan4;
			vh.HeroId = team1.ListBans [3];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direBan4;
			vh.HeroId = team2.ListBans [3];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direPick3;
			vh.HeroId = team2.ListPicks [2];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantPick3;
			vh.HeroId = team1.ListPicks [2];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direPick4;
			vh.HeroId = team2.ListPicks [3];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantPick4;
			vh.HeroId = team1.ListPicks [3];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direBan5;
			vh.HeroId = team2.ListBans [4];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantBan5;
			vh.HeroId = team1.ListBans [4];
			vh.PickFlag = false;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.direPick5;
			vh.HeroId = team2.ListPicks [4];
			vh.PickFlag = true;
			n.Add (vh);
			vh = new HeroAndView ();
			vh.ResourceId = Resource.Id.radiantPick5;
			vh.HeroId = team1.ListPicks [4];
			vh.PickFlag = true;
			n.Add (vh);
			return n;
		}