Beispiel #1
0
        public HexController(HexViewModel ViewModel, MainMenuViewModel MenuViewModel, IMessenger Messenger, IAsyncService AsyncService)
        {
            viewModel     = ViewModel;
            menuViewModel = MenuViewModel;

            viewModel.Title   = "No Display";
            viewModel.HexData = new ObservableCollection <DomainHexData>();

            messenger = Messenger;

            asyncService = AsyncService;
        }
Beispiel #2
0
        public void RightClicFunction(HexViewModel hexViewModel)
        {
            switch (GameMode)
            {
            case GameMode.MapCreation:
                SetSelectedColorImageFromHexPosition(hexViewModel.Column, hexViewModel.Row);
                break;

            case GameMode.HexEdition:
                break;

            case GameMode.Visualization:
                break;
            }
        }
Beispiel #3
0
        public void LeftClicFunction(HexViewModel hexViewModel)
        {
            switch (GameMode)
            {
            case GameMode.MapCreation:
                UpdateHexModelWithSelectedColorImage(hexViewModel.Column, hexViewModel.Row);
                break;

            case GameMode.HexEdition:
                SelectHex(hexViewModel.Column, hexViewModel.Row);
                break;

            case GameMode.Visualization:
                SelectHex(hexViewModel.Column, hexViewModel.Row);
                break;
            }
        }
Beispiel #4
0
        public HexView()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.DoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.StandardDoubleClick, false);
            this.UpdateStyles();

            this.BackColor = Color.White;
            this.FontChanged += new EventHandler(HexView_FontChanged);
            this.Resize += HexView_Resize;

            this.model = new HexViewModel();
        }
Beispiel #5
0
 public HexPage()
 {
     InitializeComponent();
     BindingContext = vm = new HexViewModel(new PageService());
     //GetScreenDimensions();
 }