public void LoadInput(MSSInput input)
        {
            this.input = input;
            epsilonEditor.LoadInput(input);
            trajectoryEditor.LoadInput(input);

            cumulativeCheckBox.CheckState = input.Cumulative ? CheckState.Checked : CheckState.Unchecked;
        }
        public void LoadInput(SPFInput input)
        {
            this.input = input;
            trajectoryEditor.LoadInput(input);

            if (input.Trajectory.Count == 0)
            {
                sourceIndexUpDown.Value = 0;
                targetIndexUpdown.Value = 0;
                return;
            }

            if (input.Source != null && input.Targets.Count > 0)
            {
                if (input.Source == input.Trajectory.First() && input.Targets.First() == input.Trajectory.Last())
                {
                    startToEndCheckbox.CheckState = CheckState.Checked;
                    sourceIndexUpDown.Value       = 0;
                    targetIndexUpdown.Value       = input.Trajectory.Last().Index;
                }
                else
                {
                    sourceIndexUpDown.Value = input.Source.Index;
                    targetIndexUpdown.Value = input.Targets.First().Index;
                }
            }
            else
            {
                startToEndCheckbox.CheckState = CheckState.Checked;
                sourceIndexUpDown.Value       = 0;
                targetIndexUpdown.Value       = input.Trajectory.Last().Index;
            }

            if (input.ShortcutSet != null)
            {
                if (input.ShortcutSet is ShortcutIntervalSet)
                {
                    var regions = (ShortcutIntervalSet)input.ShortcutSet;
                    shortcutFindingProgressLabel.Text       = "Shortcuts: " + regions.Count + " Intervals: " + regions.IntervalCount;
                    shortcutSetFactoryComboBox.SelectedItem = shortcutSetFactories[0];
                }
                else if (input.ShortcutSet is ShortcutGraph)
                {
                    shortcutFindingProgressLabel.Text       = "Shortcuts: " + input.ShortcutSet.Count;
                    shortcutSetFactoryComboBox.SelectedItem = shortcutSetFactories[1];
                }
            }
        }
Ejemplo n.º 3
0
 public void LoadInput(MSInput input)
 {
     epsilonEditor.LoadInput(input);
     trajectoryEditor.LoadInput(input);
 }