Example #1
0
 public Room(int capability, int id, string name, GameAbonentInfo own)
 {
     this.Capability = capability;
     this._id = id;
     this._name = name;
     Owner = own;
 }
Example #2
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;
 }
Example #3
0
 public GameRoom(int id,String name, string pass, GameAbonentInfo owner, int capability)
     : base(capability, id, name, owner)
 {
     this.password = pass;
 }
Example #4
0
 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;
     }
 }
Example #5
0
 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;
                }

            }
        }