Compare commits
1 Commits
net6
...
feat/simpl
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ae6e827a5 |
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="Telerik UI for WinForms 2023.1.117" value="C:\Program Files (x86)\Progress\Telerik UI for WinForms R1 2023\Bin60\NuGet" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
||||||
@@ -26,9 +26,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
@@ -86,4 +83,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="SimpleHistory\Enums.vb" />
|
<Compile Remove="SimpleHistory\Enums.vb" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Pilz.Cryptography\Pilz.Cryptography.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
8
Pilz.Collections/SimpleSorting/ElementSortingPosition.vb
Normal file
8
Pilz.Collections/SimpleSorting/ElementSortingPosition.vb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Namespace SimpleSorting
|
||||||
|
|
||||||
|
Public Enum ElementSortingPosition
|
||||||
|
Before
|
||||||
|
After
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
End Namespace
|
||||||
10
Pilz.Collections/SimpleSorting/ISimpleSortingHost.vb
Normal file
10
Pilz.Collections/SimpleSorting/ISimpleSortingHost.vb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Namespace SimpleSorting
|
||||||
|
|
||||||
|
Public Interface ISimpleSortingHost
|
||||||
|
Inherits IList
|
||||||
|
|
||||||
|
Event OnInsert(sender As Object, e As SimpleSortingHostEventArgs)
|
||||||
|
Event OnRemove(sender As Object, e As SimpleSortingHostEventArgs)
|
||||||
|
End Interface
|
||||||
|
|
||||||
|
End Namespace
|
||||||
13
Pilz.Collections/SimpleSorting/SimpleSortingEntry.vb
Normal file
13
Pilz.Collections/SimpleSorting/SimpleSortingEntry.vb
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Imports Pilz.Cryptography
|
||||||
|
|
||||||
|
Namespace SimpleSorting
|
||||||
|
|
||||||
|
Friend Class SimpleSortingEntry
|
||||||
|
|
||||||
|
Public Property Element As UniquieID
|
||||||
|
Public Property Position As ElementSortingPosition
|
||||||
|
Public Property ReferenceElement As UniquieID
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
End Namespace
|
||||||
18
Pilz.Collections/SimpleSorting/SimpleSortingHostEventArgs.vb
Normal file
18
Pilz.Collections/SimpleSorting/SimpleSortingHostEventArgs.vb
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Imports Pilz.Cryptography
|
||||||
|
|
||||||
|
Namespace SimpleSorting
|
||||||
|
|
||||||
|
Public Class SimpleSortingHostEventArgs
|
||||||
|
Inherits EventArgs
|
||||||
|
|
||||||
|
Public ReadOnly Property ElementID As UniquieID
|
||||||
|
Public ReadOnly Property ElementIndex As Integer
|
||||||
|
|
||||||
|
Public Sub New(elementID As UniquieID, elementIndex As Integer)
|
||||||
|
Me.ElementID = elementID
|
||||||
|
Me.ElementIndex = elementIndex
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
End Namespace
|
||||||
121
Pilz.Collections/SimpleSorting/SimpleSortingList.vb
Normal file
121
Pilz.Collections/SimpleSorting/SimpleSortingList.vb
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
Imports System.Runtime.InteropServices.ComTypes
|
||||||
|
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
|
Imports Pilz.Cryptography
|
||||||
|
|
||||||
|
Namespace SimpleSorting
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Provides some management methods for sorting a list without changing the list itself.
|
||||||
|
''' Useful if the host list can not be changed or the sorting is indipendent from the required sorting.
|
||||||
|
''' </summary>
|
||||||
|
''' <typeparam name="T">The content of the host list to sort.</typeparam>
|
||||||
|
Public Class SimpleSortingList(Of T As IUniquieIDHost)
|
||||||
|
|
||||||
|
Private ReadOnly host As ISimpleSortingHost
|
||||||
|
|
||||||
|
<JsonProperty("SortingInfo")>
|
||||||
|
Private ReadOnly sortingList As New List(Of SimpleSortingEntry)
|
||||||
|
|
||||||
|
Public Sub New(parentList As ISimpleSortingHost)
|
||||||
|
host = parentList
|
||||||
|
AddHandler host.OnInsert, AddressOf Host_OnInsert
|
||||||
|
AddHandler host.OnRemove, AddressOf Host_OnRemove
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
RemoveHandler host.OnInsert, AddressOf Host_OnInsert
|
||||||
|
RemoveHandler host.OnRemove, AddressOf Host_OnRemove
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Host_OnInsert(sender As Object, e As SimpleSortingHostEventArgs)
|
||||||
|
'...
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Host_OnRemove(sender As Object, e As SimpleSortingHostEventArgs)
|
||||||
|
'...
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Stores positioning infos for the given element.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="elementID"></param>
|
||||||
|
''' <param name="position"></param>
|
||||||
|
''' <param name="referenceElementID"></param>
|
||||||
|
Public Sub SetElementPosition(elementID As UniquieID, position As ElementSortingPosition, referenceElementID As UniquieID)
|
||||||
|
'...
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Removes the positioning infos for the given element if available.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="elementID"></param>
|
||||||
|
Public Sub RemoveElementPosition(elementID As UniquieID)
|
||||||
|
Dim infoToRemove = FindSortInfoByID(elementID)
|
||||||
|
|
||||||
|
If infoToRemove IsNot Nothing Then
|
||||||
|
sortingList.Remove(infoToRemove)
|
||||||
|
|
||||||
|
For Each info In sortingList
|
||||||
|
If info.ReferenceElement = elementID Then
|
||||||
|
info.ReferenceElement = infoToRemove.ReferenceElement
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Completely removes an element from all positioning infos. If possible, elements will be assigned to nearby reference or removed completely.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="elementID"></param>
|
||||||
|
Public Sub InvalidateElement(elementID As UniquieID)
|
||||||
|
'...
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Creates a sorted list with all elements from the host list.
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function GetSortedList() As List(Of T)
|
||||||
|
Dim list As New List(Of T)
|
||||||
|
list.AddRange(host)
|
||||||
|
|
||||||
|
For Each info In sortingList
|
||||||
|
Dim element As T = list.FirstOrDefault(Function(n) n.ID = info.Element)
|
||||||
|
Dim referenceElement As T = list.FirstOrDefault(Function(n) n.ID = info.ReferenceElement)
|
||||||
|
|
||||||
|
If element IsNot Nothing AndAlso referenceElement IsNot Nothing Then
|
||||||
|
list.Remove(element)
|
||||||
|
Dim referenceElementIndex As Integer = list.IndexOf(referenceElement)
|
||||||
|
|
||||||
|
If info.Position = ElementSortingPosition.After Then
|
||||||
|
referenceElementIndex += 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
list.Insert(referenceElementIndex, element)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return list
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Creates a sorted list with all elements from the host list.
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function GetSortedArray() As T()
|
||||||
|
Return GetSortedList.ToArray
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function FindSortInfoByID(id As UniquieID) As SimpleSortingEntry
|
||||||
|
Return sortingList.FirstOrDefault(Function(n) n.Element = id)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function FindSortInfoByReferenceID(id As UniquieID) As SimpleSortingEntry
|
||||||
|
Return sortingList.FirstOrDefault(Function(n) n.ReferenceElement = id)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
End Namespace
|
||||||
@@ -24,17 +24,12 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Pilz.Cryptography
|
namespace Pilz.Cryptography
|
||||||
{
|
{
|
||||||
[JsonConverter(typeof(Json.Converters.UniquieIDStringJsonConverter))]
|
|
||||||
public interface IUniquieID
|
public interface IUniquieID
|
||||||
{
|
{
|
||||||
bool HasID { get; }
|
bool HasID { get; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Pilz.Json.Converters
|
|||||||
|
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
{
|
{
|
||||||
return typeof(IUniquieID).IsAssignableFrom(objectType);
|
return typeof(UniquieID).IsAssignableFrom(objectType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||||
|
|||||||
@@ -5,18 +5,13 @@
|
|||||||
<Product>Pilz.Cryptography</Product>
|
<Product>Pilz.Cryptography</Product>
|
||||||
<Copyright>Copyright © 2020</Copyright>
|
<Copyright>Copyright © 2020</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.918.846</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Management" Version="7.0.2" />
|
<PackageReference Include="System.Management" Version="4.7.0" />
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
Imports System.Windows.Forms
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
Imports OpenTK
|
Imports OpenTK
|
||||||
Imports OpenTK.Mathematics
|
|
||||||
|
|
||||||
Namespace CameraN
|
Namespace CameraN
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net48</TargetFramework>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Drawing.Drawing3D.OpenGLFactory.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Drawing.Drawing3D.OpenGLFactory.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
@@ -25,21 +24,19 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="OpenTK.Input" Version="4.8.0" />
|
|
||||||
<PackageReference Include="OpenTK.WinForms" Version="4.0.0-pre.6" />
|
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="OpenTK" Version="4.8.0" />
|
<PackageReference Include="OpenTK" Version="3.2" />
|
||||||
|
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" />
|
||||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
<Import Include="System" />
|
<Import Include="System" />
|
||||||
@@ -55,7 +52,9 @@
|
|||||||
<Compile Update="Preview\ModelPreview.Designer.vb">
|
<Compile Update="Preview\ModelPreview.Designer.vb">
|
||||||
<DependentUpon>ModelPreview.vb</DependentUpon>
|
<DependentUpon>ModelPreview.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Preview\ModelPreview.vb" />
|
<Compile Update="Preview\ModelPreview.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="My Project\Application.Designer.vb">
|
<Compile Update="My Project\Application.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Application.myapp</DependentUpon>
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
@@ -99,9 +98,4 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="ModelPreview.Designer.vb" />
|
<Compile Remove="ModelPreview.Designer.vb" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="OpenTK3">
|
|
||||||
<HintPath>..\Shared Libs\OpenTK3.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -6,12 +6,10 @@ Imports OpenTK
|
|||||||
Imports OpenTK.Graphics.OpenGL
|
Imports OpenTK.Graphics.OpenGL
|
||||||
Imports Pilz.S3DFileParser
|
Imports Pilz.S3DFileParser
|
||||||
Imports Point = System.Drawing.Point
|
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
|
Imports Color = System.Drawing.Color
|
||||||
Imports OpenTK.Mathematics
|
|
||||||
Imports OpenTK.WinForms
|
|
||||||
Imports OpenTK.Input
|
|
||||||
Imports OpenTK.Windowing.GraphicsLibraryFramework
|
|
||||||
Imports Key = OpenTK3.Input.Key
|
|
||||||
|
|
||||||
Namespace PreviewN
|
Namespace PreviewN
|
||||||
|
|
||||||
@@ -32,12 +30,6 @@ Namespace PreviewN
|
|||||||
Public Property Scaling As Single = 500.0F
|
Public Property Scaling As Single = 500.0F
|
||||||
Public Property ClearColor As Color = Color.CornflowerBlue
|
Public Property ClearColor As Color = Color.CornflowerBlue
|
||||||
|
|
||||||
Public ReadOnly Property Keyboard As OpenTK3.Input.KeyboardState
|
|
||||||
Get
|
|
||||||
Return OpenTK3.Input.Keyboard.GetState
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property EnableCameraControlling As Boolean
|
Public Property EnableCameraControlling As Boolean
|
||||||
Get
|
Get
|
||||||
Return _EnableCameraControlling
|
Return _EnableCameraControlling
|
||||||
@@ -89,14 +81,14 @@ Namespace PreviewN
|
|||||||
|
|
||||||
Private ReadOnly Property IsStrgPressed As Boolean
|
Private ReadOnly Property IsStrgPressed As Boolean
|
||||||
Get
|
Get
|
||||||
Dim state = Keyboard
|
Dim state As KeyboardState = Keyboard.GetState()
|
||||||
Return state(Key.ControlLeft) OrElse state(Key.ControlRight)
|
Return state(Key.ControlLeft) OrElse state(Key.ControlRight)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private ReadOnly Property IsShiftPressed As Boolean
|
Private ReadOnly Property IsShiftPressed As Boolean
|
||||||
Get
|
Get
|
||||||
Dim state = Keyboard
|
Dim state As KeyboardState = Keyboard.GetState()
|
||||||
Return state(Key.ShiftLeft) OrElse state(Key.ShiftRight)
|
Return state(Key.ShiftLeft) OrElse state(Key.ShiftRight)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
@@ -140,6 +132,7 @@ Namespace PreviewN
|
|||||||
Me.glControl1.Size = Me.ClientSize
|
Me.glControl1.Size = Me.ClientSize
|
||||||
Me.glControl1.TabIndex = 0
|
Me.glControl1.TabIndex = 0
|
||||||
Me.glControl1.TabStop = False
|
Me.glControl1.TabStop = False
|
||||||
|
Me.glControl1.VSync = False
|
||||||
Me.Controls.Add(Me.glControl1)
|
Me.Controls.Add(Me.glControl1)
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
@@ -254,7 +247,7 @@ Namespace PreviewN
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub glControl1_Resize(sender As Object, e As EventArgs) Handles glControl1.Resize
|
Private Sub glControl1_Resize(sender As Object, e As EventArgs) Handles glControl1.Resize
|
||||||
'glControl1.Context.Update(glControl1.WindowInfo)
|
glControl1.Context.Update(glControl1.WindowInfo)
|
||||||
GL.Viewport(0, 0, glControl1.Width, glControl1.Height)
|
GL.Viewport(0, 0, glControl1.Width, glControl1.Height)
|
||||||
ProjMatrix = Matrix4.CreatePerspectiveFieldOfView(FOV, glControl1.Width / glControl1.Height, 100.0F, 100000.0F)
|
ProjMatrix = Matrix4.CreatePerspectiveFieldOfView(FOV, glControl1.Width / glControl1.Height, 100.0F, 100000.0F)
|
||||||
glControl1.Invalidate()
|
glControl1.Invalidate()
|
||||||
@@ -293,7 +286,7 @@ Namespace PreviewN
|
|||||||
Dim allowCamMove As Boolean = Not (IsMouseDown AndAlso IsShiftPressed)
|
Dim allowCamMove As Boolean = Not (IsMouseDown AndAlso IsShiftPressed)
|
||||||
|
|
||||||
If allowCamMove Then
|
If allowCamMove Then
|
||||||
Dim state = Keyboard
|
Dim state As KeyboardState = Keyboard.GetState
|
||||||
|
|
||||||
If state(Key.W) Then
|
If state(Key.W) Then
|
||||||
'camera.Move(moveSpeed, moveSpeed, camMtx)
|
'camera.Move(moveSpeed, moveSpeed, camMtx)
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
Imports System.Drawing
|
Imports System.Drawing
|
||||||
Imports System.Threading
|
Imports System.Threading
|
||||||
Imports System.Windows.Forms
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
Imports OpenTK
|
Imports OpenTK
|
||||||
Imports OpenTK.Graphics.OpenGL
|
Imports OpenTK.Graphics.OpenGL
|
||||||
Imports OpenTK.Mathematics
|
|
||||||
|
|
||||||
Imports Pilz.S3DFileParser
|
Imports Pilz.S3DFileParser
|
||||||
|
|
||||||
Imports Bitmap = System.Drawing.Bitmap
|
Imports Bitmap = System.Drawing.Bitmap
|
||||||
Imports Color = System.Drawing.Color
|
Imports Color = System.Drawing.Color
|
||||||
Imports Image = System.Drawing.Image
|
Imports Image = System.Drawing.Image
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net48</TargetFramework>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Drawing.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Drawing.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
@@ -25,11 +24,6 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
using Pilz.Runtime;
|
|
||||||
using Pilz.Win32.Native;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Pilz.IO
|
|
||||||
{
|
|
||||||
public static class Extensions
|
|
||||||
{
|
|
||||||
static readonly int MAX_PATH = 255;
|
|
||||||
|
|
||||||
public static string GetExecutablePath(bool checkRealOS = false)
|
|
||||||
{
|
|
||||||
if (RuntimeInformationsEx.IsOSPlatform(OSType.Windows, checkRealOS))
|
|
||||||
{
|
|
||||||
var sb = new StringBuilder(MAX_PATH);
|
|
||||||
Kernel32.GetModuleFileName(IntPtr.Zero, sb, MAX_PATH);
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return Process.GetCurrentProcess().MainModule.FileName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<AssemblyTitle>NamedPipeManaging</AssemblyTitle>
|
<AssemblyTitle>NamedPipeManaging</AssemblyTitle>
|
||||||
@@ -43,17 +43,12 @@
|
|||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
@@ -91,8 +86,4 @@
|
|||||||
<LastGenOutput>Application.Designer.cs</LastGenOutput>
|
<LastGenOutput>Application.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Pilz.Win32\Pilz.Win32.vbproj" />
|
|
||||||
<ProjectReference Include="..\Pilz\Pilz.vbproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -7,11 +7,6 @@
|
|||||||
<Copyright>Copyright © DRSN 2018</Copyright>
|
<Copyright>Copyright © DRSN 2018</Copyright>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.1955</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net48</TargetFramework>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Networking.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Networking.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
@@ -25,18 +24,12 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
|
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
|||||||
@@ -24,11 +24,6 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
|
|||||||
@@ -26,14 +26,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.1955</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net48</TargetFramework>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Threading.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Threading.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
@@ -35,16 +34,13 @@
|
|||||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
|
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
<Import Include="System" />
|
<Import Include="System" />
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<PackageId>Pilz.UI.Telerik</PackageId>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<RootNamespace>Pilz.UI.Telerik</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.1955</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
|
||||||
<PackageReference Include="UI.for.WinForms.AllControls.Net60" Version="2023.1.117" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik
|
|
||||||
{
|
|
||||||
public enum SvgImageSize
|
|
||||||
{
|
|
||||||
Default,
|
|
||||||
Small,
|
|
||||||
Medium,
|
|
||||||
Large
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
using System.Drawing;
|
|
||||||
using System.Reflection;
|
|
||||||
using Telerik.WinControls;
|
|
||||||
using Telerik.WinControls.Svg;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik
|
|
||||||
{
|
|
||||||
public abstract class SymbolFactory<TSvgSymbols> where TSvgSymbols : Enum
|
|
||||||
{
|
|
||||||
public abstract string GetSvgImageRessourcePath(TSvgSymbols svgImage);
|
|
||||||
public abstract Assembly GetSvgImageResourceAssembly();
|
|
||||||
|
|
||||||
protected virtual Size ResolveCommonSize(SvgImageSize size)
|
|
||||||
{
|
|
||||||
return size switch
|
|
||||||
{
|
|
||||||
SvgImageSize.Small => new Size(16, 16),
|
|
||||||
SvgImageSize.Medium => new Size(20, 20),
|
|
||||||
SvgImageSize.Large => new Size(32, 32),
|
|
||||||
_ => Size.Empty,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual Stream? GetSvgImageRessourceStream(TSvgSymbols svgImage)
|
|
||||||
{
|
|
||||||
var asm = GetSvgImageResourceAssembly();
|
|
||||||
var path = GetSvgImageRessourcePath(svgImage);
|
|
||||||
return asm.GetManifestResourceStream(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual RadSvgImage GetSvgImage(TSvgSymbols svgImage, SvgImageSize size)
|
|
||||||
{
|
|
||||||
return GetSvgImage(svgImage, ResolveCommonSize(size));
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual RadSvgImage GetSvgImage(TSvgSymbols svgImage, Size size)
|
|
||||||
{
|
|
||||||
using var stream = GetSvgImageRessourceStream(svgImage);
|
|
||||||
var img = RadSvgImage.FromStream(stream);
|
|
||||||
|
|
||||||
if (!size.IsEmpty)
|
|
||||||
img.Size = size;
|
|
||||||
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual RadSvgImage GetSvgImageColored(TSvgSymbols svgImage, SvgImageSize size, Color color)
|
|
||||||
{
|
|
||||||
return GetSvgImageColored(svgImage, ResolveCommonSize(size), color);
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual RadSvgImage GetSvgImageColored(TSvgSymbols svgImage, Size size, Color color)
|
|
||||||
{
|
|
||||||
var img = GetSvgImage(svgImage, size);
|
|
||||||
|
|
||||||
img.Document.Fill = new SvgColourServer(color);
|
|
||||||
img.ClearCache();
|
|
||||||
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual Image GetImage(TSvgSymbols svgImage, SvgImageSize size)
|
|
||||||
{
|
|
||||||
return GetImage(svgImage, ResolveCommonSize(size));
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual Image GetImage(TSvgSymbols svgImage, Size size)
|
|
||||||
{
|
|
||||||
return GetImageFromSvg(GetSvgImage(svgImage, size));
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual Image GetImageColored(TSvgSymbols svgImage, SvgImageSize size, Color color)
|
|
||||||
{
|
|
||||||
return GetImageColored(svgImage, ResolveCommonSize(size), color);
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual Image GetImageColored(TSvgSymbols svgImage, Size size, Color color)
|
|
||||||
{
|
|
||||||
return GetImageFromSvg(GetSvgImageColored(svgImage, size, color));
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual Image GetImageFromSvg(RadSvgImage svg)
|
|
||||||
{
|
|
||||||
return svg.Document.Draw(svg.Width, svg.Height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
partial class DialogBaseForm
|
|
||||||
{
|
|
||||||
public delegate void DialogLoadingEventHandler(DialogLoadingEventArgs e);
|
|
||||||
public delegate void DialogClosedEventHandler(DialogClosedEventArgs e);
|
|
||||||
|
|
||||||
public static event DialogLoadingEventHandler? DialogLoading;
|
|
||||||
public static event DialogClosedEventHandler? DialogClosed;
|
|
||||||
|
|
||||||
public static T ShowDialog<T>(string title, Icon icon, object? tag = null) where T : FlyoutDialogBase
|
|
||||||
{
|
|
||||||
return ShowDialog<T>(null, title, icon, tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static T ShowDialog<T>(IWin32Window? parent, string title, Icon icon, object? tag = null) where T : FlyoutDialogBase
|
|
||||||
{
|
|
||||||
var dialogPanel = Activator.CreateInstance<T>();
|
|
||||||
dialogPanel.Dock = DockStyle.Fill;
|
|
||||||
dialogPanel.Tag = tag;
|
|
||||||
|
|
||||||
var dialog = new DialogBaseForm
|
|
||||||
{
|
|
||||||
DialogPanel = dialogPanel,
|
|
||||||
Text = title,
|
|
||||||
Icon = icon,
|
|
||||||
StartPosition = parent == null ? FormStartPosition.CenterScreen : FormStartPosition.CenterParent,
|
|
||||||
ClientSize = dialogPanel.Size
|
|
||||||
};
|
|
||||||
dialog.Controls.Add(dialogPanel);
|
|
||||||
dialog.ShowDialog(parent);
|
|
||||||
|
|
||||||
return dialogPanel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Telerik.WinControls.UI;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
public partial class DialogBaseForm : RadForm
|
|
||||||
{
|
|
||||||
public FlyoutDialogBase? DialogPanel { get; private set; }
|
|
||||||
|
|
||||||
private DialogBaseForm()
|
|
||||||
{
|
|
||||||
Load += DialogBaseForm_Load;
|
|
||||||
FormClosed += DialogBaseForm_FormClosed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DialogBaseForm_Load(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (DialogPanel is ILoadContent iLoadContent)
|
|
||||||
iLoadContent.LoadContent();
|
|
||||||
|
|
||||||
DialogLoading?.Invoke(new DialogLoadingEventArgs(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DialogBaseForm_FormClosed(object? sender, FormClosedEventArgs e)
|
|
||||||
{
|
|
||||||
DialogClosed?.Invoke(new DialogClosedEventArgs(this));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
public class DialogClosedEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
public DialogBaseForm Parent { get; private set; }
|
|
||||||
public FlyoutDialogBase? Content => Parent?.DialogPanel;
|
|
||||||
|
|
||||||
public DialogClosedEventArgs(DialogBaseForm dialog)
|
|
||||||
{
|
|
||||||
Parent = dialog;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Windows.Forms.Design;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
public class DialogLoadingEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
public DialogBaseForm Parent { get; private set; }
|
|
||||||
public FlyoutDialogBase? Content => Parent?.DialogPanel;
|
|
||||||
|
|
||||||
public DialogLoadingEventArgs(DialogBaseForm dialog)
|
|
||||||
{
|
|
||||||
Parent = dialog;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
public class FlyoutClosedEventArgs : global::Telerik.WinControls.UI.SplashScreen.FlyoutClosedEventArgs
|
|
||||||
{
|
|
||||||
public new FlyoutDialogBase? Content => base.Content as FlyoutDialogBase;
|
|
||||||
|
|
||||||
public FlyoutClosedEventArgs(FlyoutDialogBase content) : base(content)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Telerik.WinControls.UI.SplashScreen;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
public class FlyoutCreatedEventArgs : ContentCreatedEventArgs
|
|
||||||
{
|
|
||||||
public new FlyoutDialogBase? Content => base.Content as FlyoutDialogBase;
|
|
||||||
|
|
||||||
public FlyoutCreatedEventArgs(FlyoutDialogBase content) : base(content)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
77
Pilz.UI.Telerik/Dialogs/FlyoutDialogBase.Designer.cs
generated
77
Pilz.UI.Telerik/Dialogs/FlyoutDialogBase.Designer.cs
generated
@@ -1,77 +0,0 @@
|
|||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
partial class FlyoutDialogBase
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Erforderliche Designervariable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Verwendete Ressourcen bereinigen.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Vom Komponenten-Designer generierter Code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Erforderliche Methode für die Designerunterstützung.
|
|
||||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlyoutDialogBase));
|
|
||||||
radButton_Cancel = new global::Telerik.WinControls.UI.RadButton();
|
|
||||||
radButton_Confirm = new global::Telerik.WinControls.UI.RadButton();
|
|
||||||
panel_ActionButtons = new System.Windows.Forms.Panel();
|
|
||||||
((System.ComponentModel.ISupportInitialize)radButton_Cancel).BeginInit();
|
|
||||||
((System.ComponentModel.ISupportInitialize)radButton_Confirm).BeginInit();
|
|
||||||
panel_ActionButtons.SuspendLayout();
|
|
||||||
SuspendLayout();
|
|
||||||
//
|
|
||||||
// radButton_Cancel
|
|
||||||
//
|
|
||||||
resources.ApplyResources(radButton_Cancel, "radButton_Cancel");
|
|
||||||
radButton_Cancel.Name = "radButton_Cancel";
|
|
||||||
radButton_Cancel.Click += RadButton_Cancel_Click;
|
|
||||||
//
|
|
||||||
// radButton_Confirm
|
|
||||||
//
|
|
||||||
resources.ApplyResources(radButton_Confirm, "radButton_Confirm");
|
|
||||||
radButton_Confirm.Name = "radButton_Confirm";
|
|
||||||
radButton_Confirm.Click += RadButton_Confirm_Click;
|
|
||||||
//
|
|
||||||
// panel_ActionButtons
|
|
||||||
//
|
|
||||||
panel_ActionButtons.Controls.Add(radButton_Cancel);
|
|
||||||
panel_ActionButtons.Controls.Add(radButton_Confirm);
|
|
||||||
resources.ApplyResources(panel_ActionButtons, "panel_ActionButtons");
|
|
||||||
panel_ActionButtons.Name = "panel_ActionButtons";
|
|
||||||
//
|
|
||||||
// FlyoutDialogBase
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this, "$this");
|
|
||||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
Controls.Add(panel_ActionButtons);
|
|
||||||
Name = "FlyoutDialogBase";
|
|
||||||
((System.ComponentModel.ISupportInitialize)radButton_Cancel).EndInit();
|
|
||||||
((System.ComponentModel.ISupportInitialize)radButton_Confirm).EndInit();
|
|
||||||
panel_ActionButtons.ResumeLayout(false);
|
|
||||||
ResumeLayout(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private global::Telerik.WinControls.UI.RadButton radButton_Cancel;
|
|
||||||
private global::Telerik.WinControls.UI.RadButton radButton_Confirm;
|
|
||||||
private System.Windows.Forms.Panel panel_ActionButtons;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Telerik.WinControls.UI.SplashScreen;
|
|
||||||
using Telerik.WinControls.UI;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
partial class FlyoutDialogBase
|
|
||||||
{
|
|
||||||
public delegate void FlyoutCreatedEventHandler(FlyoutCreatedEventArgs e);
|
|
||||||
public delegate void FlyoutClosedEventHandler(FlyoutClosedEventArgs e);
|
|
||||||
|
|
||||||
public static event FlyoutCreatedEventHandler FlyoutCreated
|
|
||||||
{
|
|
||||||
add => flyoutCreatedHandlers.Add(value);
|
|
||||||
remove => flyoutCreatedHandlers.Remove(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static event FlyoutClosedEventHandler FlyoutClosed
|
|
||||||
{
|
|
||||||
add => flyoutCloseHandlers.Add(value);
|
|
||||||
remove => flyoutCloseHandlers.Remove(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static readonly List<FlyoutCreatedEventHandler> flyoutCreatedHandlers = new();
|
|
||||||
private static readonly List<FlyoutClosedEventHandler> flyoutCloseHandlers = new();
|
|
||||||
|
|
||||||
private static object? tagToAssign = null;
|
|
||||||
public static Control? ParentContext { get; private set; } = null;
|
|
||||||
|
|
||||||
static FlyoutDialogBase()
|
|
||||||
{
|
|
||||||
RadFlyoutManager.ContentCreated += RadFlyoutManager_ContentCreated;
|
|
||||||
RadFlyoutManager.FlyoutClosed += RadFlyoutManager_FlyoutClosed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void RadFlyoutManager_ContentCreated(ContentCreatedEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Content is FlyoutDialogBase dialogBase)
|
|
||||||
{
|
|
||||||
if (tagToAssign != null)
|
|
||||||
dialogBase.Tag = tagToAssign;
|
|
||||||
|
|
||||||
var eventArgs = new FlyoutCreatedEventArgs((FlyoutDialogBase)e.Content);
|
|
||||||
|
|
||||||
if (dialogBase is ILoadContent iLoadContent)
|
|
||||||
iLoadContent.LoadContent();
|
|
||||||
|
|
||||||
foreach (var args in flyoutCreatedHandlers)
|
|
||||||
{
|
|
||||||
if (ParentContext != null)
|
|
||||||
ParentContext?.Invoke(args, eventArgs);
|
|
||||||
else
|
|
||||||
args.Invoke(eventArgs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void RadFlyoutManager_FlyoutClosed(global::Telerik.WinControls.UI.SplashScreen.FlyoutClosedEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Content is FlyoutDialogBase dialogBase)
|
|
||||||
{
|
|
||||||
var eventArgs = new FlyoutClosedEventArgs((FlyoutDialogBase)e.Content);
|
|
||||||
|
|
||||||
foreach (var args in flyoutCloseHandlers)
|
|
||||||
{
|
|
||||||
if (ParentContext != null)
|
|
||||||
ParentContext?.Invoke(args, eventArgs);
|
|
||||||
else
|
|
||||||
args.Invoke(eventArgs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ParentContext = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Show<T>(Control controlToAssociate, object? tag = null)
|
|
||||||
{
|
|
||||||
Show(controlToAssociate, typeof(T), tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Show(Control controlToAssociate, Type flyoutContentType, object? tag = null)
|
|
||||||
{
|
|
||||||
tagToAssign = tag;
|
|
||||||
ParentContext = controlToAssociate;
|
|
||||||
RadFlyoutManager.Show(controlToAssociate, flyoutContentType);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static void CloseFlyout()
|
|
||||||
{
|
|
||||||
if (ParentContext == null)
|
|
||||||
throw new NullReferenceException(nameof(ParentContext));
|
|
||||||
|
|
||||||
ParentContext.BeginInvoke(RadFlyoutManager.Close);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
using Pilz.UI.Telerik;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Telerik.WinControls;
|
|
||||||
using Telerik.WinControls.UI;
|
|
||||||
using Telerik.WinControls.UI.SplashScreen;
|
|
||||||
using static Telerik.WinControls.UI.PopupEditorNotificationData;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
public partial class FlyoutDialogBase : UserControl
|
|
||||||
{
|
|
||||||
public static RadSvgImage? CancelSvg { get; set; } = null;
|
|
||||||
public static RadSvgImage? ConfirmSvg { get; set; } = null;
|
|
||||||
|
|
||||||
public DialogResult Result { get; protected set; }
|
|
||||||
|
|
||||||
protected bool ActionPanelVisible
|
|
||||||
{
|
|
||||||
get => panel_ActionButtons.Visible;
|
|
||||||
set => panel_ActionButtons.Visible = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected bool CancelButtonEnable
|
|
||||||
{
|
|
||||||
get => radButton_Cancel.Enabled;
|
|
||||||
set => radButton_Cancel.Enabled = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected bool ConfirmButtonEnable
|
|
||||||
{
|
|
||||||
get => radButton_Confirm.Enabled;
|
|
||||||
set => radButton_Confirm.Enabled = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected FlyoutDialogBase()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
ParentChanged += FlyoutDialogBase_ParentChanged;
|
|
||||||
|
|
||||||
// SVG Symbols
|
|
||||||
radButton_Cancel.SvgImage = CancelSvg;
|
|
||||||
radButton_Confirm.SvgImage = ConfirmSvg;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FlyoutDialogBase_ParentChanged(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var frm = FindForm();
|
|
||||||
if (frm != null)
|
|
||||||
frm.AcceptButton = radButton_Confirm;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Close(DialogResult result)
|
|
||||||
{
|
|
||||||
Result = result;
|
|
||||||
|
|
||||||
if (FindForm() is DialogBaseForm dialogForm)
|
|
||||||
dialogForm.Close();
|
|
||||||
else
|
|
||||||
CloseFlyout();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RadButton_Confirm_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (ValidateOK())
|
|
||||||
Close(DialogResult.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RadButton_Cancel_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Close(DialogResult.Cancel);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual bool ValidateOK()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="radButton_Cancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
|
||||||
<value>Top, Right</value>
|
|
||||||
</data>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="radButton_Cancel.ImageAlignment" type="System.Drawing.ContentAlignment, System.Drawing">
|
|
||||||
<value>MiddleRight</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Cancel.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>187, 3</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Cancel.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>110, 24</value>
|
|
||||||
</data>
|
|
||||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="radButton_Cancel.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Cancel.Text" xml:space="preserve">
|
|
||||||
<value>Cancel</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Cancel.TextAlignment" type="System.Drawing.ContentAlignment, System.Drawing">
|
|
||||||
<value>MiddleLeft</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Cancel.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
|
||||||
<value>ImageBeforeText</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Cancel.Name" xml:space="preserve">
|
|
||||||
<value>radButton_Cancel</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Cancel.Type" xml:space="preserve">
|
|
||||||
<value>Telerik.WinControls.UI.RadButton, Telerik.WinControls.UI, Culture=neutral, PublicKeyToken=5bb2a467cbec794e</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Cancel.Parent" xml:space="preserve">
|
|
||||||
<value>panel_ActionButtons</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Cancel.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
|
||||||
<value>Top, Right</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.ImageAlignment" type="System.Drawing.ContentAlignment, System.Drawing">
|
|
||||||
<value>MiddleRight</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>71, 3</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>110, 24</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.Text" xml:space="preserve">
|
|
||||||
<value>Okay</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.TextAlignment" type="System.Drawing.ContentAlignment, System.Drawing">
|
|
||||||
<value>MiddleLeft</value>
|
|
||||||
</data>
|
|
||||||
<data name="radButton_Confirm.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
|
||||||
<value>ImageBeforeText</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Confirm.Name" xml:space="preserve">
|
|
||||||
<value>radButton_Confirm</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Confirm.Type" xml:space="preserve">
|
|
||||||
<value>Telerik.WinControls.UI.RadButton, Telerik.WinControls.UI, Culture=neutral, PublicKeyToken=5bb2a467cbec794e</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Confirm.Parent" xml:space="preserve">
|
|
||||||
<value>panel_ActionButtons</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>radButton_Confirm.ZOrder" xml:space="preserve">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name="panel_ActionButtons.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
|
||||||
<value>Bottom</value>
|
|
||||||
</data>
|
|
||||||
<data name="panel_ActionButtons.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>0, 120</value>
|
|
||||||
</data>
|
|
||||||
<data name="panel_ActionButtons.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>300, 30</value>
|
|
||||||
</data>
|
|
||||||
<data name="panel_ActionButtons.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>2</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>panel_ActionButtons.Name" xml:space="preserve">
|
|
||||||
<value>panel_ActionButtons</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>panel_ActionButtons.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>panel_ActionButtons.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>panel_ActionButtons.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
|
||||||
<value>7, 15</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>300, 150</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>$this.Name" xml:space="preserve">
|
|
||||||
<value>FlyoutDialogBase</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>$this.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Pilz.UI.Telerik.Dialogs
|
|
||||||
{
|
|
||||||
public interface ILoadContent
|
|
||||||
{
|
|
||||||
void LoadContent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="UI.for.WinForms.AllControls.Net60" Version="2023.1.117" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -149,12 +149,6 @@ Public Class DisplayHelp
|
|||||||
|
|
||||||
If cornerSize = 0 Then
|
If cornerSize = 0 Then
|
||||||
path.AddRectangle(r)
|
path.AddRectangle(r)
|
||||||
Else
|
|
||||||
AddCornerArc(path, r, cornerSize, eCornerArc.TopLeft)
|
|
||||||
AddCornerArc(path, r, cornerSize, eCornerArc.TopRight)
|
|
||||||
AddCornerArc(path, r, cornerSize, eCornerArc.BottomRight)
|
|
||||||
AddCornerArc(path, r, cornerSize, eCornerArc.BottomLeft)
|
|
||||||
path.CloseAllFigures()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return path
|
Return path
|
||||||
@@ -166,67 +160,4 @@ Public Class DisplayHelp
|
|||||||
Return New LinearGradientBrush(New Rectangle(r.X, r.Y - 1, r.Width, r.Height + 1), color1, color2, gradientAngle)
|
Return New LinearGradientBrush(New Rectangle(r.X, r.Y - 1, r.Width, r.Height + 1), color1, color2, gradientAngle)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Sub AddCornerArc(ByVal path As GraphicsPath, ByVal bounds As Rectangle, ByVal cornerDiameter As Integer, ByVal corner As eCornerArc)
|
|
||||||
If cornerDiameter > 0 Then
|
|
||||||
Dim a As ArcData = GetCornerArc(bounds, cornerDiameter, corner)
|
|
||||||
path.AddArc(a.X, a.Y, a.Width, a.Height, a.StartAngle, a.SweepAngle)
|
|
||||||
Else
|
|
||||||
|
|
||||||
If corner = eCornerArc.TopLeft Then
|
|
||||||
path.AddLine(bounds.X, bounds.Y + 2, bounds.X, bounds.Y)
|
|
||||||
ElseIf corner = eCornerArc.BottomLeft Then
|
|
||||||
path.AddLine(bounds.X + 2, bounds.Bottom, bounds.X, bounds.Bottom)
|
|
||||||
ElseIf corner = eCornerArc.TopRight Then
|
|
||||||
path.AddLine(bounds.Right - 2, bounds.Y, bounds.Right, bounds.Y)
|
|
||||||
ElseIf corner = eCornerArc.BottomRight Then
|
|
||||||
path.AddLine(bounds.Right, bounds.Bottom - 2, bounds.Right, bounds.Bottom)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Shared Function GetCornerArc(ByVal bounds As Rectangle, ByVal cornerDiameter As Integer, ByVal corner As eCornerArc) As ArcData
|
|
||||||
Dim a As ArcData
|
|
||||||
If cornerDiameter = 0 Then cornerDiameter = 1
|
|
||||||
Dim diameter As Integer = cornerDiameter * 2
|
|
||||||
|
|
||||||
Select Case corner
|
|
||||||
Case eCornerArc.TopLeft
|
|
||||||
a = New ArcData(bounds.X, bounds.Y, diameter, diameter, 180, 90)
|
|
||||||
Case eCornerArc.TopRight
|
|
||||||
a = New ArcData(bounds.Right - diameter, bounds.Y, diameter, diameter, 270, 90)
|
|
||||||
Case eCornerArc.BottomLeft
|
|
||||||
a = New ArcData(bounds.X, bounds.Bottom - diameter, diameter, diameter, 90, 90)
|
|
||||||
Case Else
|
|
||||||
a = New ArcData(bounds.Right - diameter, bounds.Bottom - diameter, diameter, diameter, 0, 90)
|
|
||||||
End Select
|
|
||||||
|
|
||||||
Return a
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Enum eCornerArc
|
|
||||||
TopLeft
|
|
||||||
TopRight
|
|
||||||
BottomLeft
|
|
||||||
BottomRight
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
|
|
||||||
Friend Structure ArcData
|
|
||||||
Public X As Integer
|
|
||||||
Public Y As Integer
|
|
||||||
Public Width As Integer
|
|
||||||
Public Height As Integer
|
|
||||||
Public StartAngle As Single
|
|
||||||
Public SweepAngle As Single
|
|
||||||
|
|
||||||
Public Sub New(ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal startAngle As Single, ByVal sweepAngle As Single)
|
|
||||||
Me.X = x
|
|
||||||
Me.Y = y
|
|
||||||
Me.Width = width
|
|
||||||
Me.Height = height
|
|
||||||
Me.StartAngle = startAngle
|
|
||||||
Me.SweepAngle = sweepAngle
|
|
||||||
End Sub
|
|
||||||
End Structure
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -320,26 +320,24 @@ Public Class Highlighter
|
|||||||
Private Sub UpdateHighlightPanelBounds()
|
Private Sub UpdateHighlightPanelBounds()
|
||||||
Dim bounds As Rectangle = New Rectangle(0, 0, _ContainerControl.ClientRectangle.Width, _ContainerControl.ClientRectangle.Height)
|
Dim bounds As Rectangle = New Rectangle(0, 0, _ContainerControl.ClientRectangle.Width, _ContainerControl.ClientRectangle.Height)
|
||||||
|
|
||||||
If _HighlightPanel IsNot Nothing Then
|
If TypeOf _HighlightPanel.Parent Is Form Then
|
||||||
If TypeOf _HighlightPanel.Parent Is Form Then
|
Dim form As Form = TryCast(_HighlightPanel.Parent, Form)
|
||||||
Dim form As Form = TryCast(_HighlightPanel.Parent, Form)
|
|
||||||
|
|
||||||
If form.AutoSize Then
|
If form.AutoSize Then
|
||||||
bounds.X += form.Padding.Left
|
bounds.X += form.Padding.Left
|
||||||
bounds.Y += form.Padding.Top
|
bounds.Y += form.Padding.Top
|
||||||
bounds.Width -= form.Padding.Horizontal
|
bounds.Width -= form.Padding.Horizontal
|
||||||
bounds.Height -= form.Padding.Vertical
|
bounds.Height -= form.Padding.Vertical
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If _HighlightPanel.Bounds.Equals(bounds) Then
|
|
||||||
_HighlightPanel.UpdateRegion()
|
|
||||||
Else
|
|
||||||
_HighlightPanel.Bounds = bounds
|
|
||||||
End If
|
|
||||||
|
|
||||||
_HighlightPanel.BringToFront()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If _HighlightPanel.Bounds.Equals(bounds) Then
|
||||||
|
_HighlightPanel.UpdateRegion()
|
||||||
|
Else
|
||||||
|
_HighlightPanel.Bounds = bounds
|
||||||
|
End If
|
||||||
|
|
||||||
|
_HighlightPanel.BringToFront()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private _DelayTimer As Timer = Nothing
|
Private _DelayTimer As Timer = Nothing
|
||||||
@@ -388,6 +386,17 @@ Public Class Highlighter
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Function CanExtend(ByVal extendee As Object) As Boolean
|
||||||
|
Return (TypeOf extendee Is Control)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetError(ByVal control As Control, ByVal value As String)
|
||||||
|
Me.SetHighlightColor(control, eHighlightColor.Red)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ClearError(ByVal control As Control)
|
||||||
|
Me.SetHighlightColor(control, eHighlightColor.None)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Enum eHighlightColor
|
Public Enum eHighlightColor
|
||||||
|
|||||||
@@ -644,7 +644,7 @@ Public Class PaintingControl
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CheckMouseWheel(sender As Object, e As MouseEventArgs) Handles Me.MouseWheel
|
Private Sub CheckMouseWheel(sender As Object, e As MouseEventArgs) Handles Me.MouseWheel
|
||||||
If pressedAlt Then
|
If pressedControl Then
|
||||||
Dim val As Single = e.Delta / 120 / 10
|
Dim val As Single = e.Delta / 120 / 10
|
||||||
ZoomFactor = New SizeF(Math.Max(ZoomFactor.Width + val, 0.25), Math.Max(ZoomFactor.Height + val, 0.25))
|
ZoomFactor = New SizeF(Math.Max(ZoomFactor.Width + val, 0.25), Math.Max(ZoomFactor.Height + val, 0.25))
|
||||||
Refresh()
|
Refresh()
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net48</TargetFramework>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.UI.xml</DocumentationFile>
|
<DocumentationFile>Pilz.UI.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
@@ -37,17 +36,15 @@
|
|||||||
<RemoveIntegerChecks>true</RemoveIntegerChecks>
|
<RemoveIntegerChecks>true</RemoveIntegerChecks>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
@@ -61,7 +58,9 @@
|
|||||||
<Import Include="System.Threading.Tasks" />
|
<Import Include="System.Threading.Tasks" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="PaintingControl\PaintingControl.vb" />
|
<Compile Update="PaintingControl\PaintingControl.vb">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="My Project\Application.Designer.vb">
|
<Compile Update="My Project\Application.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Application.myapp</DependentUpon>
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
Imports System.Runtime.InteropServices
|
|
||||||
Imports System.Text
|
|
||||||
|
|
||||||
Namespace Native
|
|
||||||
|
|
||||||
Public Class Kernel32
|
|
||||||
|
|
||||||
Private Const LIB_KERNEL32 As String = "kernel32.dll"
|
|
||||||
|
|
||||||
<DllImport(LIB_KERNEL32)>
|
|
||||||
Public Shared Function GetModuleFileName(hModule As IntPtr, lpFilename As StringBuilder, nSize As Integer) As UInteger
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
End Namespace
|
|
||||||
@@ -4,13 +4,11 @@ Namespace Native
|
|||||||
|
|
||||||
Public Class User32
|
Public Class User32
|
||||||
|
|
||||||
Private Const LIB_USER32 As String = "user32.dll"
|
<DllImport("user32")>
|
||||||
|
|
||||||
<DllImport(LIB_USER32)>
|
|
||||||
Public Shared Function GetWindowRect(ByVal hWnd As IntPtr, ByRef r As RECT) As Boolean
|
Public Shared Function GetWindowRect(ByVal hWnd As IntPtr, ByRef r As RECT) As Boolean
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
<DllImport(LIB_USER32)>
|
<DllImport("user32.dll")>
|
||||||
Public Shared Function ChildWindowFromPointEx(ByVal hWndParent As IntPtr, ByVal pt As POINT, ByVal uFlags As UInteger) As IntPtr
|
Public Shared Function ChildWindowFromPointEx(ByVal hWndParent As IntPtr, ByVal pt As POINT, ByVal uFlags As UInteger) As IntPtr
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net48</TargetFramework>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Win32.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Win32.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
@@ -25,11 +24,6 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
|
|||||||
24
Pilz.sln
24
Pilz.sln
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 17.7.34018.315
|
VisualStudioVersion = 15.0.28307.329
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Pilz", "Pilz\Pilz.vbproj", "{277D2B83-7613-4C49-9CAB-E080195A6E0C}"
|
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Pilz", "Pilz\Pilz.vbproj", "{277D2B83-7613-4C49-9CAB-E080195A6E0C}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -31,10 +31,6 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Pilz.Networking", "Pilz.Net
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pilz.Cryptography", "Pilz.Cryptography\Pilz.Cryptography.csproj", "{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pilz.Cryptography", "Pilz.Cryptography\Pilz.Cryptography.csproj", "{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pilz.UI.Telerik.SymbolFactory", "Pilz.UI.Telerik.SymbolFactory\Pilz.UI.Telerik.SymbolFactory.csproj", "{2B3B8161-29FF-4526-9082-4410AB5144A5}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pilz.UI.Telerik", "Pilz.UI.Telerik\Pilz.UI.Telerik.csproj", "{DF674119-CC28-40AA-968F-1E23D184A491}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -155,22 +151,6 @@ Global
|
|||||||
{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}.Release|Any CPU.Build.0 = Release|Any CPU
|
{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}.Release|x86.ActiveCfg = Release|Any CPU
|
{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}.Release|x86.Build.0 = Release|Any CPU
|
{3F5988E6-439E-4A9D-B2C6-47EFFB161AC6}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{2B3B8161-29FF-4526-9082-4410AB5144A5}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{DF674119-CC28-40AA-968F-1E23D184A491}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<AssemblyTitle>Pilz</AssemblyTitle>
|
<AssemblyTitle>Pilz</AssemblyTitle>
|
||||||
<Company>Pilzinsel64</Company>
|
<Company>DRSN</Company>
|
||||||
<Product>Pilz</Product>
|
<Product>Pilz</Product>
|
||||||
<Copyright>Copyright © Pilzinsel64 2019 - 2020</Copyright>
|
<Copyright>Copyright © Pilzinsel64 2019 - 2020</Copyright>
|
||||||
<DocumentationFile>Pilz.xml</DocumentationFile>
|
<DocumentationFile>Pilz.xml</DocumentationFile>
|
||||||
@@ -30,9 +30,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
|
||||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
|
||||||
<Version>1.2023.914.856</Version>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="My Project\AssemblyInfo.vb" />
|
<Compile Remove="My Project\AssemblyInfo.vb" />
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ Namespace Runtime
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property RealOSType As OSType
|
Public ReadOnly Property RealOSType As OSType
|
||||||
Get
|
Get
|
||||||
Static t As OSType? = Nothing
|
Static t As OSType? = Nothing
|
||||||
|
|
||||||
If t Is Nothing Then
|
If t Is Nothing Then
|
||||||
|
|
||||||
@@ -69,13 +69,9 @@ Namespace Runtime
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Return t
|
Return t
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Function IsOSPlatform(os As OSType, checkRealOS As Boolean) As Boolean
|
End Module
|
||||||
Return If(checkRealOS, RealOSType, OSType) = os
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Module
|
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user