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; }
public void RightClicFunction(HexViewModel hexViewModel) { switch (GameMode) { case GameMode.MapCreation: SetSelectedColorImageFromHexPosition(hexViewModel.Column, hexViewModel.Row); break; case GameMode.HexEdition: break; case GameMode.Visualization: break; } }
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; } }
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(); }
public HexPage() { InitializeComponent(); BindingContext = vm = new HexViewModel(new PageService()); //GetScreenDimensions(); }