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 VMCreateEvent(Network Server) { _Server = Server; errMess = ""; Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); Server.CREVReturn += new EventHandler<serverReturnEventArgs>(r_CREV); }
public VMRoom(Network Server) { _Server = Server; _Server.LEARReturn += new EventHandler<serverReturnEventArgs>(r_LEAR); _Server.DEROReturn += new EventHandler<serverReturnEventArgs>(r_DERO); _Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); }
public VMCreateRoom(Network Server) { _Server = Server; Format = "Standard"; _Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); _Server.CNROReturn += new EventHandler<serverReturnEventArgs>(r_CNRO); errVisibility = Visibility.Hidden; }
/// <summary> /// constructor with server in argument /// </summary> /// <param name="server"></param> /// <param name="name"></param> /// <param name="dest"></param> public Conversation(Network server, String name, String dest) { this.name = name; isPrivate = true; visib = Visibility.Collapsed; _Server = server; this._dest = dest; this.content = ""; }
/// <summary> /// constructor with server in argument /// </summary> /// <param name="server"></param> /// <param name="name"></param> /// <param name="room"></param> public Conversation(Network server, String name, Room room) { this.name = name; isPrivate = false; visib = Visibility.Visible; _Server = server; this._roomdest = room; this.content = ""; _Server.MESBReturn += new EventHandler<serverReturnEventArgs>(r_MESB); }
public VMFriend(Network Server) { _Server = Server; Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); Server.GFRLReturn += new EventHandler<serverReturnEventArgs>(r_GFRL); Server.GTBLReturn += new EventHandler<serverReturnEventArgs>(r_GTBL); Server.ADFRReturn += new EventHandler<serverReturnEventArgs>(r_ADFR); Server.ADBLReturn += new EventHandler<serverReturnEventArgs>(r_ADBL); Server.DELFReturn += new EventHandler<serverReturnEventArgs>(r_DELF); Server.DEBLReturn += new EventHandler<serverReturnEventArgs>(r_DEBL); frORbl = true; }
public VMRoom(Network Server) { _Server = Server; _Server.GPFRReturn += new EventHandler<serverReturnEventArgs>(r_GPFR); _Server.LEARReturn += new EventHandler<serverReturnEventArgs>(r_LEAR); _Server.DEROReturn += new EventHandler<serverReturnEventArgs>(r_DERO); _Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); _Server.KILRReturn += new EventHandler<serverReturnEventArgs>(r_KILR); _Server.PJROReturn += new EventHandler<serverReturnEventArgs>(r_PJRO); _Server.PLROReturn += new EventHandler<serverReturnEventArgs>(r_PLRO); //refreshPlayerList(); }
/// <summary> /// construcotr with a conversatino manager /// </summary> /// <param name="Server"></param> /// <param name="CM"></param> public VMFriend(Network Server, VMConversationManager CM) { _Server = Server; Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); Server.GFRLReturn += new EventHandler<serverReturnEventArgs>(r_GFRL); Server.GTBLReturn += new EventHandler<serverReturnEventArgs>(r_GTBL); Server.ADFRReturn += new EventHandler<serverReturnEventArgs>(r_ADFR); Server.ADBLReturn += new EventHandler<serverReturnEventArgs>(r_ADBL); Server.DELFReturn += new EventHandler<serverReturnEventArgs>(r_DELF); Server.DEBLReturn += new EventHandler<serverReturnEventArgs>(r_DEBL); frORbl = true; ConversationManager = CM; }
/// <summary> /// constructor takes server in arguments /// </summary> /// <param name="Server"></param> public VMInnerDecks(Network Server) { _Server = Server; VMDecks decks = new VMDecks(Server); decks.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo); VMBuilding building = new VMBuilding(Server); building.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo); ViewModels = new ObservableCollection<ViewModelBase>() { decks, building }; ViewModelView = CollectionViewSource.GetDefaultView(ViewModels); }
/* * Creating the collection of view, and linking the source * of the binded collection to it */ public Switcher() { string message = ""; try {this._Server = new Network(); this._Server.connect(ConfigurationManager.AppSettings["ip"], 3000); //127.0.0.1 } catch (Exception) { message = "Unable to connect to the server"; } /* * The root element contains, a VMLogIn and a VMInnerBoard. */ Initialize(message); }
public VMInnerBoard(Network Server) { _Server = Server; VMHome home = new VMHome(_Server); VMProfile profile = new VMProfile(_Server); VMCreateEvent create_event = new VMCreateEvent(_Server); VMModifyEvent mod_event = new VMModifyEvent(_Server); VMInnerRooms in_rooms = new VMInnerRooms(_Server); VMInnerDecks in_decks = new VMInnerDecks(_Server); ConversationManager =new VMConversationManager(_Server); Friend = new VMFriend(_Server, ConversationManager); home.moveTo +=new EventHandler<MoveToEventArgs>(Inner_moveTo); create_event.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo); mod_event.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo); Friend.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo); in_rooms.moveTo += new EventHandler<MoveToEventArgs>(Inner_moveTo); /* * contains the home and profile screen (and probably more if this comment is not updated) */ ViewModels = new ObservableCollection<ViewModelBase>() { home, profile, create_event, mod_event, in_rooms, in_decks }; ViewModelView = CollectionViewSource.GetDefaultView(ViewModels); }
/// <summary> /// constructor with server as arg /// </summary> /// <param name="server"></param> public VMConversationManager(Network server) { focus = new Conversation(_Server, "tmp", "tmp"); _Server = server; _Conversations = new ObservableCollection<Conversation>(); _Server.MESPReturn +=new EventHandler<serverReturnEventArgs>(r_MESP); }
public VMHome(Network Server) { creatorRight = Visibility.Hidden; _Server = Server; Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); Server.GTALReturn += new EventHandler<serverReturnEventArgs>(r_GTAL); Server.GETEReturn += new EventHandler<serverReturnEventArgs>(r_GETE); Server.DELEReturn += new EventHandler<serverReturnEventArgs>(r_DELE); Server.ISUEReturn += new EventHandler<serverReturnEventArgs>(r_ISUE); Server.SGUEReturn += new EventHandler<serverReturnEventArgs>(r_SGUE); Server.SGOEReturn += new EventHandler<serverReturnEventArgs>(r_SGOE); }
public VMModifyEvent(Network Server) { _Server = Server; errMess = ""; Server.SNIEReturn += new EventHandler<serverReturnEventArgs>(r_SNIE); }
/// <summary> /// constructor takes server as arg /// </summary> /// <param name="Server"></param> public VMDecks(Network Server) { _Server = Server; _Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); }
/// <summary> /// constructor, takes the server in argument. /// </summary> /// <param name="Server"></param> public VMLogIn(Network Server) { _Server = Server; ip = _Server.Ip; Server.REGUReturn += this.r_REGU; Server.SGNIReturn += this.r_SGNI; }
public VMProfile(Network Server) { _Server = Server; Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); Server.SETUReturn += new EventHandler<serverReturnEventArgs>(r_SETU); }
public VMRooms(Network Server) { _Server = Server; _Server.GEARReturn += new EventHandler<serverReturnEventArgs>(r_GEAR); _Server.GETUReturn += new EventHandler<serverReturnEventArgs>(r_GETU); _Server.JOROReturn += new EventHandler<serverReturnEventArgs>(r_JORO); _Server.GPFRReturn += new EventHandler<serverReturnEventArgs>(r_GPFR); }
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; }