public VMInnerRooms(Network Server)
        {
            _Server = Server;

            VMRooms rooms = new VMRooms(_Server);
            VMCreateRoom cr_room = new VMCreateRoom(_Server);
            VMRoom room = new VMRoom(_Server);

            rooms.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo);
            cr_room.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo);
            room.moveTo  += new EventHandler<MoveToEventArgs>(Inner_moveTo);

            cr_room.roomCreation += new EventHandler<RoomEventArgs>(room.roomAssociation);
            rooms.roomJoin += new EventHandler<RoomEventArgs>(room.roomAssociation);

            ViewModels = new ObservableCollection<ViewModelBase>()
            {
                rooms,
                cr_room,
                room
            };

            
            ViewModelView = CollectionViewSource.GetDefaultView(ViewModels);
        }
        public VMInnerRooms(Network Server)
        {
            _Server = Server;

            VMRooms      rooms   = new VMRooms(_Server);
            VMCreateRoom cr_room = new VMCreateRoom(_Server);
            VMRoom       room    = new VMRoom(_Server);

            rooms.moveTo   += new EventHandler <MoveToEventArgs>(Inner_moveTo);
            cr_room.moveTo += new EventHandler <MoveToEventArgs>(Inner_moveTo);
            room.moveTo    += new EventHandler <MoveToEventArgs>(Inner_moveTo);

            cr_room.roomCreation += new EventHandler <RoomEventArgs>(room.roomAssociation);
            rooms.roomJoin       += new EventHandler <RoomEventArgs>(room.roomAssociation);

            ViewModels = new ObservableCollection <ViewModelBase>()
            {
                rooms,
                cr_room,
                room
            };


            ViewModelView = CollectionViewSource.GetDefaultView(ViewModels);
        }
Example #3
0
 public VMGame(Network server, VMRoom room)
 {
     _Server             = server;
     _Server.GETUReturn += new EventHandler <serverReturnEventArgs>(r_GETU);
     _Server.RSETReturn += new EventHandler <serverReturnEventArgs>(r_RSET);
     _Server.UPGIReturn += new EventHandler <serverReturnEventArgs>(r_UPGI);
     _Room = room;
     MyBoard.CollectionChanged += MyBoard_CollectionChanged;
 }
Example #4
0
 public VMGame(Network server, VMRoom room)
 {
     _Server = server;
     _Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU);
     _Server.RSETReturn += new EventHandler<serverReturnEventArgs>(r_RSET);
     _Server.UPGIReturn += new EventHandler<serverReturnEventArgs>(r_UPGI);
     _Room = room;
     MyBoard.CollectionChanged += MyBoard_CollectionChanged;
 }