Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 private void NetworkClient_RoomChanged(GameRoomInfo ab)
 {
     OnPropertyChanged("Room");
     OnPropertyChanged("OwnerName");
     OnPropertyChanged("IsJoinRVisible");
     OnPropertyChanged("IsCreateRVisible");
     OnPropertyChanged("ButtonsRow");
     OnPropertyChanged("IsOwner");   
     
 }
Exemplo n.º 4
0
 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 = "вошел в комнату" });
 }
Exemplo n.º 5
0
 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;
 }