コード例 #1
0
        public MainWindow()
        {
            InitializeComponent();

            DataContext = ViewModel = new SimulationViewModel()
            {
                CanvasSize = 500
            };
        }
コード例 #2
0
        public LocalizationWindow(SimulationViewModel viewModel)
        {
            InitializeComponent();
            DataContext = viewModel;

            if (viewModel.WorldShape != null)
            {
                double size = viewModel.CanvasSize / viewModel.WorldShape[0];
                AddLocalizationIndicators(viewModel.LocalizationIndicators, viewModel.WorldShape[0], viewModel.WorldShape[1], size);
            }
        }