Example #1
0
        public AllGamesViewModel(IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            this.regionManager     = regionManager;
            this.module_Aggregator = eventAggregator;

            moduleMsgOrder = new ModuleMsgOrder();
        }
Example #2
0
        public SeachViewModel(IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            this.regionManager     = regionManager;
            this.module_Aggregator = eventAggregator;

            moduleMsgOrder = new ModuleMsgOrder();

            _tagModel  = TagModel.CreateNewModel();
            _tagAccess = new TagAccess();
        }
Example #3
0
        public NoticeViewModel(IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            this.regionManager     = regionManager;
            this.module_Aggregator = eventAggregator;

            _showAccess = new ShowAccess();
            _loopLink   = ShowAccess.GetShow();

            moduleMsgOrder = new ModuleMsgOrder();
        }
        public IntroductionViewModel(IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            this.regionManager     = regionManager;
            this.module_Aggregator = eventAggregator;
            this.send_Aggregator   = eventAggregator;

            moduleMsgOrder = new ModuleMsgOrder();

            _gameModel = GameModel.CreateNewModel();
            _listModel = ListModel.CreateNewModel();
            downView   = new DownView(new DownViewModel(), eventAggregator);

            RequestEvent();
        }
Example #5
0
        public void OnModuleMsg(ModuleMsgOrder _moduleMsgOrder)
        {
            switch (_moduleMsgOrder.Sign)
            {
            case 0:     //得到ID/切换到“介绍”界面
                this.UpRow   = 2;
                this.DownRow = 1;
                break;

            case 1:    //切换回“原”界面
                this.UpRow   = 1;
                this.DownRow = 2;
                break;
            }

            //MsgEvent msgEvent = eventAggregator.GetEvent<MsgEvent>();

            //if (subscriptionToken != null)
            //    msgEvent.Unsubscribe(subscriptionToken);
        }
        public void OnModuleMsg(ModuleMsgOrder _moduleMsgOrder)
        {
            if (_moduleMsgOrder.GameId == null) //搜索时,游戏ID为null
            {
                if (GameAccess.GetGameByName(_moduleMsgOrder.GameName) == null)
                {
                    XWT.MessageBox.Show("抱歉,不存在当前游戏.");
                    return;
                }

                _gameModel = GameAccess.GetGameByName(_moduleMsgOrder.GameName);
            }
            else
            {
                if (GameAccess.GetGameByID(_moduleMsgOrder.GameId) == null)
                {
                    XWT.MessageBox.Show("抱歉,不存在当前游戏.");
                    return;
                }

                _gameModel = GameAccess.GetGameByID(_moduleMsgOrder.GameId);
            }

            this.ID          = _gameModel.ID;
            this.GameName    = _gameModel.GameName;
            this.GameType    = _gameModel.GameType;
            this.Icon        = _gameModel.Icon;
            this.PublishData = _gameModel.PublishData;
            this.IsEnabled   = _gameModel.IsEnabled;
            this.ImgSrc1     = _gameModel.ImgSrc1;
            this.ImgSrc2     = _gameModel.ImgSrc2;
            this.GameDetail  = _gameModel.GameDetail;

            //MsgEvent msgEvent = eventAggregator.GetEvent<MsgEvent>();

            //if (subscriptionToken != null)
            //    msgEvent.Unsubscribe(subscriptionToken);
        }
 public bool Filter(ModuleMsgOrder _moduleMsgOrder)
 {
     return(_moduleMsgOrder.Sign == 0); //得到ID或游戏名/切换到“介绍”界面
 }