private void RunModelButtonClick(object sender, RoutedEventArgs e) { Models.CraftsModeExecutor CfExe = new Models.CraftsModeExecutor(); //Set the environment CfExe.CraftsModeEnvSetter((int)this.WinFormGrid.Width, (int)this.WinFormGrid.Height); //Get the Model int ModelIdx = ModelName.SelectedIndex - 1; List <Models.CraftsModePreDefinedModelType> pdList = CfExe.CraftsModeGetModelPreDefined(); Models.CraftsModePreDefinedModelType pd = pdList[ModelIdx]; CfExe.CraftsModeEnvModelSetter(pd.GetModelStageId(), pd.GetModelModelId(), pd.GetModelSpecialId()); CfExe.CraftsModeEnvStartRunningSetter(); TowerModel CraftsModeTowerModel = CfExe.CraftsModePreExecutor(); FormParas CraftsModeFormParas = CfExe.CraftsModeFormParasGetter(); WorkSpaceClass CraftsModeWorkSpaceInstance = CfExe.CraftsModeWorkSpaceInstance(); VTKFormRender CraftsModeForm = new VTKFormRender(CraftsModeFormParas, CraftsModeTowerModel, CraftsModeWorkSpaceInstance); CraftsModeForm.TopLevel = false; CraftsModeWinForm.Child = CraftsModeForm; }
public CraftsModeEnv() { //Here we set the Models: PreDefinedModelList = new List <CraftsModePreDefinedModelType>(); for (int StageId = 0; StageId < 4; StageId++) { CraftsModePreDefinedModelType pd = new CraftsModePreDefinedModelType(); pd.SetAsTemperatureModel(StageId); PreDefinedModelList.Add(pd); } }