public void ScenarioSelected(object sender, ScenarioEventArgs args)
 {
     this.SelectedScenario = args.SelectedScenario;
     this.txtName.Text = this.SelectedScenario.Name;
     this.lblOutPath.Text = this.SelectedScenario.OutputDirectory;
     this.lblInPath.Text = this.SelectedScenario.InputDirectory;
     this.lblPrefix.Text = this.SelectedScenario.FilePrefix;
 }
Esempio n. 2
0
        void PopulateScenarioFromDirectory(string selectedPath, Scenario newScenario)
        {
            string[] files = Directory.GetFiles(selectedPath, "*.xs8");

            AddModelsToScenario(files, newScenario);
        }
Esempio n. 3
0
        Scenario CreateScenario(string ScenarioName)
        {
            Scenario newScenario = new Scenario {
                Name = ScenarioName,
                FilePrefix = ScenarioName,
                OutputDirectory = this.folderBrowserDialog1.SelectedPath,
                InputDirectory = this.folderBrowserDialog1.SelectedPath
            };

            this.bindingSource1.Add(newScenario);
            return newScenario;
        }
Esempio n. 4
0
 /// <summary>
 /// Broadcast to run the scenario...
 /// </summary>
 void BroadCastToRunners(Scenario toRun)
 {
     if (null != this.OnRunScenario) {
         this.OnRunScenario(this, new ScenarioEventArgs{SelectedScenario = toRun});
     }
 }
Esempio n. 5
0
        void BroadcastScenarioSelected(Scenario selected)
        {
            if (null != this.OnScenarioSelected) {

                this.OnScenarioSelected(this, new ScenarioEventArgs { SelectedScenario = selected });
            }
        }
Esempio n. 6
0
 void AddModelsToScenario(string[] files, Scenario newScenario)
 {
     foreach (string fileName in files) {
         newScenario.AddModel(new ModelMetaClass {
                              	FileName = fileName,
                              	Runner = new Simul8Runner(),
                              	Reader = new Simul8XMLReader(fileName),
                              	Writer = new Simul8XMLWriter()
                              });
     }
 }