Esempio n. 1
0
        //動的生成のみであるためVieModelはファクトリに注入される
        public GamePanel(GamePanelViewModel game_panel_view_model)
        {
            InitializeComponent();

            game_panel_view_model.SetPanelLargeScale(1.2f);//拡大時の倍率はViewが責任を持つべきなのでこちらで設定する

            ((FrameworkElement)this.Content).DataContext = game_panel_view_model;
            CreateTags();
        }
        public ActionResult Details(int id)
        {
            var game = _gameService.GetGame(id);
            var shots = _shotService.GetShots(id);
            var allPlayers = _playerService.GetPlayers();
            var allHoles = _holeService.GetHoles();

            var gamePanel = new GamePanelViewModel(game, shots, allPlayers, allHoles);

            return View(gamePanel);
        }
        public ActionResult Details(int id)
        {
            var game       = _gameService.GetGame(id);
            var shots      = _shotService.GetShots(id);
            var allPlayers = _playerService.GetPlayers();
            var allHoles   = _holeService.GetHoles();

            var gamePanel = new GamePanelViewModel(game, shots, allPlayers, allHoles);

            return(View(gamePanel));
        }
Esempio n. 4
0
        private void UnFocusPanel()
        {
            GamePanelViewModel c = null;

            try {
                c = GetViewModel(focusIndex);
            } catch (Exception e) {
                try {
                    c = GetViewModel(0);
                } catch (Exception exception) {
                    Logger.Inst.Log("I didn't un focus panel bc PanelParent don't has GamePanel");
                    return;
                }
            }
            c.PanelSizes.Undo();
        }
Esempio n. 5
0
        private void FocusPanel()
        {
            GamePanelViewModel c = null;

            try {
                c = GetViewModel(focusIndex);
            } catch (Exception e) {
                try{
                    c = GetViewModel(0);
                }
                catch (Exception exception) {
                    Logger.Inst.Log(exception + "I didn't focus panel bc PanelParent don't has GamePanel");
                    return;
                }
            }
            c.PanelSizes.Enlarge();
            onChangeSelected.OnNext(c);
        }