示例#1
0
        private void GoToMainMenuCallBack(string arg)
        {
            hideTopBanner();
            visibleBottomBanner();
            IModuleFactory <IMainMenuModuleViewModel> mainMenuModuleFactory = new MainMenuModuleFactory();

            MainContent = mainMenuModuleFactory.CreateView(null);
        }
示例#2
0
 private void GoToMainMenuCallBack(string arg)
 {
     hideTopBanner();
     visibleBottomBanner();
     IModuleFactory<IMainMenuModuleViewModel> mainMenuModuleFactory = new MainMenuModuleFactory();
     MainContent = mainMenuModuleFactory.CreateView(null);
 }
示例#3
0
        public MainViewModel()
        {
            // Initialisation du Calendrier
            CalendarService.InitializeCalendarService();

            /*A Supprimer, le calendrier sera créé ailleurs*/
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent"
            }, 0);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent2"
            }, 0);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent3"
            }, 1);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent"
            }, 2);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent5"
            }, 5);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent2"
            }, 3);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent3"
            }, 4);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent"
            }, 5);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent2"
            }, 6);
            CalendarService.AddEvent(new CommonCalendarEvent()
            {
                EventName = "TestEvent3"
            }, 7);

            // Initialisation des événements de changement de vue
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToMainMenuEvent>().Subscribe(GoToMainMenuCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToMatchEngineEvent>().Subscribe(GoToMacthEngineCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToCalendarEvent>().Subscribe(GoToCalendarEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToConfigurationGameEvent>().Subscribe(GoToConfigurationGameCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToClubEvent>().Subscribe(GoToClubEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToTeamEvent>().Subscribe(GoToTeamEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToTacticEvent>().Subscribe(GoToTacticEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent <GoToCreationGameEvent>().Subscribe(GoToCreationGameEventCallBack);

            // Implémentation des views et des viewmodels
            IModuleFactory <IMainMenuModuleViewModel> mainMenuModuleFactory = new MainMenuModuleFactory();

            MainContent = mainMenuModuleFactory.CreateView(null);
            IModuleFactory <ITopBannerModuleViewModel> topBannerModuleFactory = new TopBannerModuleFactory();

            TopBannerContent = topBannerModuleFactory.CreateView(null);

            // Masquage de la bannière supérieure au démarrage
            hideTopBanner();
            visibleBottomBanner();
        }
示例#4
0
        public MainViewModel()
        {
            // Initialisation du Calendrier 
            CalendarService.InitializeCalendarService();

            /*A Supprimer, le calendrier sera créé ailleurs*/
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent" }, 0);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent2" }, 0);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent3" }, 1);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent" }, 2);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent5" }, 5);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent2" }, 3);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent3" }, 4);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent" }, 5);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent2" }, 6);
            CalendarService.AddEvent(new CommonCalendarEvent() { EventName = "TestEvent3" }, 7);

            // Initialisation des événements de changement de vue
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToMainMenuEvent>().Subscribe(GoToMainMenuCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToMatchEngineEvent>().Subscribe(GoToMacthEngineCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToCalendarEvent>().Subscribe(GoToCalendarEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToConfigurationGameEvent>().Subscribe(GoToConfigurationGameCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToClubEvent>().Subscribe(GoToClubEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToTeamEvent>().Subscribe(GoToTeamEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToTacticEvent>().Subscribe(GoToTacticEventCallBack);
            CommonEventAggregator.GetCommonEventAggregator().GetEvent<GoToCreationGameEvent>().Subscribe(GoToCreationGameEventCallBack);

            // Implémentation des views et des viewmodels
            IModuleFactory<IMainMenuModuleViewModel> mainMenuModuleFactory = new MainMenuModuleFactory();
            MainContent = mainMenuModuleFactory.CreateView(null);
            IModuleFactory<ITopBannerModuleViewModel> topBannerModuleFactory = new TopBannerModuleFactory();
            TopBannerContent = topBannerModuleFactory.CreateView(null);

            // Masquage de la bannière supérieure au démarrage
            hideTopBanner();
            visibleBottomBanner();
        }