install: begin rework
This commit is contained in:
@@ -24,10 +24,10 @@ Public Class UpdateConfigExt
|
|||||||
' client.Snippets.Update(update)
|
' client.Snippets.Update(update)
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
Public Shared Function LoadFromSnippet(url As String) As UpdateConfig
|
Public Shared Function LoadFromSnippet(url As String) As ModpackConfig
|
||||||
Dim client As New HttpClient
|
Dim client As New HttpClient
|
||||||
Dim result = client.GetStringAsync(url).Result
|
Dim result = client.GetStringAsync(url).Result
|
||||||
Return JsonConvert.DeserializeObject(Of UpdateConfig)(result)
|
Return JsonConvert.DeserializeObject(Of ModpackConfig)(result)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ Public Class UpdateInstaller
|
|||||||
Public Event InstallProgessUpdated(result As UpdateCheckResult, processedSyncs As Integer)
|
Public Event InstallProgessUpdated(result As UpdateCheckResult, processedSyncs As Integer)
|
||||||
Public Event CheckingProgressUpdated(toCheck As Integer, processed As Integer)
|
Public Event CheckingProgressUpdated(toCheck As Integer, processed As Integer)
|
||||||
|
|
||||||
Private ReadOnly updateConfig As UpdateConfig
|
Private ReadOnly updateConfig As ModpackConfig
|
||||||
Private ReadOnly localPath As String
|
Private ReadOnly localPath As String
|
||||||
Private webdavClient As WebDavClient = Nothing
|
Private webdavClient As WebDavClient = Nothing
|
||||||
Private httpClient As New HttpClient
|
Private httpClient As New HttpClient
|
||||||
|
|
||||||
Public Sub New(updateConfig As UpdateConfig, localPath As String)
|
Public Sub New(updateConfig As ModpackConfig, localPath As String)
|
||||||
Me.updateConfig = updateConfig
|
Me.updateConfig = updateConfig
|
||||||
Me.localPath = localPath
|
Me.localPath = localPath
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
9
ModpackUpdater.Model/InstallAction.vb
Normal file
9
ModpackUpdater.Model/InstallAction.vb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Imports Newtonsoft.Json.Converters
|
||||||
|
|
||||||
|
Public Class InstallAction
|
||||||
|
|
||||||
|
Public Property DestPath As String
|
||||||
|
Public Property DownloadUrl As String
|
||||||
|
Public Property IsZip As Boolean
|
||||||
|
|
||||||
|
End Class
|
||||||
11
ModpackUpdater.Model/InstallInfos.vb
Normal file
11
ModpackUpdater.Model/InstallInfos.vb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
|
Public Class InstallInfos
|
||||||
|
|
||||||
|
Public ReadOnly Property Actions As New List(Of InstallAction)
|
||||||
|
|
||||||
|
Public Shared Function Parse(content As String) As InstallInfos
|
||||||
|
Return JsonConvert.DeserializeObject(Of InstallInfos)(content)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
15
ModpackUpdater.Model/ModpackConfig.vb
Normal file
15
ModpackUpdater.Model/ModpackConfig.vb
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Imports System.Net.Http
|
||||||
|
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
|
Public Class ModpackConfig
|
||||||
|
|
||||||
|
Public Property UpdateUrl As String
|
||||||
|
Public Property InstallUrl As String
|
||||||
|
|
||||||
|
Public Shared Function LoadFromUrl(url As String)
|
||||||
|
Dim result As String = New HttpClient().GetStringAsync(url).Result
|
||||||
|
Return JsonConvert.DeserializeObject(Of ModpackConfig)(result)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
|
|
||||||
Imports Newtonsoft.Json
|
|
||||||
|
|
||||||
Imports Pilz.Cryptography
|
|
||||||
|
|
||||||
Public Class UpdateConfig
|
|
||||||
|
|
||||||
Public Property UpdateUrl As String
|
|
||||||
Public Property WebdavURL As SecureString
|
|
||||||
Public Property WebdavUsername As SecureString
|
|
||||||
Public Property WebdavPassword As SecureString
|
|
||||||
|
|
||||||
Public Sub SaveToFile(filePath As String)
|
|
||||||
File.WriteAllText(filePath, JsonConvert.SerializeObject(Me))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Shared Function LoadFromFile(filePath As String) As UpdateConfig
|
|
||||||
Return JsonConvert.DeserializeObject(Of UpdateConfig)(File.ReadAllText(filePath))
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -9,8 +9,6 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "ModpackUpdater.Model", "Mod
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "ModpackUpdater.Manager", "ModpackUpdater.Manager\ModpackUpdater.Manager.vbproj", "{618DAFD6-3336-4621-82F9-EA5C783D2D2E}"
|
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "ModpackUpdater.Manager", "ModpackUpdater.Manager\ModpackUpdater.Manager.vbproj", "{618DAFD6-3336-4621-82F9-EA5C783D2D2E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ModpackUpdater.GitLab", "ModpackUpdater.GitLab\ModpackUpdater.GitLab.vbproj", "{65D44991-EB3B-4AC4-9166-3E8D0BADD402}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -29,10 +27,6 @@ Global
|
|||||||
{618DAFD6-3336-4621-82F9-EA5C783D2D2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{618DAFD6-3336-4621-82F9-EA5C783D2D2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{618DAFD6-3336-4621-82F9-EA5C783D2D2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{618DAFD6-3336-4621-82F9-EA5C783D2D2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{618DAFD6-3336-4621-82F9-EA5C783D2D2E}.Release|Any CPU.Build.0 = Release|Any CPU
|
{618DAFD6-3336-4621-82F9-EA5C783D2D2E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{65D44991-EB3B-4AC4-9166-3E8D0BADD402}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{65D44991-EB3B-4AC4-9166-3E8D0BADD402}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{65D44991-EB3B-4AC4-9166-3E8D0BADD402}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{65D44991-EB3B-4AC4-9166-3E8D0BADD402}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
33
ModpackUpdater/Form1.Designer.vb
generated
33
ModpackUpdater/Form1.Designer.vb
generated
@@ -34,9 +34,9 @@ Partial Class Form1
|
|||||||
RadButton_Install = New Telerik.WinControls.UI.RadButton()
|
RadButton_Install = New Telerik.WinControls.UI.RadButton()
|
||||||
RadButton_CheckForUpdates = New Telerik.WinControls.UI.RadButton()
|
RadButton_CheckForUpdates = New Telerik.WinControls.UI.RadButton()
|
||||||
RadButton_EditModpackConfig = New Telerik.WinControls.UI.RadButton()
|
RadButton_EditModpackConfig = New Telerik.WinControls.UI.RadButton()
|
||||||
|
RadButton_PasteModpackConfig = New Telerik.WinControls.UI.RadButton()
|
||||||
RadButton_SearchModpackConfig = New Telerik.WinControls.UI.RadButton()
|
RadButton_SearchModpackConfig = New Telerik.WinControls.UI.RadButton()
|
||||||
RadButton_SearchMinecraftProfileFolder = New Telerik.WinControls.UI.RadButton()
|
RadButton_SearchMinecraftProfileFolder = New Telerik.WinControls.UI.RadButton()
|
||||||
RadButton_PasteModpackConfig = New Telerik.WinControls.UI.RadButton()
|
|
||||||
CType(RadLabel1, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadLabel1, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(RadLabel2, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadLabel2, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(RadLabel3, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadLabel3, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
@@ -47,9 +47,9 @@ Partial Class Form1
|
|||||||
CType(RadButton_Install, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadButton_Install, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(RadButton_CheckForUpdates, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadButton_CheckForUpdates, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(RadButton_EditModpackConfig, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadButton_EditModpackConfig, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(RadButton_PasteModpackConfig, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(RadButton_SearchModpackConfig, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadButton_SearchModpackConfig, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(RadButton_SearchMinecraftProfileFolder, ComponentModel.ISupportInitialize).BeginInit()
|
CType(RadButton_SearchMinecraftProfileFolder, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(RadButton_PasteModpackConfig, ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me, ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me, ComponentModel.ISupportInitialize).BeginInit()
|
||||||
SuspendLayout()
|
SuspendLayout()
|
||||||
'
|
'
|
||||||
@@ -167,6 +167,20 @@ Partial Class Form1
|
|||||||
RadButton_EditModpackConfig.Text = "Edit modpack config"
|
RadButton_EditModpackConfig.Text = "Edit modpack config"
|
||||||
RadButton_EditModpackConfig.TextAlignment = ContentAlignment.MiddleLeft
|
RadButton_EditModpackConfig.TextAlignment = ContentAlignment.MiddleLeft
|
||||||
RadButton_EditModpackConfig.TextImageRelation = TextImageRelation.ImageBeforeText
|
RadButton_EditModpackConfig.TextImageRelation = TextImageRelation.ImageBeforeText
|
||||||
|
RadButton_EditModpackConfig.Visible = False
|
||||||
|
'
|
||||||
|
' RadButton_PasteModpackConfig
|
||||||
|
'
|
||||||
|
RadButton_PasteModpackConfig.Anchor = AnchorStyles.Top Or AnchorStyles.Right
|
||||||
|
RadButton_PasteModpackConfig.Image = CType(resources.GetObject("RadButton_PasteModpackConfig.Image"), Image)
|
||||||
|
RadButton_PasteModpackConfig.ImageAlignment = ContentAlignment.MiddleRight
|
||||||
|
RadButton_PasteModpackConfig.Location = New Point(231, 89)
|
||||||
|
RadButton_PasteModpackConfig.Name = "RadButton_PasteModpackConfig"
|
||||||
|
RadButton_PasteModpackConfig.Size = New Size(90, 24)
|
||||||
|
RadButton_PasteModpackConfig.TabIndex = 7
|
||||||
|
RadButton_PasteModpackConfig.Text = "Paste"
|
||||||
|
RadButton_PasteModpackConfig.TextAlignment = ContentAlignment.MiddleLeft
|
||||||
|
RadButton_PasteModpackConfig.TextImageRelation = TextImageRelation.ImageBeforeText
|
||||||
'
|
'
|
||||||
' RadButton_SearchModpackConfig
|
' RadButton_SearchModpackConfig
|
||||||
'
|
'
|
||||||
@@ -194,19 +208,6 @@ Partial Class Form1
|
|||||||
RadButton_SearchMinecraftProfileFolder.TextAlignment = ContentAlignment.MiddleLeft
|
RadButton_SearchMinecraftProfileFolder.TextAlignment = ContentAlignment.MiddleLeft
|
||||||
RadButton_SearchMinecraftProfileFolder.TextImageRelation = TextImageRelation.ImageBeforeText
|
RadButton_SearchMinecraftProfileFolder.TextImageRelation = TextImageRelation.ImageBeforeText
|
||||||
'
|
'
|
||||||
' RadButton_PasteModpackConfig
|
|
||||||
'
|
|
||||||
RadButton_PasteModpackConfig.Anchor = AnchorStyles.Top Or AnchorStyles.Right
|
|
||||||
RadButton_PasteModpackConfig.Image = CType(resources.GetObject("RadButton_PasteModpackConfig.Image"), Image)
|
|
||||||
RadButton_PasteModpackConfig.ImageAlignment = ContentAlignment.MiddleRight
|
|
||||||
RadButton_PasteModpackConfig.Location = New Point(231, 89)
|
|
||||||
RadButton_PasteModpackConfig.Name = "RadButton_PasteModpackConfig"
|
|
||||||
RadButton_PasteModpackConfig.Size = New Size(90, 24)
|
|
||||||
RadButton_PasteModpackConfig.TabIndex = 7
|
|
||||||
RadButton_PasteModpackConfig.Text = "Paste"
|
|
||||||
RadButton_PasteModpackConfig.TextAlignment = ContentAlignment.MiddleLeft
|
|
||||||
RadButton_PasteModpackConfig.TextImageRelation = TextImageRelation.ImageBeforeText
|
|
||||||
'
|
|
||||||
' Form1
|
' Form1
|
||||||
'
|
'
|
||||||
AutoScaleBaseSize = New Size(7, 15)
|
AutoScaleBaseSize = New Size(7, 15)
|
||||||
@@ -230,9 +231,9 @@ Partial Class Form1
|
|||||||
CType(RadButton_Install, ComponentModel.ISupportInitialize).EndInit()
|
CType(RadButton_Install, ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(RadButton_CheckForUpdates, ComponentModel.ISupportInitialize).EndInit()
|
CType(RadButton_CheckForUpdates, ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(RadButton_EditModpackConfig, ComponentModel.ISupportInitialize).EndInit()
|
CType(RadButton_EditModpackConfig, ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(RadButton_PasteModpackConfig, ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(RadButton_SearchModpackConfig, ComponentModel.ISupportInitialize).EndInit()
|
CType(RadButton_SearchModpackConfig, ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(RadButton_SearchMinecraftProfileFolder, ComponentModel.ISupportInitialize).EndInit()
|
CType(RadButton_SearchMinecraftProfileFolder, ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(RadButton_PasteModpackConfig, ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me, ComponentModel.ISupportInitialize).EndInit()
|
CType(Me, ComponentModel.ISupportInitialize).EndInit()
|
||||||
ResumeLayout(False)
|
ResumeLayout(False)
|
||||||
|
|
||||||
|
|||||||
@@ -120,12 +120,12 @@
|
|||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="RadButton_PasteModpackConfig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="RadButton_PasteModpackConfig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAO9JREFUOE9j
|
||||||
YQUAAADvSURBVDhPY8AFJixbowfCUC5pYNLidfoTlqxbBcJ9SzboQoXxA9eolHlA/BOo6T8I9y5a87Jv
|
wAUmLFujB8JQLmlg0uJ1+hOWrFsFwn1LNuhChfED16iUeUD8E6jpPwj3Llrzsm/hmlcwPkgOiOdAlWMC
|
||||||
4ZpXMD5IDojnQJVjAqDk3x8/f/2fu247WAMynrt+x3+QHFDNH6hyTACU/E8IgNRAlWMCZAM+//z3/9bb
|
oOTfHz9//Z+7bjtYAzKeu37Hf5AcUM0fqHJMAJT8TwiA1ECVYwJkAz7//Pf/1tu/GDiuftr/CSd/hoIw
|
||||||
vxg4rn7a/wknf4aCMFQbAiAbAFI84dRPvBiqDQFoYoDDpPsYOHrpC+INyFj3BgXDbKefARR7AV0zzHas
|
VBsCIBsAUjzh1E+8GKoNAWhigMOk+xg4eukL4g3IWPcGBcNsp58BFHsBXTPMdqwGuESlfNp9+Nj/gydO
|
||||||
BrhEpXzaffjY/4MnTv/feOIWimJsGKoNAVwiU4Ndo1NWukalrkrrWnoMmyZkDNWGHUw68cti4smfq/Fh
|
/9944haKYmwYqg0BXCJTg12jU1a6RqWuSutaegybJmQM1YYdTDrxy2LiyZ+r8WGISgYGAOT2/8PrpxzK
|
||||||
iEoGBgDk9v/D66ccygAAAABJRU5ErkJggg==
|
AAAAAElFTkSuQmCC
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RadButton_SearchModpackConfig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="RadButton_SearchModpackConfig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Imports Telerik.WinControls.UI
|
|||||||
|
|
||||||
Public Class Form1
|
Public Class Form1
|
||||||
|
|
||||||
Private updateConfig As New UpdateConfig
|
Private updateConfig As New ModpackConfig
|
||||||
Private currentUpdating As Boolean = False
|
Private currentUpdating As Boolean = False
|
||||||
Private lastUpdateCheckResult As UpdateCheckResult = Nothing
|
Private lastUpdateCheckResult As UpdateCheckResult = Nothing
|
||||||
|
|
||||||
@@ -74,11 +74,7 @@ Public Class Form1
|
|||||||
RadTextBoxControl_ModpackConfig.Text = filePath
|
RadTextBoxControl_ModpackConfig.Text = filePath
|
||||||
Try
|
Try
|
||||||
If IsUpdateConfigLoaded() Then
|
If IsUpdateConfigLoaded() Then
|
||||||
If filePath.StartsWith("http") Then
|
updateConfig = ModpackConfig.LoadFromUrl(filePath)
|
||||||
updateConfig = UpdateConfigExt.LoadFromSnippet(filePath)
|
|
||||||
Else
|
|
||||||
updateConfig = UpdateConfig.LoadFromFile(filePath)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
RadTextBoxControl_ModpackConfig.Text = String.Empty
|
RadTextBoxControl_ModpackConfig.Text = String.Empty
|
||||||
@@ -169,11 +165,6 @@ Public Class Form1
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ButtonX_EditUpdateConfig_Click(sender As Object, e As EventArgs) Handles RadButton_EditModpackConfig.Click
|
|
||||||
Dim frm As New FormSettings(updateConfig)
|
|
||||||
frm.ShowDialog(Me)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Async Sub ButtonX_CheckForUpdates_Click(sender As Object, e As EventArgs) Handles RadButton_CheckForUpdates.Click
|
Private Async Sub ButtonX_CheckForUpdates_Click(sender As Object, e As EventArgs) Handles RadButton_CheckForUpdates.Click
|
||||||
ClearStatus()
|
ClearStatus()
|
||||||
If CheckStatus() Then
|
If CheckStatus() Then
|
||||||
|
|||||||
154
ModpackUpdater/FormSettings.Designer.vb
generated
154
ModpackUpdater/FormSettings.Designer.vb
generated
@@ -1,154 +0,0 @@
|
|||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
|
||||||
Partial Class FormSettings
|
|
||||||
Inherits Telerik.WinControls.UI.RadForm
|
|
||||||
|
|
||||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
|
||||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
|
||||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
|
||||||
Try
|
|
||||||
If disposing AndAlso components IsNot Nothing Then
|
|
||||||
components.Dispose()
|
|
||||||
End If
|
|
||||||
Finally
|
|
||||||
MyBase.Dispose(disposing)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Wird vom Windows Form-Designer benötigt.
|
|
||||||
Private components As System.ComponentModel.IContainer
|
|
||||||
|
|
||||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
|
||||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
|
||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
|
||||||
Private Sub InitializeComponent()
|
|
||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FormSettings))
|
|
||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
|
||||||
Me.RadTextBoxControl_WebdavPassword = New Telerik.WinControls.UI.RadTextBoxControl()
|
|
||||||
Me.RadTextBoxControl_WebdavUsername = New Telerik.WinControls.UI.RadTextBoxControl()
|
|
||||||
Me.RadTextBoxControl_WebdavURL = New Telerik.WinControls.UI.RadTextBoxControl()
|
|
||||||
Me.RadButton_SaveAndClose = New Telerik.WinControls.UI.RadButton()
|
|
||||||
Me.RadButton_SaveAs = New Telerik.WinControls.UI.RadButton()
|
|
||||||
Me.RadLabel3 = New Telerik.WinControls.UI.RadLabel()
|
|
||||||
Me.RadLabel2 = New Telerik.WinControls.UI.RadLabel()
|
|
||||||
Me.RadLabel1 = New Telerik.WinControls.UI.RadLabel()
|
|
||||||
Me.RadTextBoxControl_UpdateUrl = New Telerik.WinControls.UI.RadTextBoxControl()
|
|
||||||
Me.RadLabel4 = New Telerik.WinControls.UI.RadLabel()
|
|
||||||
Me.Panel1.SuspendLayout()
|
|
||||||
CType(Me.RadTextBoxControl_WebdavPassword, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadTextBoxControl_WebdavUsername, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadTextBoxControl_WebdavURL, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadButton_SaveAndClose, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadButton_SaveAs, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadLabel3, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadLabel2, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadTextBoxControl_UpdateUrl, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.RadLabel4, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.SuspendLayout()
|
|
||||||
'
|
|
||||||
'Panel1
|
|
||||||
'
|
|
||||||
Me.Panel1.BackColor = System.Drawing.Color.Transparent
|
|
||||||
Me.Panel1.Controls.Add(Me.RadTextBoxControl_UpdateUrl)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadLabel4)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadTextBoxControl_WebdavPassword)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadTextBoxControl_WebdavUsername)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadTextBoxControl_WebdavURL)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadButton_SaveAndClose)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadButton_SaveAs)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadLabel3)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadLabel2)
|
|
||||||
Me.Panel1.Controls.Add(Me.RadLabel1)
|
|
||||||
resources.ApplyResources(Me.Panel1, "Panel1")
|
|
||||||
Me.Panel1.Name = "Panel1"
|
|
||||||
'
|
|
||||||
'RadTextBoxControl_WebdavPassword
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadTextBoxControl_WebdavPassword, "RadTextBoxControl_WebdavPassword")
|
|
||||||
Me.RadTextBoxControl_WebdavPassword.Name = "RadTextBoxControl_WebdavPassword"
|
|
||||||
'
|
|
||||||
'RadTextBoxControl_WebdavUsername
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadTextBoxControl_WebdavUsername, "RadTextBoxControl_WebdavUsername")
|
|
||||||
Me.RadTextBoxControl_WebdavUsername.Name = "RadTextBoxControl_WebdavUsername"
|
|
||||||
'
|
|
||||||
'RadTextBoxControl_WebdavURL
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadTextBoxControl_WebdavURL, "RadTextBoxControl_WebdavURL")
|
|
||||||
Me.RadTextBoxControl_WebdavURL.Name = "RadTextBoxControl_WebdavURL"
|
|
||||||
'
|
|
||||||
'RadButton_SaveAndClose
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadButton_SaveAndClose, "RadButton_SaveAndClose")
|
|
||||||
Me.RadButton_SaveAndClose.Image = Global.ModpackUpdater.My.Resources.MySymbols.icons8_save_16px
|
|
||||||
Me.RadButton_SaveAndClose.Name = "RadButton_SaveAndClose"
|
|
||||||
'
|
|
||||||
'RadButton_SaveAs
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadButton_SaveAs, "RadButton_SaveAs")
|
|
||||||
Me.RadButton_SaveAs.Image = Global.ModpackUpdater.My.Resources.MySymbols.icons8_opened_folder_16px
|
|
||||||
Me.RadButton_SaveAs.Name = "RadButton_SaveAs"
|
|
||||||
'
|
|
||||||
'RadLabel3
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadLabel3, "RadLabel3")
|
|
||||||
Me.RadLabel3.Name = "RadLabel3"
|
|
||||||
'
|
|
||||||
'RadLabel2
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadLabel2, "RadLabel2")
|
|
||||||
Me.RadLabel2.Name = "RadLabel2"
|
|
||||||
'
|
|
||||||
'RadLabel1
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadLabel1, "RadLabel1")
|
|
||||||
Me.RadLabel1.Name = "RadLabel1"
|
|
||||||
'
|
|
||||||
'RadTextBoxControl_UpdateUrl
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadTextBoxControl_UpdateUrl, "RadTextBoxControl_UpdateUrl")
|
|
||||||
Me.RadTextBoxControl_UpdateUrl.Name = "RadTextBoxControl_UpdateUrl"
|
|
||||||
'
|
|
||||||
'RadLabel4
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.RadLabel4, "RadLabel4")
|
|
||||||
Me.RadLabel4.Name = "RadLabel4"
|
|
||||||
'
|
|
||||||
'FormSettings
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me, "$this")
|
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
|
||||||
Me.Controls.Add(Me.Panel1)
|
|
||||||
Me.MaximizeBox = False
|
|
||||||
Me.Name = "FormSettings"
|
|
||||||
Me.Panel1.ResumeLayout(False)
|
|
||||||
Me.Panel1.PerformLayout()
|
|
||||||
CType(Me.RadTextBoxControl_WebdavPassword, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadTextBoxControl_WebdavUsername, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadTextBoxControl_WebdavURL, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadButton_SaveAndClose, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadButton_SaveAs, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadLabel3, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadLabel2, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadTextBoxControl_UpdateUrl, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.RadLabel4, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.ResumeLayout(False)
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend WithEvents Panel1 As Panel
|
|
||||||
Friend WithEvents RadLabel1 As Telerik.WinControls.UI.RadLabel
|
|
||||||
Friend WithEvents RadTextBoxControl_WebdavPassword As Telerik.WinControls.UI.RadTextBoxControl
|
|
||||||
Friend WithEvents RadTextBoxControl_WebdavUsername As Telerik.WinControls.UI.RadTextBoxControl
|
|
||||||
Friend WithEvents RadTextBoxControl_WebdavURL As Telerik.WinControls.UI.RadTextBoxControl
|
|
||||||
Friend WithEvents RadButton_SaveAndClose As Telerik.WinControls.UI.RadButton
|
|
||||||
Friend WithEvents RadButton_SaveAs As Telerik.WinControls.UI.RadButton
|
|
||||||
Friend WithEvents RadLabel3 As Telerik.WinControls.UI.RadLabel
|
|
||||||
Friend WithEvents RadLabel2 As Telerik.WinControls.UI.RadLabel
|
|
||||||
Friend WithEvents RadTextBoxControl_UpdateUrl As Telerik.WinControls.UI.RadTextBoxControl
|
|
||||||
Friend WithEvents RadLabel4 As Telerik.WinControls.UI.RadLabel
|
|
||||||
End Class
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
|||||||
Imports ModpackUpdater.Model
|
|
||||||
Imports ModpackUpdater.My.Resources
|
|
||||||
|
|
||||||
Imports Telerik.WinControls.UI
|
|
||||||
|
|
||||||
Public Class FormSettings
|
|
||||||
|
|
||||||
Private ReadOnly updateConfig As UpdateConfig
|
|
||||||
|
|
||||||
Public Sub New(updateConfig As UpdateConfig)
|
|
||||||
InitializeComponent()
|
|
||||||
Me.updateConfig = updateConfig
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub LoadConfig()
|
|
||||||
RadTextBoxControl_WebdavURL.Text = updateConfig.WebdavURL
|
|
||||||
RadTextBoxControl_WebdavUsername.Text = updateConfig.WebdavUsername
|
|
||||||
RadTextBoxControl_WebdavPassword.Text = updateConfig.WebdavPassword
|
|
||||||
RadTextBoxControl_UpdateUrl.Text = updateConfig.UpdateUrl
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SaveConfig()
|
|
||||||
updateConfig.WebdavURL = RadTextBoxControl_WebdavURL.Text.Trim
|
|
||||||
updateConfig.WebdavUsername = RadTextBoxControl_WebdavUsername.Text.Trim
|
|
||||||
updateConfig.WebdavPassword = RadTextBoxControl_WebdavPassword.Text
|
|
||||||
updateConfig.UpdateUrl = RadTextBoxControl_UpdateUrl.Text
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ButtonX_SaveAs_Click(sender As Object, e As EventArgs) Handles RadButton_SaveAs.Click
|
|
||||||
Dim ofd As New RadSaveFileDialog
|
|
||||||
ofd.Filter = FiledialogFilters.JSON_Display & "|" & FiledialogFilters.JSON_Filter
|
|
||||||
|
|
||||||
If ofd.ShowDialog(Me) = DialogResult.OK Then
|
|
||||||
updateConfig.SaveToFile(ofd.FileName)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ButtonX_SaveAndClose_Click(sender As Object, e As EventArgs) Handles RadButton_SaveAndClose.Click
|
|
||||||
SaveConfig()
|
|
||||||
Close()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub FormSettings_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
||||||
LoadConfig()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -78,7 +78,6 @@
|
|||||||
<PackageReference Include="UI.for.WinForms.Common" Version="2024.2.514" />
|
<PackageReference Include="UI.for.WinForms.Common" Version="2024.2.514" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\ModpackUpdater.GitLab\ModpackUpdater.GitLab.vbproj" />
|
|
||||||
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.vbproj" />
|
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.vbproj" />
|
||||||
<ProjectReference Include="..\ModpackUpdater.Model\ModpackUpdater.Model.vbproj" />
|
<ProjectReference Include="..\ModpackUpdater.Model\ModpackUpdater.Model.vbproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user