public NewProjectWindow(ICollection<ExecutionEnvironment> executionEngines, ref ExecutionInstance executionInstance, FMTesterConfiguration configuration) { InitializeComponent(); viewModel = new NewProjectViewModel(executionEngines, ref executionInstance, configuration, controlContainer); this.DataContext = viewModel; }
public SimulationSettingsControl(MetroWindow containingWindow, SimulationSettings settings, FMTesterConfiguration configuration, ExecutionInstance instance, ExecutionEnvironment environment) { InitializeComponent(); this.containingWindow = containingWindow; this.ModelSimulationSettings = settings; this.configuration = configuration; this.instance = instance; this.environment = environment; if (settings != null) { ModelSimulationTimeNumUpDown.Value = settings.ModelSimulationTime as double?; DesiredValueReachedNumUpDown.Value = settings.StableStartTime as double?; SmoothnessStartDifferenceNumUpDown.Value = settings.SmoothnessStartDifference as double?; ResponsivenessCloseNumUpDown.Value = settings.ResponsivenessClose as double?; DesiredValueNameTextBox.Text = settings.DesiredVariable.Name; DesiredValueFromNumUpDown.Value = Decimal.ToDouble(settings.DesiredVariable.FromValue) as double?; DesiredValueToNumUpDown.Value = Decimal.ToDouble(settings.DesiredVariable.ToValue) as double?; ActualValueNameTextBox.Text = settings.ActualVariable.Name; ActualValueFromNumUpDown.Value = Decimal.ToDouble(settings.ActualVariable.FromValue) as double?; ActualValueToNumUpDown.Value = Decimal.ToDouble(settings.ActualVariable.ToValue) as double?; DisturbanceValueNameTextBox.Text = settings.DisturbanceVariable.Name; DisturbanceValueToNumUpDown.Value = Decimal.ToDouble(settings.DisturbanceVariable.ToValue) as double?; } }
public SimulationSettingsWindow(SimulationSettings settings, FMTesterConfiguration configuration, ExecutionInstance instance, ExecutionEnvironment environment) { InitializeComponent(); this.EnableDWMDropShadow = true; this.ShowMinButton = false; this.ShowMaxRestoreButton = false; simulationControl = new SimulationSettingsControl(this, settings, configuration, instance, environment); this.Container.Children.Add(simulationControl); }
public SimulationWorker(ExecutionInstance instance, ExecutionEnvironment environment, SimulationSettings settings, FMTesterConfiguration configuration) : base() { this.configuration = configuration; this.scriptsPath = configuration.ScriptsPath; this.instance = instance; this.environment = environment; this.settings = settings; this.DoWork += simulationWorker_DoWork; }
internal NewProjectViewModel(ICollection<ExecutionEnvironment> availableExecutionEngines, ref ExecutionInstance executionInstance, FMTesterConfiguration configuration, StackPanel controlContainer) { executionEnvironments = new CollectionView(availableExecutionEngines); executionInstance = new ExecutionInstance(); this.simulationSettingsControl = null; this.executionInstance = executionInstance; this.appConfiguration = configuration; SelectedEnvironment = availableExecutionEngines.First(); this.controlContainer = controlContainer; this.currentView = new NewProjectControl(); this.currentView.DataContext = this; controlContainer.Children.Add(currentView); IsDone = false; }
internal SettingsWindow(FMTesterConfiguration configuration, bool canDiscard) { InitializeComponent(); if (canDiscard) { DiscardButton.IsEnabled = true; } else { this.ShowCloseButton = false; this.ShowMaxRestoreButton = false; this.ShowMinButton = false; } if (configuration == null) configuration = new FMTesterConfiguration(); this.config = configuration; this.MatlabPathTextBox.Text = config.MatLABFolderPath; this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; List<MatlabInstallation> installs = MatlabInstallation.GetMatlabInstallations(); InstallationsListBox.ItemsSource = installs; }