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 PasswordWindow(GameRoomInfo room) { this.room = room; var parent = Global.CurrentWindow; double top = parent.Top + parent.ActualHeight / 2-150; double left = parent.Left + parent.ActualWidth / 2-150; if (parent.WindowState != System.Windows.WindowState.Normal) { top = SystemParameters.PrimaryScreenHeight / 2 - 150; left = SystemParameters.PrimaryScreenWidth / 2 - 150; } this.Top = top; this.Left = left; Password = String.Empty; InitializeComponent(); }
private void NetworkClient_RoomChanged(GameRoomInfo ab) { OnPropertyChanged("Room"); OnPropertyChanged("OwnerName"); OnPropertyChanged("IsJoinRVisible"); OnPropertyChanged("IsCreateRVisible"); OnPropertyChanged("ButtonsRow"); OnPropertyChanged("IsOwner"); }
private void NetworkClient_RoomChanged(GameRoomInfo rm) { if (Room.Id>-1) Messages.Add(new ChatMessage() { Abonent = Abonent, Roomid = Room.Id, RoomName = Room.Name, Time = DateTime.Now, Message = "вышел из комнаты" }); Room = rm; if (Room.Id > -1) Messages.Add(new ChatMessage() { Abonent = Abonent, Roomid = Room.Id, RoomName = Room.Name, Time = DateTime.Now, Message = "вошел в комнату" }); }
public GameRoomInfo GetGameRoomInfo() { var info = new GameRoomInfo(); info.Id = this.Id; info.Name = this.Name; info.Owner = this.Owner; info.HavePassword = HavePassword(); info.Capability = this.Capability; info.Capacity = this.capacity; return info; }