remove wpf reference

This commit is contained in:
2019-11-27 09:26:49 +01:00
parent 1d640d2352
commit 85b0603409
75 changed files with 408 additions and 2413 deletions

View File

@@ -9,6 +9,7 @@ Imports Point = System.Drawing.Point
Imports KeyboardState = OpenTK.Input.KeyboardState
Imports Keyboard = OpenTK.Input.Keyboard
Imports Key = OpenTK.Input.Key
Imports Color = System.Drawing.Color
Namespace PreviewN
@@ -25,12 +26,22 @@ Namespace PreviewN
Private _isMouseDown As Boolean = False
Private isDeactivated As Boolean = False
Private ReadOnly myModels As New Dictionary(Of Object3D, Renderer)
Private WithEvents RenderTimer As New Timers.Timer(1) With {.AutoReset = True}
Public Property RenderWhenWindowsIsInactive As Boolean = False
Public Property EnableCameraControlling As Boolean = True
Public Property Scaling As Single = 500.0F
Public Property ClearColor As Color = Color.CornflowerBlue
Public Property RenderInterval As Double
Get
Return renderTimer.Interval
End Get
Set
renderTimer.Interval = Value
End Set
End Property
Public ReadOnly Property Camera As Camera
Get
Return MyCamera
@@ -111,7 +122,7 @@ Namespace PreviewN
Me.glControl1.VSync = False
Me.Controls.Add(Me.glControl1)
Me.ResumeLayout(False)
AddHandler Windows.Media.CompositionTarget.Rendering, AddressOf CompositionTarget_Rendering
renderTimer.Start()
Scaling = scale
@@ -194,7 +205,7 @@ Namespace PreviewN
isDeactivated = True
End Sub
Private Sub CompositionTarget_Rendering(sender As Object, e As EventArgs)
Private Sub RenderTimer_Elapsed(sender As Object, e As Timers.ElapsedEventArgs) Handles RenderTimer.Elapsed
If Not isDeactivated OrElse RenderWhenWindowsIsInactive Then
RaiseEvent WandUpdateView()
glControl1.Invalidate()