コード例 #1
0
ファイル: BiddingViewModel.cs プロジェクト: Bawaw/Whist
        public BiddingViewModel(BaseGameViewModel baseVM)
        {
            bidCommand = new BidCommand(this);
            this.baseVM = baseVM;

            baseVM.PropertyChanged += (sender, e) => PropChanged();
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: Bawaw/Whist
        public MainWindow()
        {
            InitializeComponent();

            GameManager gameManager = new GameManager();

            var infoPanelVM = new InfoPanelViewModel(gameManager);
            InfoPanel.DataContext = infoPanelVM;


            //round
            model = new BaseGameViewModel(gameManager, infoPanelVM);
            model.GameStateChanged += OnGameStateChanged;

            Whist.DataContext = model;
            BiddingView.DataContext = new BiddingViewModel(model);
            labelC1.DataContext = model;
            labelC2.DataContext = model;
            labelC3.DataContext = model;
            ActionLog.DataContext = infoPanelVM;
        }
コード例 #3
0
ファイル: MainViewModel.cs プロジェクト: Bawaw/Whist
 public HandViewModel(BaseGameViewModel mainViewModel)
 {
     this.mainViewModel = mainViewModel;
     this.playCmd = new PlayCommand(this);
 }