Beispiel #1
0
        private void OnPresets()
        {
            var dialog = new PresetSelectorDialog
            {
                Owner = Application.Current.MainWindow
            };

            dialog.ShowDialog();

            OnReset();

            switch (dialog.Result)
            {
            case 0:
                RadarViewModel.AddNoise(45, 20);
                RadarViewModel.AddTarget(45, 120, 4, 0.5);
                break;

            case 1:
                RadarViewModel.AddNoise(45, 10, 0.3);
                RadarViewModel.AddTarget(45, 120, 3);
                break;

            case 2:
                RadarViewModel.AddTarget(45, 159, 4);
                RadarViewModel.AddTarget(45, 156, 4);
                break;

            case 3:
                RadarViewModel.AddTarget(43, 120, 3);
                RadarViewModel.AddTarget(51, 120, 3);
                break;
            }
        }
Beispiel #2
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            if (DataContext is RadarViewModel)
            {
                return;
            }

            var vm = new RadarViewModel(UseStructureNetwork);

            DataContext = vm;
        }
 public RadarWindow(RadarViewModel viewModel)
 {
     InitializeComponent();
     DataContext = viewModel;
 }
Beispiel #4
0
 private void Start()
 {
     RadarViewModel = new RadarViewModel(InMotion);
 }
Beispiel #5
0
        public RadarPage()
        {
            InitializeComponent();

            BindingContext = viewModel = new RadarViewModel();
        }
Beispiel #6
0
 private void InitializeRadar()
 {
     RadarViewModel = new RadarViewModel(true);
 }
Beispiel #7
0
        private void OnCreateTarget()
        {
            var random = new Random();

            RadarViewModel.AddTarget(random.Next(0, 360), random.Next(10, (int)Constants.RadarRadius), random.Next(3, 6));
        }
Beispiel #8
0
 private void OnReset()
 {
     RadarViewModel.ClearAllComponents();
 }