public Room(int capability, int id, string name, GameAbonentInfo own) { this.Capability = capability; this._id = id; this._name = name; Owner = own; }
public ObjectController(Abonent ab) { room = ab.CurrentRoom.GetGameRoomInfo(); gamer = ab.Gamer; this.Id = ab.Gamer.UserId; this.Sender = ab.Sender; this.Name = ab.Gamer.Name; }
public GameRoom(int id,String name, string pass, GameAbonentInfo owner, int capability) : base(capability, id, name, owner) { this.password = pass; }
private void AbonentChanged(GameAbonentInfo ab, GameAbonentInfo newab) { bool needupdate = false; if (ab.Name != newab.Name) { needupdate = true; Messages.Add(new ChatMessage() { Abonent = new GameAbonentInfo() { Id = ab.Id, Name = ab.Name, UserId = ab.UserId }, Roomid = Room.Id, RoomName = Room.Name, Time = DateTime.Now, Message = "сменил имя на "+ newab.Name }); } if (ab.UserId!=newab.UserId) { needupdate = true; } if (needupdate) { ab.Name = newab.Name; ab.UserId = newab.UserId; } }
private void NetworkClient_AbonentChanged(GameAbonentInfo ab) { if (Abonent.Id > 0&&ab!=null) Messages.Add(new ChatMessage(){ Abonent = Abonent, Roomid = Room.Id, RoomName = Room.Name, Time = DateTime.Now, Message = "сменил имя на " + ab.Name }); Abonent = ab; }
private void ListboxClicked(object sender, MouseButtonEventArgs e) { if (sender!=null&&Selected!=null) { ListBox lbx = (ListBox)sender; var lbi = lbx.ItemContainerGenerator.ContainerFromItem(Selected) as ListBoxItem; if (!IsMouseOverTarget(lbi, e.GetPosition((IInputElement)lbi))) { Selected = null; } } }