From 50dd7540ea0ac1c300b9704a683aa11f99774dae Mon Sep 17 00:00:00 2001 From: gabrielpatzleiner Date: Sun, 28 Sep 2014 11:01:23 +0200 Subject: [PATCH] Translated the whole Application to English closes #49 - thanks to @ep9869 closes #77 --- McMetroLauncher-Manager/MainWindow.xaml.vb | 5 +- .../McMetroLauncher-Manager.vbproj | 13 +- MinecraftLauncher/Application.xaml | 2 +- .../Extensions/Converters/Converters.vb | 2 +- .../Converters/NullToBooleanConverter.vb | 17 + MinecraftLauncher/McMetroLauncher.vbproj | 8 +- MinecraftLauncher/Models/Language.vb | 3 +- MinecraftLauncher/Models/Settings.vb | 4 +- .../ViewModels/ForgeInstallerViewModel.vb | 30 ++ .../LiteLoaderInstallerViewModel.vb | 30 ++ MinecraftLauncher/ViewModels/MainViewModel.vb | 8 +- .../ViewModels/UpdaterViewModel.vb | 30 ++ .../Windows/Forge_ProfileEditor.xaml | 10 +- .../Windows/Forge_ProfileEditor.xaml.vb | 2 +- .../Windows/Forge_installer.xaml | 38 +- .../Windows/Forge_installer.xaml.vb | 28 +- .../Windows/LiteLoader_installer.xaml | 33 +- .../Windows/LiteLoader_installer.xaml.vb | 30 +- MinecraftLauncher/Windows/Login.xaml | 28 +- MinecraftLauncher/Windows/MainWindow.xaml | 379 +++++++++--------- MinecraftLauncher/Windows/MainWindow.xaml.vb | 158 ++++---- MinecraftLauncher/Windows/ProfileEditor.xaml | 87 +++- .../Windows/ProfileEditor.xaml.vb | 32 +- MinecraftLauncher/Windows/ServerEditor.xaml | 10 +- MinecraftLauncher/Windows/SplashScreen.xaml | 12 +- .../Windows/SplashScreen.xaml.vb | 32 +- .../Windows/SubmitException.xaml | 2 +- MinecraftLauncher/Windows/Updater.xaml | 21 +- MinecraftLauncher/Windows/Updater.xaml.vb | 10 +- .../resources/languages/mcml.de-de.xaml | 224 ++++++++++- .../resources/languages/mcml.en-us.xaml | 226 ++++++++++- 31 files changed, 1060 insertions(+), 454 deletions(-) create mode 100644 MinecraftLauncher/Extensions/Converters/NullToBooleanConverter.vb create mode 100644 MinecraftLauncher/ViewModels/ForgeInstallerViewModel.vb create mode 100644 MinecraftLauncher/ViewModels/LiteLoaderInstallerViewModel.vb create mode 100644 MinecraftLauncher/ViewModels/UpdaterViewModel.vb diff --git a/McMetroLauncher-Manager/MainWindow.xaml.vb b/McMetroLauncher-Manager/MainWindow.xaml.vb index 4ee8307..301f1f6 100644 --- a/McMetroLauncher-Manager/MainWindow.xaml.vb +++ b/McMetroLauncher-Manager/MainWindow.xaml.vb @@ -4,13 +4,14 @@ Imports Newtonsoft.Json Imports Newtonsoft.Json.Linq Module GlobalInfos - Public Webspace As String = "http://patzleiner.net" + Public Website As String = "http://patzleiner.net/" Public Versionsurl As String = "http://s3.amazonaws.com/Minecraft.Download/versions/versions.json" Public mcpfad As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.minecraft" Public modsfile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\modlist.json" Public outputjsonversions As String = mcpfad & "\cache\versions.json" Public modsfolder As String = mcpfad & "\mods" Public cachefolder As String = mcpfad & "\cache" + Public modfileurl As String = Website & "download/modlist.json" Public downloadfilepath As String Public Versions As Versionslist Public Moditem As Modifications.Mod @@ -55,7 +56,7 @@ Public Class Manager Await wc.DownloadFileTaskAsync(New Uri(Versionsurl), outputjsonversions) If IO.File.Exists(modsfile) = False Then wc = New WebClient() - Await wc.DownloadFileTaskAsync(New Uri(Webspace & "\minecraft\launcher\modlist.json"), modsfile) + Await wc.DownloadFileTaskAsync(New Uri(modfileurl), modsfile) End If Await Start() End Sub diff --git a/McMetroLauncher-Manager/McMetroLauncher-Manager.vbproj b/McMetroLauncher-Manager/McMetroLauncher-Manager.vbproj index cc2f3f6..5efa28f 100644 --- a/McMetroLauncher-Manager/McMetroLauncher-Manager.vbproj +++ b/McMetroLauncher-Manager/McMetroLauncher-Manager.vbproj @@ -47,12 +47,17 @@ On + + false + - - ..\..\MahApps.Metro\MahApps.Metro\bin\Debug\NET45\MahApps.Metro.dll + + ..\libraries\MahApps.Metro.dll + False - - ..\..\..\libraries\Newtonsoft.Json.dll + + False + ..\libraries\Newtonsoft.Json.dll diff --git a/MinecraftLauncher/Application.xaml b/MinecraftLauncher/Application.xaml index 45040c0..d3c4d5e 100644 --- a/MinecraftLauncher/Application.xaml +++ b/MinecraftLauncher/Application.xaml @@ -22,7 +22,7 @@ diff --git a/MinecraftLauncher/Extensions/Converters/Converters.vb b/MinecraftLauncher/Extensions/Converters/Converters.vb index 9a874f8..bff0b0a 100644 --- a/MinecraftLauncher/Extensions/Converters/Converters.vb +++ b/MinecraftLauncher/Extensions/Converters/Converters.vb @@ -106,7 +106,7 @@ Public Class Playerlist_Namesstring_Converter Dim s As IList(Of ServerStatus.PlayerList.Player) = TryCast(value, IList(Of ServerStatus.PlayerList.Player)) If s Is Nothing Then Return Nothing Dim playernames As IList(Of String) = s.Select(Function(p) p.Name).ToList - Dim returnstring As String = "Players:" & Environment.NewLine & String.Join(Environment.NewLine, playernames) + Dim returnstring As String = Application.Current.FindResource("Players").ToString & ":" & Environment.NewLine & String.Join(Environment.NewLine, playernames) Return returnstring End Function diff --git a/MinecraftLauncher/Extensions/Converters/NullToBooleanConverter.vb b/MinecraftLauncher/Extensions/Converters/NullToBooleanConverter.vb new file mode 100644 index 0000000..642dc91 --- /dev/null +++ b/MinecraftLauncher/Extensions/Converters/NullToBooleanConverter.vb @@ -0,0 +1,17 @@ +Imports System.Collections.Generic +Imports System.Linq +Imports System.Text +Imports System.Threading.Tasks +Imports System.Globalization +Imports System.Windows.Data + +Class NullToBooleanConverter + Implements IValueConverter + Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert + Return value IsNot Nothing + End Function + + Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack + Return Binding.DoNothing + End Function +End Class diff --git a/MinecraftLauncher/McMetroLauncher.vbproj b/MinecraftLauncher/McMetroLauncher.vbproj index 7857163..32fd023 100644 --- a/MinecraftLauncher/McMetroLauncher.vbproj +++ b/MinecraftLauncher/McMetroLauncher.vbproj @@ -83,7 +83,7 @@ true - true + false My Project\app.manifest @@ -191,7 +191,8 @@ - + + @@ -201,6 +202,9 @@ + + + diff --git a/MinecraftLauncher/Models/Language.vb b/MinecraftLauncher/Models/Language.vb index b215646..432c03f 100644 --- a/MinecraftLauncher/Models/Language.vb +++ b/MinecraftLauncher/Models/Language.vb @@ -2,7 +2,7 @@ Public Class Language Private _Name As String - _ + Public Property Name() As String Get Return _Name @@ -13,6 +13,7 @@ Public Class Language End Property Private _path As String + Public Property Path() As String Get Return _path diff --git a/MinecraftLauncher/Models/Settings.vb b/MinecraftLauncher/Models/Settings.vb index 06affd8..b9c4d35 100644 --- a/MinecraftLauncher/Models/Settings.vb +++ b/MinecraftLauncher/Models/Settings.vb @@ -26,7 +26,9 @@ Public Class Settings Private Shared Async Function ReadSettings() As Task(Of Settings) Dim text As String = File.ReadAllText(SettingsFile.FullName) - Return Await JsonConvert.DeserializeObjectAsync(Of Settings)(text, New JsonSerializerSettings() With {.DefaultValueHandling = DefaultValueHandling.Ignore, .NullValueHandling = NullValueHandling.Ignore}) + Dim settings As Settings = Await JsonConvert.DeserializeObjectAsync(Of Settings)(text, New JsonSerializerSettings() With {.DefaultValueHandling = DefaultValueHandling.Ignore, .NullValueHandling = NullValueHandling.Ignore}) + settings.ActivLanguage = settings.lstLanguages.Where(Function(p) p.Code = settings.ActivLanguage.Code).First + Return settings End Function Public Function Save() As Boolean If mcpfad = GlobalInfos.mcpfad.FullName Then diff --git a/MinecraftLauncher/ViewModels/ForgeInstallerViewModel.vb b/MinecraftLauncher/ViewModels/ForgeInstallerViewModel.vb new file mode 100644 index 0000000..394e8b5 --- /dev/null +++ b/MinecraftLauncher/ViewModels/ForgeInstallerViewModel.vb @@ -0,0 +1,30 @@ +Public Class ForgeInstallerViewModel + Inherits PropertyChangedBase + +#Region "Singleton & Constructor" + Private Shared _Instance As ForgeInstallerViewModel + Public Shared ReadOnly Property Instance As ForgeInstallerViewModel + Get + If _Instance Is Nothing Then _Instance = New ForgeInstallerViewModel + Return _Instance + End Get + End Property + + Public Sub New() + End Sub + +#End Region + +#Region "Properties" + Private _installerdownloading As Boolean + Public Property installerdownloading As Boolean + Get + Return _installerdownloading + End Get + Set(value As Boolean) + SetProperty(value, _installerdownloading) + End Set + End Property +#End Region + +End Class diff --git a/MinecraftLauncher/ViewModels/LiteLoaderInstallerViewModel.vb b/MinecraftLauncher/ViewModels/LiteLoaderInstallerViewModel.vb new file mode 100644 index 0000000..09f0dcb --- /dev/null +++ b/MinecraftLauncher/ViewModels/LiteLoaderInstallerViewModel.vb @@ -0,0 +1,30 @@ +Public Class LiteLoaderInstallerViewModel + Inherits PropertyChangedBase + +#Region "Singleton & Constructor" + Private Shared _Instance As LiteLoaderInstallerViewModel + Public Shared ReadOnly Property Instance As LiteLoaderInstallerViewModel + Get + If _Instance Is Nothing Then _Instance = New LiteLoaderInstallerViewModel + Return _Instance + End Get + End Property + + Public Sub New() + End Sub + +#End Region + +#Region "Properties" + Private _installerdownloading As Boolean + Public Property installerdownloading As Boolean + Get + Return _installerdownloading + End Get + Set(value As Boolean) + SetProperty(value, _installerdownloading) + End Set + End Property +#End Region + +End Class diff --git a/MinecraftLauncher/ViewModels/MainViewModel.vb b/MinecraftLauncher/ViewModels/MainViewModel.vb index 045bb4c..c404b7e 100644 --- a/MinecraftLauncher/ViewModels/MainViewModel.vb +++ b/MinecraftLauncher/ViewModels/MainViewModel.vb @@ -149,17 +149,17 @@ Public Class MainViewModel Get If columnName = "Username" Then If String.IsNullOrWhiteSpace(Username) Then - Return "Gib einen Benutzernamen ein" + Return Application.Current.FindResource("UsernameMissing").ToString ElseIf Not OnlineMode Then 'Username Validation If Username.Length < 3 OrElse Username.Length > 16 Then - Return "3 - 16 Zeichen" + Return "3 - 16 " & Application.Current.FindResource("Characters").ToString Else Dim regex As New Regex("^[A-Za-z0-9_-]{2,16}$") Dim match As Match = regex.Match(Username) If Not match.Success Then - Return "Nur Buchstaben, Zahlen, Binde- und Unterstriche" + Return Application.Current.FindResource("NoSpecialChars").ToString End If End If End If @@ -219,7 +219,7 @@ Public Class MainViewModel ls.Add(service) Next Catch ex As WebException - ls.Add(New AccentColorMenuData() With {.Name = "Fehler beim laden", .ColorBrush = CType(ThemeManager.Accents.Where(Function(p) p.Name = "Red").First.Resources("AccentColorBrush"), System.Windows.Media.Brush)}) + ls.Add(New AccentColorMenuData() With {.Name = Application.Current.FindResource("ErrorLoading").ToString, .ColorBrush = CType(ThemeManager.Accents.Where(Function(p) p.Name = "Red").First.Resources("AccentColorBrush"), System.Windows.Media.Brush)}) 'TODO: Failed to get Service Statuses End Try ServiceStatuses = New ObservableCollection(Of AccentColorMenuData)(ls) diff --git a/MinecraftLauncher/ViewModels/UpdaterViewModel.vb b/MinecraftLauncher/ViewModels/UpdaterViewModel.vb new file mode 100644 index 0000000..c52de23 --- /dev/null +++ b/MinecraftLauncher/ViewModels/UpdaterViewModel.vb @@ -0,0 +1,30 @@ +Public Class UpdaterViewModel + Inherits PropertyChangedBase + +#Region "Singleton & Constructor" + Private Shared _Instance As UpdaterViewModel + Public Shared ReadOnly Property Instance As UpdaterViewModel + Get + If _Instance Is Nothing Then _Instance = New UpdaterViewModel + Return _Instance + End Get + End Property + + Public Sub New() + End Sub + +#End Region + +#Region "Properties" + Private _installerdownloading As Boolean + Public Property installerdownloading As Boolean + Get + Return _installerdownloading + End Get + Set(value As Boolean) + SetProperty(value, _installerdownloading) + End Set + End Property +#End Region + +End Class diff --git a/MinecraftLauncher/Windows/Forge_ProfileEditor.xaml b/MinecraftLauncher/Windows/Forge_ProfileEditor.xaml index 2a0c855..d154eaf 100644 --- a/MinecraftLauncher/Windows/Forge_ProfileEditor.xaml +++ b/MinecraftLauncher/Windows/Forge_ProfileEditor.xaml @@ -4,18 +4,18 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" - Title="Version zu Profil hinzufügen" + Title="{DynamicResource AddVersionToProfile}" Height="222" Width="429" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen" DataContext="{x:Static local:MainViewModel.Instance}"> - + - + diff --git a/MinecraftLauncher/Windows/Forge_installer.xaml.vb b/MinecraftLauncher/Windows/Forge_installer.xaml.vb index cc72731..8085eba 100644 --- a/MinecraftLauncher/Windows/Forge_installer.xaml.vb +++ b/MinecraftLauncher/Windows/Forge_installer.xaml.vb @@ -55,13 +55,13 @@ Class Forge_installer Private Async Sub btn_download_Click(sender As Object, e As RoutedEventArgs) Handles btn_download.Click If lst.SelectedIndex = -1 Then - Await Me.ShowMessageAsync(Nothing, "Bitte wähle eine Forge Version Aus!", MessageDialogStyle.Affirmative, New MetroDialogSettings() With {.AffirmativeButtonText = "Ok", .ColorScheme = MetroDialogColorScheme.Accented}) + Await Me.ShowMessageAsync(Nothing, Application.Current.FindResource("ChooseForgeVersion").ToString, MessageDialogStyle.Affirmative, New MetroDialogSettings() With {.AffirmativeButtonText = Application.Current.FindResource("OK").ToString, .ColorScheme = MetroDialogColorScheme.Accented}) ElseIf wc.IsBusy = True Then wc.CancelAsync() Else btn_download_auto.IsEnabled = False pb_download.IsIndeterminate = False - forge_anleitung.IsSelected = True + forge_instructions.IsSelected = True Dim Legacyforgefile As Boolean = False If Forge.LegacyBuildList.Select(Function(p) p.version).Contains(build.version) Then Legacyforgefile = True @@ -72,7 +72,7 @@ Class Forge_installer End If filename = IO.Path.Combine(cachefolder.FullName, String.Format("forge-{0}-{1}-installer.jar", build.mcversion, build.version)) wc.DownloadFileAsync(url, filename) - btn_download.Content = "Abbrechen" + ForgeInstallerViewModel.Instance.installerdownloading = True End If End Sub @@ -88,7 +88,7 @@ Class Forge_installer Process.Start(filename) End If btn_download_auto.IsEnabled = True - btn_download.Content = "Herunterladen und Installieren" + ForgeInstallerViewModel.Instance.installerdownloading = False End Sub Private Sub wc_DownloadProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs) Handles wc.DownloadProgressChanged @@ -98,10 +98,10 @@ Class Forge_installer Private Async Sub btn_download_auto_Click(sender As Object, e As RoutedEventArgs) Handles btn_download_auto.Click Try If lst.SelectedIndex = -1 Then - Await Me.ShowMessageAsync(Nothing, "Bitte wähle eine Forge Version Aus!", MessageDialogStyle.Affirmative, New MetroDialogSettings() With {.AffirmativeButtonText = "Ok", .ColorScheme = MetroDialogColorScheme.Accented}) + Await Me.ShowMessageAsync(Nothing, Application.Current.FindResource("ChooseForgeVersion").ToString, MessageDialogStyle.Affirmative, New MetroDialogSettings() With {.AffirmativeButtonText = Application.Current.FindResource("OK").ToString, .ColorScheme = MetroDialogColorScheme.Accented}) Else stripmeta = False - controller = Await Me.ShowProgressAsync("Forge wird installiert", "Bitte warten", False, New MetroDialogSettings() With {.ColorScheme = MetroDialogColorScheme.Theme}) + controller = Await Me.ShowProgressAsync(Application.Current.FindResource("InstallingForge").ToString, Application.Current.FindResource("PleaseWait").ToString, False, New MetroDialogSettings() With {.ColorScheme = MetroDialogColorScheme.Theme}) Legacyforge = False If Forge.LegacyBuildList.Select(Function(p) p.version).Contains(build.version) Then Legacyforge = True @@ -173,7 +173,7 @@ Class Forge_installer If .Exists = False Then 'Download wcauto = New WebClient - controller.SetMessage("Lade Version herunter...") + controller.SetMessage(Application.Current.FindResource("DownloadingVersion").ToString) AddHandler wcauto.DownloadProgressChanged, Sub(sender2 As Object, e2 As Net.DownloadProgressChangedEventArgs) Dim progress As Double = 1 / 3 + e2.ProgressPercentage / 100 / 3 If progress <= 1 Then @@ -195,7 +195,7 @@ Class Forge_installer 'Show Error End Try 'Copy - controller.SetMessage("Installiere Version...") + controller.SetMessage(Application.Current.FindResource("InstallingVersion").ToString) Dim targetpath As New FileInfo(Path.Combine(versionsfolder.FullName, versionsname, versionsname & ".jar")) If targetpath.Directory.Exists = False Then targetpath.Directory.Create() @@ -244,7 +244,7 @@ Class Forge_installer Await Downloadlibs() End With ElseIf e.Error IsNot Nothing Then - controller.SetMessage("Fehler beim herunterladen: " & e.Error.Message & Environment.NewLine & libpath.FullName) + controller.SetMessage(Application.Current.FindResource("ErrorDownloading").ToString & ": " & e.Error.Message & Environment.NewLine & libpath.FullName) controller.SetCancelable(True) While controller.IsCanceled = False Await Task.Delay(10) @@ -259,7 +259,7 @@ Class Forge_installer Async Function Downloadlibs() As Task If build.mcversion = "1.5.2" Then - controller.SetMessage("Bitte warten, erforderliche Libraries werden heruntergeladen") + controller.SetMessage(Application.Current.FindResource("DownloadingRequiredLibraries").ToString) controller.SetIndeterminate() Try Await New WebClient().DownloadFileTaskAsync("http://files.minecraftforge.net/fmllibs/bcprov-jdk15on-148.jar.stash", Path.Combine(mcpfad.FullName, "lib", "bcprov-jdk15on-148.jar")) @@ -279,7 +279,7 @@ Class Forge_installer libpath = New FileInfo(IO.Path.Combine(librariesfolder.FullName, .path) & ".pack.xz") Dim customurl As String = .url Dim url As String = customurl & .path & ".pack.xz" - controller.SetMessage("Lade Library herunter: " & libpath.FullName) + controller.SetMessage(Application.Current.FindResource("DownloadLibrary").ToString & ": " & libpath.FullName) If Not libpath.Directory.Exists Then libpath.Directory.Create() End If @@ -350,9 +350,9 @@ Class Forge_installer Async Sub Downloadlibcompleted(sender As Object, e As ComponentModel.AsyncCompletedEventArgs) If e.Cancelled = False AndAlso e.Error Is Nothing Then - controller.SetMessage("Entpacke Library : " & libpath.FullName) + controller.SetMessage(Application.Current.FindResource("UnpackingLibrary").ToString & ": " & libpath.FullName) If Await Unpack.Unpack(libpath, libpath) = False Then - controller.SetMessage("Fehler beim entpacken: " & libpath.FullName) + controller.SetMessage(Application.Current.FindResource("ErrorUnpacking").ToString & ": " & libpath.FullName) controller.SetCancelable(True) While controller.IsCanceled = False Await Task.Delay(10) @@ -364,7 +364,7 @@ Class Forge_installer End If 'libpath.Delete() ElseIf e.Error IsNot Nothing Then - controller.SetMessage("Fehler beim herunterladen: " & e.Error.Message & Environment.NewLine & libpath.FullName) + controller.SetMessage(Application.Current.FindResource("ErrorDownloading").ToString & ": " & e.Error.Message & Environment.NewLine & libpath.FullName) controller.SetCancelable(True) While controller.IsCanceled = False Await Task.Delay(10) diff --git a/MinecraftLauncher/Windows/LiteLoader_installer.xaml b/MinecraftLauncher/Windows/LiteLoader_installer.xaml index 9fad929..183be50 100644 --- a/MinecraftLauncher/Windows/LiteLoader_installer.xaml +++ b/MinecraftLauncher/Windows/LiteLoader_installer.xaml @@ -1,30 +1,43 @@  + WindowStartupLocation="CenterScreen" + DataContext="{x:Static local:LiteLoaderInstallerViewModel.Instance}"> - + - - + - + - - + diff --git a/MinecraftLauncher/Windows/LiteLoader_installer.xaml.vb b/MinecraftLauncher/Windows/LiteLoader_installer.xaml.vb index cc0f5d1..27c438f 100644 --- a/MinecraftLauncher/Windows/LiteLoader_installer.xaml.vb +++ b/MinecraftLauncher/Windows/LiteLoader_installer.xaml.vb @@ -9,7 +9,7 @@ Public Class LiteLoader_installer WithEvents wc As New WebClient Private filename As String - Private Async Sub ForgeManager_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Private Async Sub LiteLoader_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Dim theme = ThemeManager.DetectAppStyle(Application.Current) If theme.Item1.Name = "BaseLight" Then btn_copy_image.Source = ImageConvert.GetImageStream(My.Resources.appbar_page_copy) @@ -27,24 +27,16 @@ Public Class LiteLoader_installer Private Async Sub btn_download_Click(sender As Object, e As RoutedEventArgs) Handles btn_download.Click If lst.SelectedIndex = -1 Then - Await Me.ShowMessageAsync(Nothing, "Bitte wähle eine LiteLoader Version Aus!", MessageDialogStyle.Affirmative, New MetroDialogSettings() With {.AffirmativeButtonText = "Ok", .ColorScheme = MetroDialogColorScheme.Accented}) + Await Me.ShowMessageAsync(Nothing, Application.Current.FindResource("ChooseLiteLoaderVersion").ToString, MessageDialogStyle.Affirmative, New MetroDialogSettings() With {.AffirmativeButtonText = Application.Current.FindResource("OK").ToString, .ColorScheme = MetroDialogColorScheme.Accented}) ElseIf wc.IsBusy = True Then wc.CancelAsync() Else - forge_anleitung.IsSelected = True + liteloader_instructions.IsSelected = True Dim url As New Uri(DirectCast(lst.SelectedItem, LiteLoader.LiteLoaderEintrag).DownloadLink) Dim ls As IList(Of String) = url.Segments filename = IO.Path.Combine(cachefolder.FullName, ls.Last) wc.DownloadFileAsync(url, filename) - btn_download.Content = "Abbrechen" - - 'Dim dateiendung As String = "zip" - 'version = DirectCast(lst.SelectedItem, ForgeEintrag).version - 'build = DirectCast(lst.SelectedItem, ForgeEintrag).build - 'profilename = String.Format("{1}-Forge{2}", version, build) - 'filename = String.Format("{1}\{2}.{3}", cachefolder, profilename, dateiendung) - 'wc.DownloadFileAsync(New Uri(url), filename) - ''Installieren + LiteLoaderInstallerViewModel.Instance.installerdownloading = True End If End Sub @@ -58,20 +50,8 @@ Public Class LiteLoader_installer Else pb_download.IsIndeterminate = True Process.Start(filename) - ''Entpacken... und installieren - 'UnzipForge(filename) - ''Profiles hinzufügen - 'Dim profile As New Profile(profilename, Nothing, version, Nothing, Nothing, Nothing, Nothing, Nothing) - 'If Profiles.List.Contains(profilename) = True Then - ' Profiles.Edit(profilename, profile) - 'Else - ' Profiles.Add(profile) - 'End If - 'pb_download.IsIndeterminate = False - 'pb_download.Value = pb_download.Maximum - 'downloading = False End If - btn_download.Content = "Herunterladen und Installieren" + LiteLoaderInstallerViewModel.Instance.installerdownloading = False End Sub Private Sub wc_DownloadProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs) Handles wc.DownloadProgressChanged diff --git a/MinecraftLauncher/Windows/Login.xaml b/MinecraftLauncher/Windows/Login.xaml index 1243a53..8a877e6 100644 --- a/MinecraftLauncher/Windows/Login.xaml +++ b/MinecraftLauncher/Windows/Login.xaml @@ -18,7 +18,7 @@ - + @@ -34,11 +34,11 @@ @@ -72,18 +72,18 @@ - Was soll ich nehmen? + -