protected async Task OpenExampleContract(string exampleName) { var contract = await ExampleLoader.ReadContract(exampleName); ContractManager.RestoreContract(contract); NavigationManager.NavigateTo("/process"); }
protected override async Task OnParametersSetAsync() { ContractLinks = await ContractStorage.GetAllContractLinks(); ExampleContracts = await ExampleLoader.ReadManifest(); await base.OnParametersSetAsync(); }
private static IEnumerable <ExampleDefinition> LoadExampleDefinitions() { var loader = new ExampleLoader(); var xmlExamples = loader.DiscoverAllXmlFiles(); IEnumerable <ExampleDefinition> exampleDefinitions = xmlExamples.Select(e => loader.Parse(e)); return(exampleDefinitions); }
/// <summary> /// Crea todos los modulos necesarios de la aplicacion /// </summary> internal void initGraphics(MainForm mainForm, Control panel3d) { this.mainForm = mainForm; this.panel3d = panel3d; this.fullScreenPanel = new FullScreenPanel(); panel3d.Focus(); //Iniciar graficos this.tgcD3dDevice = new TgcD3dDevice(panel3d); this.texturesManager = new TgcTexture.Manager(); this.tgcD3dDevice.OnResetDevice(tgcD3dDevice.D3dDevice, null); //Iniciar otras herramientas this.texturesPool = new TgcTexture.Pool(); this.logger = new Logger(mainForm.LogConsole); this.text3d = new TgcDrawText(tgcD3dDevice.D3dDevice); this.tgcD3dInput = new TgcD3dInput(mainForm, panel3d); this.fpsCamera = new TgcFpsCamera(); this.rotCamera = new TgcRotationalCamera(); this.thirdPersonCamera = new TgcThirdPersonCamera(); this.axisLines = new TgcAxisLines(tgcD3dDevice.D3dDevice); this.userVars = new TgcUserVars(mainForm.getDataGridUserVars()); this.modifiers = new TgcModifiers(mainForm.getModifiersPanel()); this.elapsedTime = -1; this.frustum = new TgcFrustum(); this.mp3Player = new TgcMp3Player(); this.directSound = new TgcDirectSound(); this.fog = new TgcFog(); this.currentCamera = this.rotCamera; this.customRenderEnabled = false; this.drawer2D = new TgcDrawer2D(); this.shaders = new TgcShaders(); //toogles this.rotCamera.Enable = true; this.fpsCamera.Enable = false; this.thirdPersonCamera.Enable = false; this.fpsCounterEnable = true; this.axisLines.Enable = true; //Cargar algoritmos exampleLoader = new ExampleLoader(); examplesDir = System.Environment.CurrentDirectory + "\\" + ExampleLoader.EXAMPLES_DIR + "\\"; examplesMediaDir = examplesDir + "Media" + "\\"; alumnoEjemplosDir = System.Environment.CurrentDirectory + "\\" + "AlumnoEjemplos" + "\\"; alumnoEjemplosMediaDir = alumnoEjemplosDir + "AlumnoMedia" + "\\"; exampleLoader.loadExamplesInGui(mainForm.TreeViewExamples, new string[] { examplesDir, alumnoEjemplosDir }); //Cargar shaders del framework this.shaders.loadCommonShaders(); //Cargar ejemplo default TgcExample defaultExample = exampleLoader.getExampleByName(mainForm.Config.defaultExampleName, mainForm.Config.defaultExampleCategory); executeExample(defaultExample); }
private void LoadCode() { try { _sourceFilePaths.ForEach(file => { var index = file.LastIndexOf('/') + 1; var fileName = file.Substring(index).Replace(".txt", String.Empty); _sourceFiles[fileName] = ExampleLoader.LoadSourceFile(file); }); } catch (Exception ex) { throw new Exception(string.Format("An error occurred when parsing the source-code files for Example '{0}'", Title), ex); } }