コード例 #1
0
        void _trainingMenu_Click(object sender, RoutedEventArgs e)
        {
            if (this._host.trailVisualization.AgentWalkingTrail == null)
            {
                MessageBox.Show("Setting a walking trail for training is required", "Walking Trail Not Defined");
                return;
            }

            MandatoryScenarioTraining training = new MandatoryScenarioTraining(this._host);

            training.Owner = this._host;
            training.ShowDialog();
        }
        private static void AllDestinationsPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            MandatoryScenarioTraining instance = (MandatoryScenarioTraining)obj;

            instance.AllDestinations = (StateBase[])args.NewValue;
        }
        private static void AllParametersPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            MandatoryScenarioTraining instance = (MandatoryScenarioTraining)obj;

            instance.AllParameters = (HashSet <Parameter>)args.NewValue;
        }
        private static void hostPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            MandatoryScenarioTraining instance = (MandatoryScenarioTraining)obj;

            instance._host = (OSMDocument)args.NewValue;
        }
        private static void _counterPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            MandatoryScenarioTraining instance = (MandatoryScenarioTraining)obj;

            instance._counter = (int)args.NewValue;
        }
        private static void _durationValuePropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            MandatoryScenarioTraining instance = (MandatoryScenarioTraining)obj;

            instance._durationValue = (double)args.NewValue;
        }