コード例 #1
0
 private void stopRenaming()
 {
     ProgramNameTextBox.Visibility = Visibility.Hidden;
     ProgramNameTextBlock.Visibility = Visibility.Visible;
     RenamingProgram = null;
 }
コード例 #2
0
 private void onRenamingProgramChanged(ProgramViewModel newValue)
 {
     if (newValue == DataContext)
     {
     startRenaming();
     } else if (newValue == null)
     {
     stopRenaming();
     }
 }
コード例 #3
0
 private void addProgramViewModel(ProgramViewModel programViewModel)
 {
     GlContextManager.ShaderCompiler.AddProgram(programViewModel.Program);
     Programs.Add(programViewModel);
 }
コード例 #4
0
 private void onActiveProgramChanged(ProgramViewModel newValue)
 {
     IsActiveProgram = newValue == DataContext;
 }
コード例 #5
0
 private static void attachShaderToProgram(ProgramViewModel program, ShaderViewModel shader)
 {
     var currentAttachedShader = program.GetShaderForStage(shader.Stage);
     if (currentAttachedShader.IsSome)
     {
     program.DetachShader(currentAttachedShader.Value);
     }
     program.AttachShader(shader);
 }