public void SetUp() { ListElement listElement = new ListElement(true); listElement.Add(buttons.MoveUp); listElement.Add(buttons.MoveDown); listElement.Add(buttons.RemoveItem); }
public void SetUp() { ListElement listElement = new ListElement(true); listElement.Add(controls.Add); listElement.Add(controls.ClearList); listElement.Add(controls.ClearListConfirm); listElement.Add(controls.ClearListCancel); listElement.Add(controls.AddObjectField); }
public void ReadTheMap() { MapIsLoad = true; ListTexture.RemoveRange(0, ListTexture.Count); ListElement.RemoveRange(0, ListElement.Count); Path = Directory.GetCurrentDirectory() + @"\Map\" + X + "," + Y + ".txt"; string line; StreamReader sr = new StreamReader(File.Open(Path, FileMode.Open)); while ((line = sr.ReadLine()) != null) { if (line.Substring(0, 7) != "monstre") { for (int i = 0; i < line.Length; i += 3) { ListTexture.Add(line.Substring(i, 3)); } } else { for (int i = 9; i < line.Length; i += 9) { ListElement.Add(line.Substring(i, 9)); } } } sr.Close(); }
public void ShouldClearTheControlContents() { VisualElement testElement = new VisualElement(); listElement = new ListElement(true); listElement.Add(testElement); listElement.BindProperty(property); Assert.IsFalse(listElement.Contains(testElement)); }
protected override void OnShow() { string deciderName = ""; foreach (PlayerRole role in Game.Controller.Roles) { string playerName = role.PlayerName; string title = role.Title; if (title != "Decider") { roleList.Add(playerName + "|" + title, new AvatarElement(playerName, Game.Controller.GetAvatarForPlayer(playerName), "the " + title)); } else { deciderName = playerName; } } roleList.Add(deciderName + "|Decider", new AvatarElement(deciderName, Game.Controller.GetAvatarForPlayer(deciderName), "the Decider")); }
void OnAddPeer(string peer, string color) { peerList.Add(peer, new AvatarElement(peer, color)); SetPlayButton(); }