コード例 #1
0
 private void OnAddTilesCommand()
 {
     var uiVisualizerService = this.GetDependencyResolver().Resolve<IUIVisualizerService>();
     var tileService = this.GetDependencyResolver().Resolve<ITileService>();
     var viewModel = new SelectTilesViewModel(tileService.GetAllTiles().Except(Tiles))
     {
         SelectionMode = System.Windows.Controls.SelectionMode.Multiple
     };
     uiVisualizerService.ShowDialog(viewModel, (s, e) =>
     {
         if (e.Result == true)
             foreach (var item in viewModel.SelectedTiles)
                 Model.AddTile(item);
     });
 }
コード例 #2
0
        private void OnAddTilesCommand()
        {
            var uiVisualizerService = this.GetDependencyResolver().Resolve <IUIVisualizerService>();
            var tileService         = this.GetDependencyResolver().Resolve <ITileService>();
            var viewModel           = new SelectTilesViewModel(tileService.GetAllTiles().Except(Tiles))
            {
                SelectionMode = System.Windows.Controls.SelectionMode.Multiple
            };

            uiVisualizerService.ShowDialog(viewModel, (s, e) =>
            {
                if (e.Result == true)
                {
                    foreach (var item in viewModel.SelectedTiles)
                    {
                        Model.AddTile(item);
                    }
                }
            });
        }