Exemplo n.º 1
0
        internal DeckRoom(LogicHandler logicStarter)
        {
            this.logicStarter = logicStarter;

              deckRoom = new DeckRoomModel(logicStarter.ServicesProvider, logicStarter.GameItem);
              deckRoomView = logicStarter.ViewFactory.CreateDeckRoomView();
              deckRoomController = new DeckRoomController(deckRoom, deckRoomView);
              deckRoomController.DeckEditorRequest += new Action<DeckEditorRequestType>(DeckRoomController_DeckEditorRequest);
        }
Exemplo n.º 2
0
        public static void Initialize()
        {
            LogicHandler = new LogicHandler(new WinFormsViewFactory());

              SettingsManager.Settings.ClientLanguageChanged += delegate()
              {
            LogicHandler.ServicesProvider.ClientLanguageCode = SettingsManager.Settings.ClientLanguage;
            LogicHandler.ServicesProvider.LoadStrings();

            foreach(Form form in Application.OpenForms)
              if(form is ILocalizable)
            (form as ILocalizable).Localize();
              };
              SettingsManager.Settings.GameLanguageChanged += delegate()
              {
            LogicHandler.ServicesProvider.GameLanguageCode = SettingsManager.Settings.GameLanguage;
            LogicHandler.ServicesProvider.LoadGame(LogicHandler.GameItem);

            foreach(Form form in Application.OpenForms)
              if(form is ILocalizable)
            (form as ILocalizable).Localize();
              };
        }
Exemplo n.º 3
0
        public TestView()
        {
            InitializeComponent();
              logicStarter = new LogicHandler(new WinFormsViewFactory());

              clientPlayer1 = CreatePlayerInfo("ClientPlayer1");
              clientDeck1 = logicStarter.ServicesProvider.DecksService.LoadDeck("Reali", "Samurai");
              clientDeck1.MainCards.Shuffle();
              clientStarter1 = new ClientStarterModel(clientPlayer1, clientDeck1, logicStarter.ServicesProvider);
              clientStarter1.Started += new Action<object>(clientStarter1_Started);
              connector1 = new ClientConnector(clientPlayer1, logicStarter.ServicesProvider);

              clientPlayer2 = CreatePlayerInfo("ClientPlayer2");
              clientDeck2 = logicStarter.ServicesProvider.DecksService.LoadDeck("Reali", "Samurai");
              clientDeck2.MainCards.Shuffle();
              clientStarter2 = new ClientStarterModel(clientPlayer2, clientDeck2, logicStarter.ServicesProvider);
              clientStarter2.Started += new Action<object>(clientStarter2_Started);
              connector2 = new ClientConnector(clientPlayer2, logicStarter.ServicesProvider);

              serverPlayer = CreatePlayerInfo("ServerPlayer");
              serverDeck = logicStarter.ServicesProvider.DecksService.LoadDeck("Reali", "Samurai");
              serverDeck.MainCards.Shuffle();
        }