PageRenderTime 37ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/Source Code/ExperimentalProjection/ProjectorFactory.vb

#
Visual Basic | 28 lines | 10 code | 5 blank | 13 comment | 0 complexity | 13d48476b6b8d827a28e09893ad98bf3 MD5 | raw file
  1. ''' <summary>
  2. ''' Contains methods for instantiating projectors.
  3. ''' </summary>
  4. Public NotInheritable Class ProjectorFactory
  5. Private Sub New()
  6. End Sub
  7. ''' <summary>
  8. ''' Creates a new instance of a GDI projector.
  9. ''' </summary>
  10. ''' <param name="surfaceControl">The surface control to use in rendering the projection.</param>
  11. ''' <returns>A new instance of a GDI projector.</returns>
  12. Public Shared Function CreateGdiProjector(ByVal surfaceControl As Control) As GdiProjector
  13. Return New GdiProjector(surfaceControl)
  14. End Function
  15. ''' <summary>
  16. ''' Creates a new instance of a WPF projector.
  17. ''' </summary>
  18. ''' <param name="surfaceControl">The surface control to use in rendering the projection.</param>
  19. ''' <returns>A new instance of a WPF projector.</returns>
  20. Public Shared Function CreateWpfProjector(ByVal surfaceControl As System.Windows.Controls.Grid) As WpfProjector
  21. Return New WpfProjector(surfaceControl)
  22. End Function
  23. End Class