private void dataGenerationToolStripMenuItem_Click(object sender, EventArgs e) { IDataGenProvider dataGenProvider = DataProvidersFactory.GetDataGenProvider(); IDataGen dataGen = DataGenFactory.Get(dataGenProvider); DataGenerator dataGenerator = new DataGenerator(dataGenProvider, dataGen); FormDataGen frm = new FormDataGen(dataGenerator); frm.Execute(); }
public DataGenerator(IDataGenProvider dataGenProvider, IDataGen dataGen) { _dataGenProvider = dataGenProvider; _dataGen = dataGen; }
private void Generate() { try { beaconList.Clear(); leuList.Clear(); SyDB.GetInstance().clear(); if (false == clearOutputDir()) { return; } //log is updating { IDataGen.toolVer = this.Text; GENERIC_SYSTEM_PARAMETERS sydb = FileLoader.Load <GENERIC_SYSTEM_PARAMETERS>(this.textBoxSyDB.Text); SyDB.GetInstance().LoadData(sydb); IDataGen.sydbFile = this.textBoxSyDB.Text;//todo will delete } { IDataGen gen = null; string compilepath = currentRunDir + "\\compiler\\CompilerBaliseV4000\\main\\compile.exe"; gen = new BFGen(this.textBoxLayout.Text, this.textBoxBoundaryBeacon.Text, compilepath, this.radioButtoniTC.Checked, this.checkBoxGenBin.Checked); ((BFGen)gen).genPro += new BFGen.GenProess(GenProess); if (false == gen.Generate(this.textBoxOutput.Text)) { return; } } { IDataGen gen = null; gen = new BMVFGen(this.radioButtoniTC.Checked && this.Upstream_path_considered.Checked, ref beaconList, ref leuList, this.textBox_UpstreamFile.Text); if (false == gen.Generate(this.textBoxOutput.Text)) { return; } } { IDataGen gen = null; gen = new LEURFGen(ref beaconList, ref leuList); if (false == gen.Generate(this.textBoxOutput.Text)) { return; } } { IDataGen gen = null; string LEURFFile = this.textBoxOutput.Text + "\\LEU\\LEU_Result_Filtered_Values.xml"; gen = new LEUXmlGen(leuList, LEURFFile, currentRunDir, this.radioButtoniTC.Checked, this.checkBoxGenBin.Checked); ((LEUXmlGen)gen).genPro += new LEUXmlGen.GenProess(GenProess); if (false == gen.Generate(this.textBoxOutput.Text)) { return; } } } finally { IsBusy = false; } }