├── logo.png ├── preview.PNG ├── .gitattributes ├── WinLED ├── WinLED.ico ├── packages.config ├── HTTP.vb ├── My Project │ ├── Application.myapp │ ├── Settings.settings │ ├── AssemblyInfo.vb │ ├── Application.Designer.vb │ ├── Resources.Designer.vb │ ├── Settings.Designer.vb │ └── Resources.resx ├── App.config ├── frmWinLEDSettings.vb ├── Functions.vb ├── API.vb ├── frmWinLEDSettings.Designer.vb ├── frmWinLEDSettings.resx ├── WinLED.vbproj ├── frmMain.vb └── frmMain.Designer.vb ├── README.md ├── LICENSE ├── WinLED.sln └── .gitignore /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clusterzx/WinLED/HEAD/logo.png -------------------------------------------------------------------------------- /preview.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clusterzx/WinLED/HEAD/preview.PNG -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /WinLED/WinLED.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clusterzx/WinLED/HEAD/WinLED/WinLED.ico -------------------------------------------------------------------------------- /WinLED/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WinLED/HTTP.vb: -------------------------------------------------------------------------------- 1 | Imports System.Net.WebClient 2 | Public Class HTTP_API 3 | Public Function CallApi(ByVal query As String) As Boolean 4 | Dim wc As New Net.WebClient 5 | If wc.DownloadString(My.Settings.WLEDInstanceIP & "win&" + query) IsNot Nothing Then 6 | Clipboard.SetText(My.Settings.WLEDInstanceIP & "win&" + query) 7 | Return True 8 | End If 9 | End Function 10 | End Class 11 | -------------------------------------------------------------------------------- /WinLED/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | Form1 5 | false 6 | 0 7 | true 8 | 0 9 | 0 10 | true 11 | 12 | -------------------------------------------------------------------------------- /WinLED/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | False 10 | 11 | 12 | 0 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![Logo](/logo.png) 3 | # WinLED - WLED Client for Windows 4 | 5 | WinLED lets you control your WLED instance from your Desktop. There is no need to open your browser, get your iPhone or talk to Alexa. 6 | WinLED gives you the ability to change colors, presets you created, effects and color palettes. Even so it comes handy in place when 7 | your PC starts - just tell it what preset you want to play! 8 | 9 | Therefore it has a colorpicker wheel where you can change the color of your static light while moving the mouse. 10 | 11 | ## Demo 12 | 13 | ![Preview](/preview.PNG) 14 | 15 | ## Installation 16 | 17 | - [1] Just start the WinLED.exe or compile it yourself. 18 | - [2] Enter your WLED Instance address 19 | - [3] Profit! 20 | 21 | ## Thanks to 22 | 23 | - https://www.mechanikadesign.com/software/colorpicker-controls-for-windows-forms/ [ColorPicker Controls] 24 | - Newtonsoft.JSON 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 clusterzx 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /WinLED.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32630.194 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WinLED", "WinLED\WinLED.vbproj", "{E24445AF-FD00-438D-9BE6-049EADB1B4FF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E24445AF-FD00-438D-9BE6-049EADB1B4FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E24445AF-FD00-438D-9BE6-049EADB1B4FF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E24445AF-FD00-438D-9BE6-049EADB1B4FF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E24445AF-FD00-438D-9BE6-049EADB1B4FF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {A6EA2240-A084-4B0A-B695-19DDC01A0CB3} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WinLED/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | False 15 | 16 | 17 | False 18 | 19 | 20 | 0 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /WinLED/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' Allgemeine Informationen über eine Assembly werden über die folgenden 6 | ' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | ' die einer Assembly zugeordnet sind. 8 | 9 | ' Werte der Assemblyattribute überprüfen 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird. 21 | 22 | 23 | ' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 24 | ' 25 | ' Hauptversion 26 | ' Nebenversion 27 | ' Buildnummer 28 | ' Revision 29 | ' 30 | ' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, 31 | ' indem Sie "*" wie unten gezeigt eingeben: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /WinLED/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes, 18 | ' or if you encounter build errors in this file, go to the Project Designer 19 | ' (go to Project Properties or double-click the My Project node in 20 | ' Solution Explorer), and make changes on the Application tab. 21 | ' 22 | Partial Friend Class MyApplication 23 | 24 | _ 25 | Public Sub New() 26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) 27 | Me.IsSingleInstance = false 28 | Me.EnableVisualStyles = true 29 | Me.SaveMySettingsOnExit = true 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.WinLED.frmMain 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /WinLED/frmWinLEDSettings.vb: -------------------------------------------------------------------------------- 1 | Imports System.Reflection 2 | Imports Microsoft.Win32 3 | Imports WinLED.API 4 | 5 | Public Class frmWinLEDSettings 6 | Dim presets As List(Of API.Presets) 7 | Private Sub cmdSave_Click(sender As Object, e As EventArgs) Handles cmdSave.Click 8 | 9 | If chkAutoStartWindows.Checked = True Then 10 | My.Settings.Autostart = True 11 | Dim apppath As String = Assembly.GetExecutingAssembly().Location 12 | Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True) 13 | key.SetValue("WinLED", apppath) 14 | key.Close() 15 | Else 16 | My.Settings.Autostart = False 17 | Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True) 18 | key.DeleteValue("WinLED", False) 19 | key.Close() 20 | End If 21 | If chkPresetRunUp.Checked = True Then 22 | My.Settings.RunPreset = True 23 | My.Settings.PresetID = cmbPresets.SelectedIndex 24 | Else 25 | My.Settings.RunPreset = False 26 | My.Settings.PresetID = Nothing 27 | End If 28 | End Sub 29 | 30 | Private Sub frmWinLEDSettings_Load(sender As Object, e As EventArgs) Handles MyBase.Load 31 | chkAutoStartWindows.Checked = My.Settings.Autostart 32 | chkPresetRunUp.Checked = My.Settings.RunPreset 33 | End Sub 34 | 35 | Private Sub chkPresetRunUp_CheckedChanged(sender As Object, e As EventArgs) Handles chkPresetRunUp.CheckedChanged 36 | If chkPresetRunUp.Checked = True Then 37 | presets = API.GetPresets() 38 | For Each effect In presets 39 | cmbPresets.Items.Add(effect.ID) 40 | Next 41 | cmbPresets.Enabled = True 42 | Else 43 | cmbPresets.Enabled = False 44 | End If 45 | End Sub 46 | End Class -------------------------------------------------------------------------------- /WinLED/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My.Resources 16 | 17 | 'This class was auto-generated by the StronglyTypedResourceBuilder 18 | 'class via a tool like ResGen or Visual Studio. 19 | 'To add or remove a member, edit your .ResX file then rerun ResGen 20 | 'with the /str option, or rebuild your VS project. 21 | ''' 22 | ''' A strongly-typed resource class, for looking up localized strings, etc. 23 | ''' 24 | _ 28 | Friend Module Resources 29 | 30 | Private resourceMan As Global.System.Resources.ResourceManager 31 | 32 | Private resourceCulture As Global.System.Globalization.CultureInfo 33 | 34 | ''' 35 | ''' Returns the cached ResourceManager instance used by this class. 36 | ''' 37 | _ 38 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 39 | Get 40 | If Object.ReferenceEquals(resourceMan, Nothing) Then 41 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WinLED.Resources", GetType(Resources).Assembly) 42 | resourceMan = temp 43 | End If 44 | Return resourceMan 45 | End Get 46 | End Property 47 | 48 | ''' 49 | ''' Overrides the current thread's CurrentUICulture property for all 50 | ''' resource lookups using this strongly typed resource class. 51 | ''' 52 | _ 53 | Friend Property Culture() As Global.System.Globalization.CultureInfo 54 | Get 55 | Return resourceCulture 56 | End Get 57 | Set(ByVal value As Global.System.Globalization.CultureInfo) 58 | resourceCulture = value 59 | End Set 60 | End Property 61 | End Module 62 | End Namespace 63 | -------------------------------------------------------------------------------- /WinLED/Functions.vb: -------------------------------------------------------------------------------- 1 | Public Class Functions 2 | Public Structure RGB 3 | Private _r As Byte 4 | Private _g As Byte 5 | Private _b As Byte 6 | 7 | Public Sub New(r As Byte, g As Byte, b As Byte) 8 | Me._r = r 9 | Me._g = g 10 | Me._b = b 11 | End Sub 12 | 13 | Public Property R() As Byte 14 | Get 15 | Return Me._r 16 | End Get 17 | Set(value As Byte) 18 | Me._r = value 19 | End Set 20 | End Property 21 | 22 | Public Property G() As Byte 23 | Get 24 | Return Me._g 25 | End Get 26 | Set(value As Byte) 27 | Me._g = value 28 | End Set 29 | End Property 30 | 31 | Public Property B() As Byte 32 | Get 33 | Return Me._b 34 | End Get 35 | Set(value As Byte) 36 | Me._b = value 37 | End Set 38 | End Property 39 | 40 | Public Overloads Function Equals(rgb As RGB) As Boolean 41 | Return (Me.R = rgb.R) AndAlso (Me.G = rgb.G) AndAlso (Me.B = rgb.B) 42 | End Function 43 | End Structure 44 | 45 | Public Structure HSL 46 | Private _h As Integer 47 | Private _s As Single 48 | Private _l As Single 49 | 50 | Public Sub New(h As Integer, s As Single, l As Single) 51 | Me._h = h 52 | Me._s = s 53 | Me._l = l 54 | End Sub 55 | 56 | Public Property H() As Integer 57 | Get 58 | Return Me._h 59 | End Get 60 | Set(value As Integer) 61 | Me._h = value 62 | End Set 63 | End Property 64 | 65 | Public Property S() As Single 66 | Get 67 | Return Me._s 68 | End Get 69 | Set(value As Single) 70 | Me._s = value 71 | End Set 72 | End Property 73 | 74 | Public Property L() As Single 75 | Get 76 | Return Me._l 77 | End Get 78 | Set(value As Single) 79 | Me._l = value 80 | End Set 81 | End Property 82 | 83 | Public Overloads Function Equals(hsl As HSL) As Boolean 84 | Return (Me.H = hsl.H) AndAlso (Me.S = hsl.S) AndAlso (Me.L = hsl.L) 85 | End Function 86 | End Structure 87 | 88 | Public Shared Function HSLToRGB(hsl As HSL) As RGB 89 | Dim r As Byte = 0 90 | Dim g As Byte = 0 91 | Dim b As Byte = 0 92 | 93 | If hsl.S = 0 Then 94 | r = CByte(Math.Truncate(hsl.L * 255)) 95 | g = CByte(Math.Truncate(hsl.L * 255)) 96 | b = CByte(Math.Truncate(hsl.L * 255)) 97 | Else 98 | Dim v1 As Single, v2 As Single 99 | Dim hue As Single = CSng(hsl.H) / 360 100 | 101 | v2 = If((hsl.L < 0.5), (hsl.L * (1 + hsl.S)), ((hsl.L + hsl.S) - (hsl.L * hsl.S))) 102 | v1 = 2 * hsl.L - v2 103 | 104 | r = CByte(Math.Truncate(255 * HueToRGB(v1, v2, hue + (1.0F / 3)))) 105 | g = CByte(Math.Truncate(255 * HueToRGB(v1, v2, hue))) 106 | b = CByte(Math.Truncate(255 * HueToRGB(v1, v2, hue - (1.0F / 3)))) 107 | End If 108 | 109 | Return New RGB(r, g, b) 110 | End Function 111 | 112 | Private Shared Function HueToRGB(v1 As Single, v2 As Single, vH As Single) As Single 113 | If vH < 0 Then 114 | vH += 1 115 | End If 116 | 117 | If vH > 1 Then 118 | vH -= 1 119 | End If 120 | 121 | If (6 * vH) < 1 Then 122 | Return (v1 + (v2 - v1) * 6 * vH) 123 | End If 124 | 125 | If (2 * vH) < 1 Then 126 | Return v2 127 | End If 128 | 129 | If (3 * vH) < 2 Then 130 | Return (v1 + (v2 - v1) * ((2.0F / 3) - vH) * 6) 131 | End If 132 | 133 | Return v1 134 | End Function 135 | End Class -------------------------------------------------------------------------------- /WinLED/API.vb: -------------------------------------------------------------------------------- 1 | Imports System.IO 2 | Imports System.Net 3 | Imports System.Text 4 | Imports System.Web.Script.Serialization 5 | Imports Newtonsoft.Json 6 | Imports Newtonsoft.Json.Linq 7 | Public Class API 8 | Public Structure Presets 9 | Public Property ID As Integer 10 | Public Property Name As String 11 | End Structure 12 | 13 | Public Class Root 14 | Public Property state As State 15 | Public Property info As Info 16 | Public Property effects As List(Of String) 17 | Public Property palettes As List(Of String) 18 | End Class 19 | 20 | Public Class State 21 | Public Property [On] As Boolean 22 | ' Other properties omitted for brevity 23 | End Class 24 | 25 | Public Class Info 26 | Public Property ver As String 27 | ' Other properties omitted for brevity 28 | End Class 29 | 30 | Public Shared Function GetPresets() As List(Of Presets) 31 | Dim jsonLoader As New JsonSerializer 32 | Dim webRequest As New WebClient 33 | Dim jsonString As String = webRequest.DownloadString(My.Settings.WLEDInstanceIP & "presets.json") 34 | ' parse the JSON string into a JObject 35 | Dim jsonObject As JObject = JObject.Parse(jsonString) 36 | Dim presetList As New List(Of Presets) 37 | Dim counter As Integer = 0 ' counter variable 38 | For Each prop As JProperty In jsonObject.Properties 39 | counter += 1 ' increment the counter 40 | If counter = 1 Then ' skip the first object 41 | Continue For 42 | End If 43 | ' get the value of the property, which should be a JObject 44 | Dim item As JObject = prop.Value 45 | ' check if the "n" value is not empty 46 | If Not String.IsNullOrEmpty(item("n").Value(Of String)) Then 47 | ' extract the "n" value from the JObject 48 | Dim name As String = item("n").Value(Of String) 49 | Dim id As Integer = Convert.ToInt32(prop.Name) 50 | Dim newPreset As New Presets With { 51 | .ID = id, 52 | .Name = name 53 | } 54 | presetList.Add(newPreset) 55 | End If 56 | Next 57 | Return presetList 58 | End Function 59 | Public Shared Function GetEffects() As List(Of String) 60 | Try 61 | Restart: 62 | Dim jsonLoader As New JsonSerializer 63 | Dim webRequest As New WebClient 64 | Dim jsonString As String = webRequest.DownloadString(My.Settings.WLEDInstanceIP & "json") 65 | Dim root As Root = JsonConvert.DeserializeObject(Of Root)(jsonString) 66 | Dim effects As List(Of String) = root.effects 67 | Return effects 68 | Catch ex As Exception 69 | GoTo Restart 70 | End Try 71 | End Function 72 | 73 | Public Shared Function GetPalettes() As List(Of String) 74 | Try 75 | Restart: 76 | Dim jsonLoader As New JsonSerializer 77 | Dim webRequest As New WebClient 78 | Dim jsonString As String = webRequest.DownloadString(My.Settings.WLEDInstanceIP & "json") 79 | Dim root As Root = JsonConvert.DeserializeObject(Of Root)(jsonString) 80 | Dim palettes As List(Of String) = root.palettes 81 | Return palettes 82 | Catch ex As Exception 83 | GoTo Restart 84 | End Try 85 | End Function 86 | End Class 87 | -------------------------------------------------------------------------------- /WinLED/frmWinLEDSettings.Designer.vb: -------------------------------------------------------------------------------- 1 | _ 2 | Partial Class frmWinLEDSettings 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Wird vom Windows Form-Designer benötigt. 18 | Private components As System.ComponentModel.IContainer 19 | 20 | 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. 21 | 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. 22 | 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. 23 | _ 24 | Private Sub InitializeComponent() 25 | Me.GroupBox1 = New System.Windows.Forms.GroupBox() 26 | Me.chkAutoStartWindows = New System.Windows.Forms.CheckBox() 27 | Me.chkPresetRunUp = New System.Windows.Forms.CheckBox() 28 | Me.cmbPresets = New System.Windows.Forms.ComboBox() 29 | Me.cmdSave = New System.Windows.Forms.Button() 30 | Me.GroupBox1.SuspendLayout() 31 | Me.SuspendLayout() 32 | ' 33 | 'GroupBox1 34 | ' 35 | Me.GroupBox1.Controls.Add(Me.cmdSave) 36 | Me.GroupBox1.Controls.Add(Me.cmbPresets) 37 | Me.GroupBox1.Controls.Add(Me.chkPresetRunUp) 38 | Me.GroupBox1.Controls.Add(Me.chkAutoStartWindows) 39 | Me.GroupBox1.Location = New System.Drawing.Point(12, 12) 40 | Me.GroupBox1.Name = "GroupBox1" 41 | Me.GroupBox1.Size = New System.Drawing.Size(371, 94) 42 | Me.GroupBox1.TabIndex = 0 43 | Me.GroupBox1.TabStop = False 44 | Me.GroupBox1.Text = "Settings" 45 | ' 46 | 'chkAutoStartWindows 47 | ' 48 | Me.chkAutoStartWindows.AutoSize = True 49 | Me.chkAutoStartWindows.Location = New System.Drawing.Point(6, 19) 50 | Me.chkAutoStartWindows.Name = "chkAutoStartWindows" 51 | Me.chkAutoStartWindows.Size = New System.Drawing.Size(166, 17) 52 | Me.chkAutoStartWindows.TabIndex = 0 53 | Me.chkAutoStartWindows.Text = "Start WinLED with Windows?" 54 | Me.chkAutoStartWindows.UseVisualStyleBackColor = True 55 | ' 56 | 'chkPresetRunUp 57 | ' 58 | Me.chkPresetRunUp.AutoSize = True 59 | Me.chkPresetRunUp.Location = New System.Drawing.Point(6, 42) 60 | Me.chkPresetRunUp.Name = "chkPresetRunUp" 61 | Me.chkPresetRunUp.Size = New System.Drawing.Size(145, 17) 62 | Me.chkPresetRunUp.TabIndex = 1 63 | Me.chkPresetRunUp.Text = "Apply Preset on StartUp?" 64 | Me.chkPresetRunUp.UseVisualStyleBackColor = True 65 | ' 66 | 'cmbPresets 67 | ' 68 | Me.cmbPresets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 69 | Me.cmbPresets.Enabled = False 70 | Me.cmbPresets.FormattingEnabled = True 71 | Me.cmbPresets.Location = New System.Drawing.Point(157, 38) 72 | Me.cmbPresets.Name = "cmbPresets" 73 | Me.cmbPresets.Size = New System.Drawing.Size(208, 21) 74 | Me.cmbPresets.TabIndex = 2 75 | ' 76 | 'cmdSave 77 | ' 78 | Me.cmdSave.Location = New System.Drawing.Point(6, 65) 79 | Me.cmdSave.Name = "cmdSave" 80 | Me.cmdSave.Size = New System.Drawing.Size(359, 23) 81 | Me.cmdSave.TabIndex = 3 82 | Me.cmdSave.Text = "Save Settings" 83 | Me.cmdSave.UseVisualStyleBackColor = True 84 | ' 85 | 'frmWinLEDSettings 86 | ' 87 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 88 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 89 | Me.ClientSize = New System.Drawing.Size(395, 109) 90 | Me.Controls.Add(Me.GroupBox1) 91 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow 92 | Me.Name = "frmWinLEDSettings" 93 | Me.Text = "WinLED - Settings" 94 | Me.GroupBox1.ResumeLayout(False) 95 | Me.GroupBox1.PerformLayout() 96 | Me.ResumeLayout(False) 97 | 98 | End Sub 99 | 100 | Friend WithEvents GroupBox1 As GroupBox 101 | Friend WithEvents cmdSave As Button 102 | Friend WithEvents cmbPresets As ComboBox 103 | Friend WithEvents chkPresetRunUp As CheckBox 104 | Friend WithEvents chkAutoStartWindows As CheckBox 105 | End Class 106 | -------------------------------------------------------------------------------- /WinLED/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' Dieser Code wurde von einem Tool generiert. 4 | ' Laufzeitversion:4.0.30319.42000 5 | ' 6 | ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | ' der Code erneut generiert wird. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) 24 | 25 | #Region "Automatische My.Settings-Speicherfunktion" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | 57 | _ 60 | Public Property Autostart() As Boolean 61 | Get 62 | Return CType(Me("Autostart"),Boolean) 63 | End Get 64 | Set 65 | Me("Autostart") = value 66 | End Set 67 | End Property 68 | 69 | _ 72 | Public Property RunPreset() As Boolean 73 | Get 74 | Return CType(Me("RunPreset"),Boolean) 75 | End Get 76 | Set 77 | Me("RunPreset") = value 78 | End Set 79 | End Property 80 | 81 | _ 84 | Public Property PresetID() As Byte 85 | Get 86 | Return CType(Me("PresetID"),Byte) 87 | End Get 88 | Set 89 | Me("PresetID") = value 90 | End Set 91 | End Property 92 | 93 | _ 96 | Public Property WLEDInstanceIP() As String 97 | Get 98 | Return CType(Me("WLEDInstanceIP"),String) 99 | End Get 100 | Set 101 | Me("WLEDInstanceIP") = value 102 | End Set 103 | End Property 104 | End Class 105 | End Namespace 106 | 107 | Namespace My 108 | 109 | _ 112 | Friend Module MySettingsProperty 113 | 114 | _ 115 | Friend ReadOnly Property Settings() As Global.WinLED.My.MySettings 116 | Get 117 | Return Global.WinLED.My.MySettings.Default 118 | End Get 119 | End Property 120 | End Module 121 | End Namespace 122 | -------------------------------------------------------------------------------- /WinLED/My Project/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /WinLED/frmWinLEDSettings.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /WinLED/WinLED.vbproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E24445AF-FD00-438D-9BE6-049EADB1B4FF} 8 | WinExe 9 | WinLED.My.MyApplication 10 | WinLED 11 | WinLED 12 | 512 13 | WindowsForms 14 | v4.8 15 | true 16 | true 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | true 23 | true 24 | bin\Debug\ 25 | WinLED.xml 26 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | false 32 | true 33 | true 34 | bin\Release\ 35 | WinLED.xml 36 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 37 | 38 | 39 | On 40 | 41 | 42 | Binary 43 | 44 | 45 | Off 46 | 47 | 48 | On 49 | 50 | 51 | WinLED.ico 52 | 53 | 54 | 55 | ..\..\..\..\Downloads\colorpicker-1.0.0\ColorPickerLibrary\ColorWheel\bin\Debug\ColorWheel.dll 56 | 57 | 58 | ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | Form 89 | 90 | 91 | frmMain.vb 92 | Form 93 | 94 | 95 | frmWinLEDSettings.vb 96 | 97 | 98 | Form 99 | 100 | 101 | 102 | 103 | 104 | True 105 | Application.myapp 106 | 107 | 108 | True 109 | True 110 | Resources.resx 111 | 112 | 113 | True 114 | Settings.settings 115 | True 116 | 117 | 118 | 119 | 120 | frmMain.vb 121 | 122 | 123 | frmWinLEDSettings.vb 124 | 125 | 126 | VbMyResourcesResXFileCodeGenerator 127 | Resources.Designer.vb 128 | My.Resources 129 | Designer 130 | 131 | 132 | 133 | 134 | MyApplicationCodeGenerator 135 | Application.Designer.vb 136 | 137 | 138 | SettingsSingleFileGenerator 139 | My 140 | Settings.Designer.vb 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /WinLED/frmMain.vb: -------------------------------------------------------------------------------- 1 | Imports System.IO 2 | Imports System.Net 3 | Imports System.Text 4 | Imports System.Web.Script.Serialization 5 | Imports Newtonsoft.Json 6 | Imports Newtonsoft.Json.Linq 7 | Imports MechanikaDesign.WinForms.UI.ColorPicker 8 | Imports WinLED.Functions.HSL 9 | Imports WinLED.Functions.RGB 10 | Imports WinLED.HTTP_API 11 | Imports System.Net.Http 12 | Imports System.Text.RegularExpressions 13 | 14 | Public Class frmMain 15 | Dim presets As List(Of API.Presets) 16 | Dim webCall As New HTTP_API 17 | Dim wledInstance As String = My.Settings.WLEDInstanceIP 18 | Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load 19 | If wledInstance = "" Then 20 | MsgBox("Please Setup your Instance", vbExclamation, "Warning") 21 | Dim answer = InputBox("For ex. http://192.168.0.54/ or http://wledinstance.local/", "Enter address to your WLED Instance") 22 | My.Settings.WLEDInstanceIP = answer 23 | wledInstance = answer 24 | MsgBox("WinLED is now set up. Please restart the application now. It will automatically terminate after you click ok", MsgBoxStyle.OkOnly, "NOICE!") 25 | Application.Exit() 26 | Else 27 | If My.Settings.RunPreset = True And My.Settings.PresetID > 0 Then 28 | webCall.CallApi("PL=" & My.Settings.PresetID + 1) 29 | End If 30 | cmbEffects.Items.AddRange(API.GetEffects().ToArray) 31 | cmbPalettes.Items.AddRange(API.GetPalettes().ToArray) 32 | presets = API.GetPresets 33 | Dim parentMenuItem As New ToolStripMenuItem("Presets") 34 | Dim counter As Integer = 0 35 | For Each effect In presets 36 | lbPresets.Items.Add(effect.Name) 37 | counter += 1 38 | Dim menuItem As New ToolStripMenuItem(counter & "-" & effect.Name) 39 | parentMenuItem.DropDownItems.Add(menuItem) 40 | AddHandler menuItem.Click, AddressOf MenuItem_Click 41 | Next 42 | ' Add the parent menu item (the drop-down menu) to the ContextMenuStrip 43 | ContextMenuStrip1.Items.Add(parentMenuItem) 44 | End If 45 | End Sub 46 | Private Sub MenuItem_Click(sender As Object, e As EventArgs) 47 | Dim clickedItem As ToolStripMenuItem = CType(sender, ToolStripMenuItem) 48 | ' Get the name of the clicked MenuItem 49 | Dim name As String = clickedItem.Text 50 | Dim id As Integer = GetNumberBeforeHyphen(name) 51 | webCall.CallApi("PL=" & id) 52 | End Sub 53 | Public Function GetNumberBeforeHyphen(input As String) As Integer 54 | Dim pattern As String = "^\d+-" 55 | Dim match As Match = Regex.Match(input, pattern) 56 | If match.Success Then 57 | Dim number As String = match.Value.TrimEnd("-"c) 58 | Return Int32.Parse(number) 59 | Else 60 | Return 0 61 | End If 62 | End Function 63 | 64 | Private Sub ColorWheel1_ColorChangedAsync(sender As Object, e As EventArgs) Handles ColorWheel1.ColorChanged 65 | If ColorWheel1.Color.R And ColorWheel1.Color.G And ColorWheel1.Color.B = 127 Then 66 | Dim tempColor As Color 67 | lblColorCodeRGB.Text = "RGB Code: 255-255-255" 68 | tempColor = ColorWheel1.Color 69 | pbColorWheelPreview.BackColor = Color.White 70 | Dim c As Color = Color.White 71 | webCall.CallApi("CL=255255255&FX=0") 72 | Else 73 | Dim tempColor As Color 74 | lblColorCodeRGB.Text = "RGB Code: " & ColorWheel1.Color.R & "-" & ColorWheel1.Color.G & "-" & ColorWheel1.Color.B 75 | tempColor = ColorWheel1.Color 76 | pbColorWheelPreview.BackColor = tempColor 77 | Dim c As Color = tempColor 78 | webCall.CallApi("R=" + ColorWheel1.Color.R.ToString + "&G=" + ColorWheel1.Color.G.ToString + "&B=" + ColorWheel1.Color.B.ToString + "&W=" + ColorWheel1.Color.A.ToString + "&FX=0") 79 | End If 80 | End Sub 81 | 82 | Private Sub tbBrightness_Scroll(sender As Object, e As EventArgs) Handles tbBrightness.Scroll 83 | lblBrightness.Text = "Brightness: " + tbBrightness.Value.ToString 84 | webCall.CallApi("A=" + tbBrightness.Value.ToString) 85 | End Sub 86 | 87 | Private Sub cmdOnOffToggle_Click(sender As Object, e As EventArgs) Handles cmdOnOffToggle.Click 88 | If webCall.CallApi("T=2") = False Then 89 | MsgBox("Error") 90 | End If 91 | End Sub 92 | 93 | Private Sub lbPresets_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lbPresets.SelectedIndexChanged 94 | Try 95 | For i As Integer = 0 To presets.Count - 1 96 | If presets(i).Name = lbPresets.SelectedItem.ToString Then 97 | If webCall.CallApi("PL=" & i + 1) = False Then 98 | MsgBox("Error") 99 | End If 100 | Exit For 101 | End If 102 | Next 103 | Catch ex As Exception 104 | 105 | End Try 106 | End Sub 107 | 108 | Private Sub cmbEffects_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbEffects.SelectedIndexChanged 109 | If webCall.CallApi("FX=" + cmbEffects.SelectedIndex.ToString) = False Then 110 | MsgBox("Error") 111 | End If 112 | End Sub 113 | 114 | Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click 115 | Application.Exit() 116 | End Sub 117 | 118 | Private Sub OptionsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OptionsToolStripMenuItem.Click 119 | frmWinLEDSettings.Show() 120 | End Sub 121 | 122 | Private Sub WLEDConfigToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles WLEDConfigToolStripMenuItem.Click 123 | If My.Settings.WLEDInstanceIP = "" Then 124 | Dim answer = InputBox("For ex. http://192.168.0.54/ or http://wledinstance.local/", "Enter address to your WLED Instance") 125 | If answer IsNot "" Or answer.Length > 5 Then 126 | My.Settings.WLEDInstanceIP = answer 127 | MsgBox("WinLED is now set up. Please restart the application now. It will automatically terminate after you click ok", MsgBoxStyle.OkOnly, "NOICE!") 128 | Application.Exit() 129 | End If 130 | Else 131 | Dim answer = MsgBox("Following WLED Instance is registered: " + My.Settings.WLEDInstanceIP + vbNewLine + "Would you like to reset it?", MsgBoxStyle.YesNo) 132 | If answer = MsgBoxResult.Yes Then 133 | My.Settings.WLEDInstanceIP = "" 134 | Dim answerx = InputBox("For ex. http://192.168.0.54/ or http://wledinstance.local/", "Enter address to your WLED Instance") 135 | If answerx IsNot "" Or answerx.Length > 5 Then 136 | My.Settings.WLEDInstanceIP = answerx 137 | MsgBox("WinLED is now set up. Please restart the application now. It will automatically terminate after you click ok", MsgBoxStyle.OkOnly, "NOICE!") 138 | Application.Exit() 139 | End If 140 | Else 141 | MsgBox("Ok :) ... you are still good to go.", vbInformation, "KEK") 142 | End If 143 | End If 144 | End Sub 145 | 146 | Private Sub notifyBar_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles notifyBar.MouseDoubleClick 147 | Me.Visible = True 148 | Me.WindowState = FormWindowState.Normal 149 | End Sub 150 | 151 | Private Sub frmMain_Resize(sender As Object, e As EventArgs) Handles Me.Resize 152 | If Me.WindowState = FormWindowState.Minimized Then 153 | Me.ShowInTaskbar = True 154 | Me.Visible = False 155 | End If 156 | End Sub 157 | End Class 158 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml 399 | -------------------------------------------------------------------------------- /WinLED/frmMain.Designer.vb: -------------------------------------------------------------------------------- 1 | 2 | Partial Class frmMain 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. 6 | 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Wird vom Windows Form-Designer benötigt. 18 | Private components As System.ComponentModel.IContainer 19 | 20 | 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. 21 | 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. 22 | 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. 23 | 24 | Private Sub InitializeComponent() 25 | Me.components = New System.ComponentModel.Container() 26 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain)) 27 | Me.GroupBox1 = New System.Windows.Forms.GroupBox() 28 | Me.lbPresets = New System.Windows.Forms.ListBox() 29 | Me.GroupBox2 = New System.Windows.Forms.GroupBox() 30 | Me.lblBrightness = New System.Windows.Forms.Label() 31 | Me.tbBrightness = New System.Windows.Forms.TrackBar() 32 | Me.GroupBox3 = New System.Windows.Forms.GroupBox() 33 | Me.Label2 = New System.Windows.Forms.Label() 34 | Me.cmbPalettes = New System.Windows.Forms.ComboBox() 35 | Me.Label1 = New System.Windows.Forms.Label() 36 | Me.cmbEffects = New System.Windows.Forms.ComboBox() 37 | Me.cmdOnOffToggle = New System.Windows.Forms.Button() 38 | Me.ColorWheel1 = New MechanikaDesign.WinForms.UI.ColorPicker.ColorWheel() 39 | Me.GroupBox4 = New System.Windows.Forms.GroupBox() 40 | Me.pbColorWheelPreview = New System.Windows.Forms.PictureBox() 41 | Me.lblColorCodeRGB = New System.Windows.Forms.Label() 42 | Me.MenuStrip1 = New System.Windows.Forms.MenuStrip() 43 | Me.SettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() 44 | Me.WLEDConfigToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() 45 | Me.OptionsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() 46 | Me.ExitToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() 47 | Me.notifyBar = New System.Windows.Forms.NotifyIcon(Me.components) 48 | Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) 49 | Me.GroupBox1.SuspendLayout() 50 | Me.GroupBox2.SuspendLayout() 51 | CType(Me.tbBrightness, System.ComponentModel.ISupportInitialize).BeginInit() 52 | Me.GroupBox3.SuspendLayout() 53 | Me.GroupBox4.SuspendLayout() 54 | CType(Me.pbColorWheelPreview, System.ComponentModel.ISupportInitialize).BeginInit() 55 | Me.MenuStrip1.SuspendLayout() 56 | Me.SuspendLayout() 57 | ' 58 | 'GroupBox1 59 | ' 60 | Me.GroupBox1.Controls.Add(Me.lbPresets) 61 | Me.GroupBox1.Location = New System.Drawing.Point(12, 100) 62 | Me.GroupBox1.Name = "GroupBox1" 63 | Me.GroupBox1.Size = New System.Drawing.Size(257, 149) 64 | Me.GroupBox1.TabIndex = 0 65 | Me.GroupBox1.TabStop = False 66 | Me.GroupBox1.Text = "Presets" 67 | ' 68 | 'lbPresets 69 | ' 70 | Me.lbPresets.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle 71 | Me.lbPresets.FormattingEnabled = True 72 | Me.lbPresets.Location = New System.Drawing.Point(6, 19) 73 | Me.lbPresets.Name = "lbPresets" 74 | Me.lbPresets.Size = New System.Drawing.Size(245, 119) 75 | Me.lbPresets.TabIndex = 0 76 | ' 77 | 'GroupBox2 78 | ' 79 | Me.GroupBox2.Controls.Add(Me.lblBrightness) 80 | Me.GroupBox2.Controls.Add(Me.tbBrightness) 81 | Me.GroupBox2.Location = New System.Drawing.Point(12, 30) 82 | Me.GroupBox2.Name = "GroupBox2" 83 | Me.GroupBox2.Size = New System.Drawing.Size(459, 64) 84 | Me.GroupBox2.TabIndex = 1 85 | Me.GroupBox2.TabStop = False 86 | Me.GroupBox2.Text = "Brightness" 87 | ' 88 | 'lblBrightness 89 | ' 90 | Me.lblBrightness.AutoSize = True 91 | Me.lblBrightness.Location = New System.Drawing.Point(6, 45) 92 | Me.lblBrightness.Name = "lblBrightness" 93 | Me.lblBrightness.Size = New System.Drawing.Size(62, 13) 94 | Me.lblBrightness.TabIndex = 1 95 | Me.lblBrightness.Text = "Brightness: " 96 | ' 97 | 'tbBrightness 98 | ' 99 | Me.tbBrightness.Location = New System.Drawing.Point(6, 14) 100 | Me.tbBrightness.Maximum = 255 101 | Me.tbBrightness.Name = "tbBrightness" 102 | Me.tbBrightness.Size = New System.Drawing.Size(447, 45) 103 | Me.tbBrightness.TabIndex = 0 104 | Me.tbBrightness.TickStyle = System.Windows.Forms.TickStyle.None 105 | Me.tbBrightness.Value = 255 106 | ' 107 | 'GroupBox3 108 | ' 109 | Me.GroupBox3.Controls.Add(Me.Label2) 110 | Me.GroupBox3.Controls.Add(Me.cmbPalettes) 111 | Me.GroupBox3.Controls.Add(Me.Label1) 112 | Me.GroupBox3.Controls.Add(Me.cmbEffects) 113 | Me.GroupBox3.Controls.Add(Me.cmdOnOffToggle) 114 | Me.GroupBox3.Location = New System.Drawing.Point(275, 100) 115 | Me.GroupBox3.Name = "GroupBox3" 116 | Me.GroupBox3.Size = New System.Drawing.Size(196, 386) 117 | Me.GroupBox3.TabIndex = 2 118 | Me.GroupBox3.TabStop = False 119 | Me.GroupBox3.Text = "Quick Commands" 120 | ' 121 | 'Label2 122 | ' 123 | Me.Label2.AutoSize = True 124 | Me.Label2.Location = New System.Drawing.Point(6, 104) 125 | Me.Label2.Name = "Label2" 126 | Me.Label2.Size = New System.Drawing.Size(72, 13) 127 | Me.Label2.TabIndex = 2 128 | Me.Label2.Text = "Color Palettes" 129 | ' 130 | 'cmbPalettes 131 | ' 132 | Me.cmbPalettes.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 133 | Me.cmbPalettes.FormattingEnabled = True 134 | Me.cmbPalettes.Location = New System.Drawing.Point(6, 120) 135 | Me.cmbPalettes.Name = "cmbPalettes" 136 | Me.cmbPalettes.Size = New System.Drawing.Size(184, 21) 137 | Me.cmbPalettes.TabIndex = 1 138 | ' 139 | 'Label1 140 | ' 141 | Me.Label1.AutoSize = True 142 | Me.Label1.Location = New System.Drawing.Point(6, 55) 143 | Me.Label1.Name = "Label1" 144 | Me.Label1.Size = New System.Drawing.Size(40, 13) 145 | Me.Label1.TabIndex = 2 146 | Me.Label1.Text = "Effects" 147 | ' 148 | 'cmbEffects 149 | ' 150 | Me.cmbEffects.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 151 | Me.cmbEffects.FormattingEnabled = True 152 | Me.cmbEffects.Location = New System.Drawing.Point(6, 71) 153 | Me.cmbEffects.Name = "cmbEffects" 154 | Me.cmbEffects.Size = New System.Drawing.Size(184, 21) 155 | Me.cmbEffects.TabIndex = 1 156 | ' 157 | 'cmdOnOffToggle 158 | ' 159 | Me.cmdOnOffToggle.Location = New System.Drawing.Point(6, 19) 160 | Me.cmdOnOffToggle.Name = "cmdOnOffToggle" 161 | Me.cmdOnOffToggle.Size = New System.Drawing.Size(184, 26) 162 | Me.cmdOnOffToggle.TabIndex = 0 163 | Me.cmdOnOffToggle.Text = "On/Off" 164 | Me.cmdOnOffToggle.UseVisualStyleBackColor = True 165 | ' 166 | 'ColorWheel1 167 | ' 168 | Me.ColorWheel1.Color = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer)) 169 | Me.ColorWheel1.Location = New System.Drawing.Point(6, 19) 170 | Me.ColorWheel1.Name = "ColorWheel1" 171 | Me.ColorWheel1.Size = New System.Drawing.Size(251, 173) 172 | Me.ColorWheel1.TabIndex = 3 173 | Me.ColorWheel1.Text = "ColorWheel1" 174 | ' 175 | 'GroupBox4 176 | ' 177 | Me.GroupBox4.Controls.Add(Me.pbColorWheelPreview) 178 | Me.GroupBox4.Controls.Add(Me.lblColorCodeRGB) 179 | Me.GroupBox4.Controls.Add(Me.ColorWheel1) 180 | Me.GroupBox4.Location = New System.Drawing.Point(12, 255) 181 | Me.GroupBox4.Name = "GroupBox4" 182 | Me.GroupBox4.Size = New System.Drawing.Size(257, 231) 183 | Me.GroupBox4.TabIndex = 4 184 | Me.GroupBox4.TabStop = False 185 | Me.GroupBox4.Text = "Color Wheel for static Colors" 186 | ' 187 | 'pbColorWheelPreview 188 | ' 189 | Me.pbColorWheelPreview.Location = New System.Drawing.Point(195, 179) 190 | Me.pbColorWheelPreview.Name = "pbColorWheelPreview" 191 | Me.pbColorWheelPreview.Size = New System.Drawing.Size(56, 46) 192 | Me.pbColorWheelPreview.TabIndex = 5 193 | Me.pbColorWheelPreview.TabStop = False 194 | ' 195 | 'lblColorCodeRGB 196 | ' 197 | Me.lblColorCodeRGB.AutoSize = True 198 | Me.lblColorCodeRGB.Location = New System.Drawing.Point(6, 206) 199 | Me.lblColorCodeRGB.Name = "lblColorCodeRGB" 200 | Me.lblColorCodeRGB.Size = New System.Drawing.Size(62, 13) 201 | Me.lblColorCodeRGB.TabIndex = 4 202 | Me.lblColorCodeRGB.Text = "Color Code:" 203 | ' 204 | 'MenuStrip1 205 | ' 206 | Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.SettingsToolStripMenuItem}) 207 | Me.MenuStrip1.Location = New System.Drawing.Point(0, 0) 208 | Me.MenuStrip1.Name = "MenuStrip1" 209 | Me.MenuStrip1.Size = New System.Drawing.Size(483, 24) 210 | Me.MenuStrip1.TabIndex = 5 211 | Me.MenuStrip1.Text = "MenuStrip1" 212 | ' 213 | 'SettingsToolStripMenuItem 214 | ' 215 | Me.SettingsToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.WLEDConfigToolStripMenuItem, Me.OptionsToolStripMenuItem, Me.ExitToolStripMenuItem}) 216 | Me.SettingsToolStripMenuItem.Name = "SettingsToolStripMenuItem" 217 | Me.SettingsToolStripMenuItem.Size = New System.Drawing.Size(61, 20) 218 | Me.SettingsToolStripMenuItem.Text = "Settings" 219 | ' 220 | 'WLEDConfigToolStripMenuItem 221 | ' 222 | Me.WLEDConfigToolStripMenuItem.Name = "WLEDConfigToolStripMenuItem" 223 | Me.WLEDConfigToolStripMenuItem.Size = New System.Drawing.Size(160, 22) 224 | Me.WLEDConfigToolStripMenuItem.Text = "WLED Config" 225 | ' 226 | 'OptionsToolStripMenuItem 227 | ' 228 | Me.OptionsToolStripMenuItem.Name = "OptionsToolStripMenuItem" 229 | Me.OptionsToolStripMenuItem.Size = New System.Drawing.Size(160, 22) 230 | Me.OptionsToolStripMenuItem.Text = "WinLED Options" 231 | ' 232 | 'ExitToolStripMenuItem 233 | ' 234 | Me.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem" 235 | Me.ExitToolStripMenuItem.Size = New System.Drawing.Size(160, 22) 236 | Me.ExitToolStripMenuItem.Text = "Exit" 237 | ' 238 | 'notifyBar 239 | ' 240 | Me.notifyBar.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info 241 | Me.notifyBar.BalloonTipText = "...WinLED is not gone :)" 242 | Me.notifyBar.BalloonTipTitle = "Hey..." 243 | Me.notifyBar.ContextMenuStrip = Me.ContextMenuStrip1 244 | Me.notifyBar.Icon = CType(resources.GetObject("notifyBar.Icon"), System.Drawing.Icon) 245 | Me.notifyBar.Text = "WinLED Running" 246 | Me.notifyBar.Visible = True 247 | ' 248 | 'ContextMenuStrip1 249 | ' 250 | Me.ContextMenuStrip1.Name = "ContextMenuStrip1" 251 | Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4) 252 | ' 253 | 'frmMain 254 | ' 255 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 256 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 257 | Me.ClientSize = New System.Drawing.Size(483, 495) 258 | Me.Controls.Add(Me.GroupBox4) 259 | Me.Controls.Add(Me.GroupBox3) 260 | Me.Controls.Add(Me.GroupBox2) 261 | Me.Controls.Add(Me.GroupBox1) 262 | Me.Controls.Add(Me.MenuStrip1) 263 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle 264 | Me.MainMenuStrip = Me.MenuStrip1 265 | Me.MaximizeBox = False 266 | Me.Name = "frmMain" 267 | Me.Text = "WinLED 0.1b" 268 | Me.GroupBox1.ResumeLayout(False) 269 | Me.GroupBox2.ResumeLayout(False) 270 | Me.GroupBox2.PerformLayout() 271 | CType(Me.tbBrightness, System.ComponentModel.ISupportInitialize).EndInit() 272 | Me.GroupBox3.ResumeLayout(False) 273 | Me.GroupBox3.PerformLayout() 274 | Me.GroupBox4.ResumeLayout(False) 275 | Me.GroupBox4.PerformLayout() 276 | CType(Me.pbColorWheelPreview, System.ComponentModel.ISupportInitialize).EndInit() 277 | Me.MenuStrip1.ResumeLayout(False) 278 | Me.MenuStrip1.PerformLayout() 279 | Me.ResumeLayout(False) 280 | Me.PerformLayout() 281 | 282 | End Sub 283 | 284 | Friend WithEvents GroupBox1 As GroupBox 285 | Friend WithEvents lbPresets As ListBox 286 | Friend WithEvents GroupBox2 As GroupBox 287 | Friend WithEvents tbBrightness As TrackBar 288 | Friend WithEvents GroupBox3 As GroupBox 289 | Friend WithEvents cmdOnOffToggle As Button 290 | Friend WithEvents ColorWheel1 As MechanikaDesign.WinForms.UI.ColorPicker.ColorWheel 291 | Friend WithEvents GroupBox4 As GroupBox 292 | Friend WithEvents pbColorWheelPreview As PictureBox 293 | Friend WithEvents lblColorCodeRGB As Label 294 | Friend WithEvents Label2 As Label 295 | Friend WithEvents cmbPalettes As ComboBox 296 | Friend WithEvents Label1 As Label 297 | Friend WithEvents cmbEffects As ComboBox 298 | Friend WithEvents lblBrightness As Label 299 | Friend WithEvents MenuStrip1 As MenuStrip 300 | Friend WithEvents SettingsToolStripMenuItem As ToolStripMenuItem 301 | Friend WithEvents WLEDConfigToolStripMenuItem As ToolStripMenuItem 302 | Friend WithEvents OptionsToolStripMenuItem As ToolStripMenuItem 303 | Friend WithEvents ExitToolStripMenuItem As ToolStripMenuItem 304 | Friend WithEvents notifyBar As NotifyIcon 305 | Friend WithEvents ContextMenuStrip1 As ContextMenuStrip 306 | End Class 307 | --------------------------------------------------------------------------------