diff --git a/StarCitizen Helper/Controls/WL_About.Designer.vb b/StarCitizen Helper/Controls/WL_About.Designer.vb index b5954f6..8b400aa 100644 --- a/StarCitizen Helper/Controls/WL_About.Designer.vb +++ b/StarCitizen Helper/Controls/WL_About.Designer.vb @@ -109,6 +109,7 @@ Partial Class WL_About Me.Label_SendIssueCore.TabIndex = 3 Me.Label_SendIssueCore.Text = "Отправить отзыв о проблеме с ядром" Me.Label_SendIssueCore.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Label_SendIssueCore.Visible = False ' 'Button_SendIssueCore ' @@ -119,6 +120,7 @@ Partial Class WL_About Me.Button_SendIssueCore.TabIndex = 2 Me.Button_SendIssueCore.Text = "Отзыв о ядре" Me.Button_SendIssueCore.UseVisualStyleBackColor = True + Me.Button_SendIssueCore.Visible = False ' 'WL_About ' diff --git a/StarCitizen Helper/Controls/WL_Modification.Designer.vb b/StarCitizen Helper/Controls/WL_Modification.Designer.vb index 92213b2..5c86e6e 100644 --- a/StarCitizen Helper/Controls/WL_Modification.Designer.vb +++ b/StarCitizen Helper/Controls/WL_Modification.Designer.vb @@ -158,7 +158,6 @@ Partial Class WL_Modification Me.Label_ModOn.TabIndex = 8 Me.Label_ModOn.Text = "Включить модификацию" Me.Label_ModOn.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Label_ModOn.Visible = False ' 'Label_ModOff ' diff --git a/StarCitizen Helper/Controls/WL_Modification.vb b/StarCitizen Helper/Controls/WL_Modification.vb index 981f494..f6c9af5 100644 --- a/StarCitizen Helper/Controls/WL_Modification.vb +++ b/StarCitizen Helper/Controls/WL_Modification.vb @@ -362,8 +362,8 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then End Get Set(Value As String) If bLoadComplete = False And Value Is Nothing Then Exit Property - If Me.Property_PatchSrcFilePath Is Nothing Then Value = Nothing - If _FSO._FileExits(Me.Property_PatchSrcFilePath) = False Then Value = Nothing + 'If Me.Property_PatchSrcFilePath Is Nothing Then Value = Nothing + 'If _FSO._FileExits(Me.Property_PatchSrcFilePath) = False Then Value = Nothing Me.sModInPackFileVersion = Value If _VARS.ConfigFileIsOK = True Then _JSETTINGS._SetValue("configuration.external", "mod_pack_version", Me.sModInPackFileVersion, True) @@ -428,7 +428,7 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then Dim _USER As New Class_INI _USER.SkipInvalidLines = True _USER._FSO = MAIN_THREAD.WL_Pack.Property_FilePath_User - _USER._Write(Nothing, _VARS.g_langueage, Me.Localization, _VARS.utf8NoBom) + _USER._Write(Nothing, _VARS.g_language, Me.Localization, _VARS.utf8NoBom) _Update() @@ -449,7 +449,7 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then Dim _USER As New Class_INI _USER.SkipInvalidLines = True _USER._FSO = MAIN_THREAD.WL_Pack.Property_FilePath_User - _USER._Write(Nothing, _VARS.g_langueage, "", _VARS.utf8NoBom) + _USER._Write(Nothing, _VARS.g_language, "", _VARS.utf8NoBom) '_FSO._DeleteFile(Me.Property_PatchDstFilePath) @@ -484,7 +484,10 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then '<----------------------------------- Logic Private Sub Set_GameType(Path As String) - If _FSO._FileExits(Path) = False Then Me.iGameType = GameType.UNKNOWN : Exit Sub + If _FSO._FileExits(Path) = False Then + Me.iGameType = GameType.UNKNOWN + Exit Sub + End If Dim result As ResultClass = _FSO._GetFileInfo(Path) Dim File As IO.FileInfo @@ -523,7 +526,7 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then For i = 0 To Me.List_Localization.Count - 1 ValidList(i) = Me.List_Localization(i) Next i - If _USER._GET_VALUE(Nothing, _VARS.g_langueage, Nothing, _VARS.utf8NoBom, ValidList).Value IsNot Nothing Then + If _USER._GET_VALUE(Nothing, _VARS.g_language, Nothing, _VARS.utf8NoBom, ValidList).Value IsNot Nothing Then Return 2 End If @@ -533,6 +536,7 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then Public Sub _Update(Optional LogType As Integer = 3) Me.Button_Disable.Enabled = False Me.Button_Enable.Enabled = False + Me.Button_Enable.BackColor = Me.BackColor Me.List_SubLocal.Enabled = True Dim srcCondition As Byte = CheckSourceModСonditions() @@ -548,19 +552,17 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then If Me.Button_Enable.Enabled = True Then Me.Property_ModStatus = False - _LOG._sAdd("MODIFICATION", _LANG._Get("l_Modification", _LANG._Get("DisabledT")), Me.Property_ModInGameFileVersion, LogType) + Me.Label_ModOn.Text = _LANG._Get("l_Enable", _LANG._Get("l_ModificationModule", Me.sModInPackFileVersion)) + _LOG._sAdd("MODIFICATION", _LANG._Get("Modification") & " - " & _LANG._Get("DisabledT", "(" & Me.Property_ModInGameFileVersion & "):"), Me.Property_GameExeFilePath, LogType) End If If Me.Button_Disable.Enabled = True Then Me.Property_ModStatus = True - _LOG._sAdd("MODIFICATION", _LANG._Get("l_Modification", _LANG._Get("l_EnabledT", "(v." & Me.Property_ModInGameFileVersion & "):")), Me.Property_GameExeFilePath, LogType) + Me.Button_Enable.BackColor = Color.PaleGreen + Me.Label_ModOn.Text = _LANG._Get("l_EnabledT", _LANG._Get("l_Modification", Me.sModInPackFileVersion)) + _LOG._sAdd("MODIFICATION", _LANG._Get("Modification") & " - " & _LANG._Get("l_EnabledT", "(" & Me.Property_ModInGameFileVersion & "):"), Me.Property_GameExeFilePath, LogType) End If - If Me.sModInPackFileVersion Is Nothing Then - Me.Label_ModOn.Text = _LANG._Get("Modification_MSG_CoreNotFound", _LANG._Get("ModificationModule")) - Else - Me.Label_ModOn.Text = _LANG._Get("l_Enable", _LANG._Get("ModificationModule")) & " v." & Me.sModInPackFileVersion - End If Me.Label_ModOff.Text = _LANG._Get("l_Disable", _LANG._Get("ModificationModule")) If Me.sModInGameFileVersion Is Nothing Then @@ -569,7 +571,7 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then End If Else If Me.Property_ModStatus = True Then - Me.Label_ModOff.Text = _LANG._Get("l_Disable", _LANG._Get("ModificationModule")) & " v." & Me.sModInGameFileVersion + Me.Label_ModOff.Text = _LANG._Get("l_Disable", _LANG._Get("ModificationModule")) & ": " & Me.sModInGameFileVersion End If End If End Sub @@ -593,5 +595,6 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then End Sub + '-----------------------------------> Logic End Class diff --git a/StarCitizen Helper/Controls/WL_Pack.Designer.vb b/StarCitizen Helper/Controls/WL_Pack.Designer.vb index efdcb80..c1b4c45 100644 --- a/StarCitizen Helper/Controls/WL_Pack.Designer.vb +++ b/StarCitizen Helper/Controls/WL_Pack.Designer.vb @@ -122,6 +122,7 @@ Partial Class WL_Pack Me.Button_InstallFull.TabIndex = 5 Me.Button_InstallFull.Text = "Полная установка" Me.Button_InstallFull.UseVisualStyleBackColor = True + Me.Button_InstallFull.Visible = False ' 'Button_Download ' @@ -158,6 +159,7 @@ Partial Class WL_Pack Me.Label_InstallFull.TabIndex = 8 Me.Label_InstallFull.Text = "Локализация и шрифты" Me.Label_InstallFull.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Label_InstallFull.Visible = False ' 'CheckBox_ShowAllBuild ' @@ -167,7 +169,7 @@ Partial Class WL_Pack Me.CheckBox_ShowAllBuild.Name = "CheckBox_ShowAllBuild" Me.CheckBox_ShowAllBuild.Size = New System.Drawing.Size(202, 24) Me.CheckBox_ShowAllBuild.TabIndex = 15 - Me.CheckBox_ShowAllBuild.Text = "Отображать тестовые сборки" + Me.CheckBox_ShowAllBuild.Text = "Отображать все сборки" Me.CheckBox_ShowAllBuild.UseVisualStyleBackColor = True ' 'Panel1 @@ -201,7 +203,6 @@ Partial Class WL_Pack Me.Label_RepozitoryName.AutoSize = True Me.Label_RepozitoryName.BackColor = System.Drawing.Color.Transparent Me.Label_RepozitoryName.Dock = System.Windows.Forms.DockStyle.Left - Me.Label_RepozitoryName.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.Label_RepozitoryName.Location = New System.Drawing.Point(0, 0) Me.Label_RepozitoryName.Margin = New System.Windows.Forms.Padding(1, 5, 3, 5) Me.Label_RepozitoryName.Name = "Label_RepozitoryName" diff --git a/StarCitizen Helper/Controls/WL_Pack.vb b/StarCitizen Helper/Controls/WL_Pack.vb index 0803235..46a956a 100644 --- a/StarCitizen Helper/Controls/WL_Pack.vb +++ b/StarCitizen Helper/Controls/WL_Pack.vb @@ -1,4 +1,5 @@ -Imports System.IO +Imports System.Diagnostics.Eventing.Reader +Imports System.IO Imports System.Net Imports System.Threading Imports System.Windows.Annotations @@ -421,7 +422,7 @@ Public Class WL_Pack 'Me.Enabled = False List_Git.Enabled = False CheckBox_ShowAllBuild.Enabled = False - Button_Download.Enabled = False + 'Button_Download.Enabled = False WL_Download.Enabled = False End Sub) @@ -430,7 +431,7 @@ Public Class WL_Pack 'Me.Enabled = False List_Git.Enabled = False CheckBox_ShowAllBuild.Enabled = False - Button_Download.Enabled = False + 'Button_Download.Enabled = False WL_Download.Enabled = False End If Me.WL_PackUpdateCheck.Property_URLApi = Property_PackageGitURL_Api @@ -525,7 +526,8 @@ Public Class WL_Pack '<----------------------------------- Controls Public Sub Button_Download_Click(sender As Object, e As EventArgs) Handles Button_Download.Click - Me._Enabled(False) + ControlsEnableDisable(False) + Me.Button_OpenFile.Enabled = False RaiseEvent _Event_Download_Click_Before() RaiseEvent _Event_Download_Before() @@ -546,12 +548,14 @@ Finalize: If result.Err._Flag = True Then End Sub Private Sub Button_OpenFile_Click(sender As Object, e As EventArgs) Handles Button_OpenFile.Click - Me._Enabled(False) RaiseEvent _Event_Download_Click_Before() RaiseEvent _Event_Download_Before() Dim result As New ResultClass(Me) + ControlsEnableDisable(False) + Me.Button_OpenFile.Enabled = False + MAIN_THREAD.OpenFileDialog1.Filter = "Файл локализации (*.zip)|*.zip|" & _LANG._Get("FileAllFiles") & " (*.*)|*.*" MAIN_THREAD.OpenFileDialog1.FilterIndex = 1 @@ -562,7 +566,6 @@ Finalize: If result.Err._Flag = True Then If (MAIN_THREAD.OpenFileDialog1.ShowDialog() = DialogResult.OK) Then SrcFile = MAIN_THREAD.OpenFileDialog1.FileName Else - Me._Enabled(True) GoTo Finalize End If @@ -623,12 +626,12 @@ Finalize: If result.Err._Flag = True Then If MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath IsNot Nothing Then If _FSO._FileExits(MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath) = False Then - _FSO._WriteTextFile(_VARS.g_langueage & " = ", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath, System.Text.Encoding.UTF8) + _FSO._WriteTextFile(_VARS.g_language & " = ", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath, System.Text.Encoding.UTF8) Else Dim _USER_CFG As New Class_INI() _USER_CFG.SkipInvalidLines = True _USER_CFG._FSO = MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath - _USER_CFG._Write(Nothing, _VARS.g_langueage, Nothing, _VARS.utf8NoBom) + _USER_CFG._Write(Nothing, _VARS.g_language, Nothing, _VARS.utf8NoBom) End If End If @@ -679,6 +682,9 @@ Finalize: sender.Enabled = True Me.WL_Download.Refresh() Me.Refresh() + 'https://api.github.com/repos/n1ghter/StarCitizenRu/zipball/2.39 + 'https://codeload.github.com/n1ghter/SC_ru/zip/master + Dim logLines As List(Of LOG_SubLine) = New List(Of LOG_SubLine) Dim logLine As LOG_SubLine = New LOG_SubLine @@ -696,7 +702,6 @@ Finalize: sender.Enabled = True End Sub Private Sub DownloadComplete(DownloadFrom As String, DownloadTo As String, e As WL_Download.DownloadProgressElement) Handles WL_Download._Event_Complete_Event - Me._Enabled(True) Dim logLines As List(Of LOG_SubLine) = New List(Of LOG_SubLine) Dim logLine As LOG_SubLine = New LOG_SubLine logLine.List.Add(_LANG._Get("l_SourceURL", DownloadFrom)) @@ -716,6 +721,11 @@ Finalize: sender.Enabled = True Property_Path_File_Download = DownloadTo + If List_Git.Items.Count > 0 Then + ControlsEnableDisable(True) + End If + Me.Button_OpenFile.Enabled = True + RaiseEvent _Event_Download_After(DownloadFrom, DownloadTo, e) End Sub @@ -757,20 +767,39 @@ Finalize: sender.Enabled = True Public Sub _UpdateListGit() RaiseEvent _Event_ListGit_List_Change_Before() - Me.Invoke(Sub() Me.List_Git.Items.Clear()) + + If InvokeRequired Then + Me.Invoke(Sub() Me.List_Git.Items.Clear()) + Else + Me.List_Git.Items.Clear() + End If Dim tagName As String = "UNKNOWN" - If Me.Property_ShowAllBuild = False Then tagName = Me.Game_Type.ToString() + If Me.Property_ShowAllBuild = False Then + tagName = Me.Game_Type.ToString() + End If Dim List As List(Of Class_GitUpdateElement) = Me.GIT_PACK_DATA._GetByTag(tagName) - If List.Count = 0 Then GoTo Fin + If List.Count = 0 Then + ControlsEnableDisable(False) + GoTo Fin + End If For i = 0 To List.Count - 1 - If InvokeRequired Then Me.Invoke(Sub() Me.List_Git.Items.Add(List(i)._name)) + If InvokeRequired Then + Me.Invoke(Sub() Me.List_Git.Items.Add(List(i)._name)) + Else + Me.List_Git.Items.Add(List(i)._name) + End If Next 'Me.Property_GitList_SelString = _INI._GET_VALUE("EXTERNAL", "PACK_GIT_SELECTED", "", _VARS.utf8NoBom).Value - If Me.List_Git.Items.Count > 0 Then Me.Property_GitList_SelString = Me.List_Git.Items(0) + If Me.List_Git.Items.Count > 0 Then + Me.Property_GitList_SelString = Me.List_Git.Items(0) + ControlsEnableDisable(True) + Else + ControlsEnableDisable(False) + End If Fin: RaiseEvent _Event_ListGit_List_Change_After() End Sub @@ -813,6 +842,7 @@ Fin: RaiseEvent _Event_ListGit_List_Change_After() '_SYSTEM._FSO = Me.Property_FilePath_Config '_ALTLANG._FSO = Me.Property_FilePath_AltLocal + Me.Property_LocalizationDefault = "english" 'Me.Property_LocalizationDefault = _SYSTEM._GET_VALUE(Nothing, "g_language", Nothing, _VARS.utf8NoBom).Value.Trim 'If Len(Me.Property_LocalizationDefault) > 0 Then @@ -853,10 +883,12 @@ Fin: RaiseEvent _Event_ListGit_List_Change_After() For Each elem In JSON("data") Assets = Nothing Assets = elem("assets") - Me.GIT_PACK_DATA._Add(elem("name"), elem("tag_name"), elem("zipball_url"), elem("published_at"), elem("body"), Assets, False) + Me.GIT_PACK_DATA._Add(elem("name"), elem("tag_name"), elem("zipball_url"), elem("published_at"), elem("body"), Assets, False, False) Next Me.GIT_PACK_LATEST = _GIT._GetLatestElement(Me.GIT_PACK_DATA._GetAll) - If Me.Property_ShowAllBuild = True Then GIT_PACK_DATA._Add(("Master"), "Master", Me.Property_PackageGitURL_Master, DateTime.Now, Nothing, Nothing, True) + If Me.Property_ShowAllBuild = True Then + GIT_PACK_DATA._Add(("Master"), "Master", Me.Property_PackageGitURL_Master, DateTime.Now, Nothing, Nothing, True, True) + End If If _VARS.PackageLatestDate <> Me.GIT_PACK_LATEST._published And Convert.ToDateTime("01.01.2000 00:00:00") <> Me.GIT_PACK_LATEST._published Then _VARS.PackageLatestDate = Me.GIT_PACK_LATEST._published @@ -869,14 +901,30 @@ Fin: RaiseEvent _Event_ListGit_List_Change_After() Me.Invoke(Sub() 'Me.Enabled = True - List_Git.Enabled = True - CheckBox_ShowAllBuild.Enabled = True - Button_Download.Enabled = True - WL_Download.Enabled = True + ControlsEnableDisable(True) End Sub) _UpdateListGit() + End Sub - '-----------------------------------> 'Callback + '-----------------------------------> 'Callbac + + + Private Sub ControlsEnableDisable(Enabled As Boolean) + If InvokeRequired Then + Me.Invoke(Sub() + Me.Button_Download.Enabled = Enabled + List_Git.Enabled = Enabled + CheckBox_ShowAllBuild.Enabled = Enabled + WL_Download.Enabled = Enabled + End Sub) + Else + Me.Button_Download.Enabled = Enabled + List_Git.Enabled = Enabled + CheckBox_ShowAllBuild.Enabled = Enabled + WL_Download.Enabled = Enabled + End If + + End Sub End Class diff --git a/StarCitizen Helper/Forms/MainForm.Designer.vb b/StarCitizen Helper/Forms/MainForm.Designer.vb index e97c669..be4f6ee 100644 --- a/StarCitizen Helper/Forms/MainForm.Designer.vb +++ b/StarCitizen Helper/Forms/MainForm.Designer.vb @@ -345,6 +345,7 @@ Partial Class MainForm Me.WL_Pack.Property_PackageGitURL_Master = Nothing Me.WL_Pack.Property_PackageGitURL_Page = Nothing Me.WL_Pack.Property_PackInGameVersion = Nothing + Me.WL_Pack.Property_PackLanguage = Nothing Me.WL_Pack.Property_Path_File_Download = Nothing Me.WL_Pack.Property_Path_File_Meta = Nothing Me.WL_Pack.Property_Path_Folder_Download = Nothing @@ -856,8 +857,8 @@ Partial Class MainForm 'TableLayoutPanel3 ' Me.TableLayoutPanel3.ColumnCount = 2 - Me.TableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) + Me.TableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 93.4847!)) + Me.TableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.515301!)) Me.TableLayoutPanel3.Controls.Add(Me.CheckBox_IgnoreSSL_TLS, 0, 3) Me.TableLayoutPanel3.Controls.Add(Me.CheckBox_HideWhenClose, 0, 2) Me.TableLayoutPanel3.Controls.Add(Me.CheckBox_UpdateAlert, 0, 0) @@ -881,7 +882,7 @@ Partial Class MainForm Me.CheckBox_IgnoreSSL_TLS.Location = New System.Drawing.Point(4, 106) Me.CheckBox_IgnoreSSL_TLS.Margin = New System.Windows.Forms.Padding(4) Me.CheckBox_IgnoreSSL_TLS.Name = "CheckBox_IgnoreSSL_TLS" - Me.CheckBox_IgnoreSSL_TLS.Size = New System.Drawing.Size(498, 28) + Me.CheckBox_IgnoreSSL_TLS.Size = New System.Drawing.Size(939, 28) Me.CheckBox_IgnoreSSL_TLS.TabIndex = 3 Me.CheckBox_IgnoreSSL_TLS.Text = "Игнорировать ошибки SSL\TLS сертификата GitHub (не рекомендуется)" Me.CheckBox_IgnoreSSL_TLS.UseVisualStyleBackColor = True @@ -893,7 +894,7 @@ Partial Class MainForm Me.CheckBox_HideWhenClose.Location = New System.Drawing.Point(4, 72) Me.CheckBox_HideWhenClose.Margin = New System.Windows.Forms.Padding(4) Me.CheckBox_HideWhenClose.Name = "CheckBox_HideWhenClose" - Me.CheckBox_HideWhenClose.Size = New System.Drawing.Size(498, 26) + Me.CheckBox_HideWhenClose.Size = New System.Drawing.Size(939, 26) Me.CheckBox_HideWhenClose.TabIndex = 2 Me.CheckBox_HideWhenClose.Text = "Скрывать при закрытии окна" Me.CheckBox_HideWhenClose.UseVisualStyleBackColor = True @@ -905,7 +906,7 @@ Partial Class MainForm Me.CheckBox_UpdateAlert.Location = New System.Drawing.Point(4, 4) Me.CheckBox_UpdateAlert.Margin = New System.Windows.Forms.Padding(4) Me.CheckBox_UpdateAlert.Name = "CheckBox_UpdateAlert" - Me.CheckBox_UpdateAlert.Size = New System.Drawing.Size(498, 26) + Me.CheckBox_UpdateAlert.Size = New System.Drawing.Size(939, 26) Me.CheckBox_UpdateAlert.TabIndex = 0 Me.CheckBox_UpdateAlert.Text = "Оповещать о наличии обновлений локализации" Me.CheckBox_UpdateAlert.UseVisualStyleBackColor = True @@ -917,7 +918,7 @@ Partial Class MainForm Me.CheckBox_StartUp.Location = New System.Drawing.Point(4, 38) Me.CheckBox_StartUp.Margin = New System.Windows.Forms.Padding(4) Me.CheckBox_StartUp.Name = "CheckBox_StartUp" - Me.CheckBox_StartUp.Size = New System.Drawing.Size(498, 26) + Me.CheckBox_StartUp.Size = New System.Drawing.Size(939, 26) Me.CheckBox_StartUp.TabIndex = 1 Me.CheckBox_StartUp.Text = "Автоматическая загрузка при старте системы" Me.CheckBox_StartUp.UseVisualStyleBackColor = True diff --git a/StarCitizen Helper/Forms/MainForm.vb b/StarCitizen Helper/Forms/MainForm.vb index 30553a6..937de59 100644 --- a/StarCitizen Helper/Forms/MainForm.vb +++ b/StarCitizen Helper/Forms/MainForm.vb @@ -361,6 +361,13 @@ Public Class MainForm On Error Resume Next Dim result As New ResultClass(Me) result.ValueString = DownloadTo + If _FSO._FileExits(DownloadTo) Then + Threading.Thread.Sleep(300) + If _FSO._UsedByProcess(DownloadTo, True) = False Then + WL_Pack.Button_InstallFull_Click(MAIN_THREAD, EventArgs.Empty) + End If + End If + '_FSO._DeleteFile(_FSO._CombinePath(MAIN_THREAD.WL_Pack.Property_Path_Folder_Download, MAIN_THREAD.WL_Mod.Property_PatchSrcFileName)) 'If _FSO.ZIP.UnzipFileToFolder(MAIN_THREAD.WL_Pack.Property_Path_File_Download, "." & MAIN_THREAD.WL_Mod.Property_PatchSrcFileName, _FSO._CombinePath(MAIN_THREAD.WL_Pack.Property_Path_Folder_Download, MAIN_THREAD.WL_Mod.Property_PatchSrcFileName)) = False Then result.Err._Flag = True : result.Err._Description_App = "Не удалось извлечь ядро из загруженного пакета локадизации" 'MAIN_THREAD.WL_Mod.Property_PatchSrcFilePath = _FSO._CombinePath(MAIN_THREAD.WL_Pack.Property_Path_Folder_Download, MAIN_THREAD.WL_Mod.Property_PatchSrcFileName) @@ -497,5 +504,9 @@ Public Class MainForm End Sub + Private Sub WL_Pack_Load(sender As Object, e As EventArgs) Handles WL_Pack.Load + + End Sub + '-----------------------------------> 'Callback End Class \ No newline at end of file diff --git a/StarCitizen Helper/Modules/Module_FSO.vb b/StarCitizen Helper/Modules/Module_FSO.vb index 553c4d8..72ac8ac 100644 --- a/StarCitizen Helper/Modules/Module_FSO.vb +++ b/StarCitizen Helper/Modules/Module_FSO.vb @@ -7,9 +7,11 @@ Module Module_FSO Public WATCHER As New Class_WatcherList Public ZIP As New Class_ZIP - Public Function UsedByProcess(Path As String) As Boolean + Public Function _UsedByProcess(Path As String, Optional FileReadOnly As Boolean = False) As Boolean Try - Using temp As New IO.FileStream(Path, FileMode.Open, FileAccess.ReadWrite, FileShare.None) + Dim FileAccess As FileAccess = FileAccess.ReadWrite + If FileReadOnly Then FileAccess = FileAccess.Read + Using temp As New IO.FileStream(Path, FileMode.Open, FileAccess, FileShare.None) End Using Catch Ex As Exception Return True diff --git a/StarCitizen Helper/Modules/Module_GIT.vb b/StarCitizen Helper/Modules/Module_GIT.vb index 08e6f12..1a2c9ea 100644 --- a/StarCitizen Helper/Modules/Module_GIT.vb +++ b/StarCitizen Helper/Modules/Module_GIT.vb @@ -95,7 +95,7 @@ Module Module_GIT Me.data.Clear() End Sub - Public Sub _Add(Name As String, TagName As String, ZIPBallURL As String, Published As String, Body As String, Assets As Object, PreRelease As Boolean, Optional isMaster As Boolean = False) + Public Sub _Add(Name As String, TagName As String, ZIPBallURL As String, Published As String, Body As String, Assets As Object, PreRelease As Boolean, isMaster As Boolean) data.Add(New Class_GitUpdateElement(Name, TagName, ZIPBallURL, Published, Body, Assets, PreRelease, Me.Get_Type(TagName), isMaster)) End Sub diff --git a/StarCitizen Helper/Modules/Module_HELPER.vb b/StarCitizen Helper/Modules/Module_HELPER.vb index fd17f62..eb8756e 100644 --- a/StarCitizen Helper/Modules/Module_HELPER.vb +++ b/StarCitizen Helper/Modules/Module_HELPER.vb @@ -164,15 +164,15 @@ Module Module_HELPER For i = 0 To MAIN_THREAD.WL_Pack.Property_LocalizationList.Count - 1 ValidList(i) = MAIN_THREAD.WL_Pack.Property_LocalizationList(i) Next i - temp = _USER._GET_VALUE(Nothing, "g_language", MAIN_THREAD.WL_Pack.Property_LocalizationDefault, _VARS.utf8NoBom, ValidList).Value + temp = _USER._GET_VALUE(Nothing, _VARS.g_language, MAIN_THREAD.WL_Pack.Property_LocalizationDefault, _VARS.utf8NoBom, ValidList).Value If MAIN_THREAD.WL_Mod.Localization <> temp Then MAIN_THREAD.WL_Mod.Localization = temp - _USER._Write(Nothing, "g_language", MAIN_THREAD.WL_Mod.Localization, _VARS.utf8NoBom) + _USER._Write(Nothing, _VARS.g_language, MAIN_THREAD.WL_Mod.Localization, _VARS.utf8NoBom) End If Else MAIN_THREAD.WL_Mod.Localization = Nothing - _USER._Write(Nothing, "g_language", MAIN_THREAD.WL_Mod.Localization, _VARS.utf8NoBom) + _USER._Write(Nothing, _VARS.g_language, MAIN_THREAD.WL_Mod.Localization, _VARS.utf8NoBom) End If End Sub diff --git a/StarCitizen Helper/Modules/Module_MAIN.vb b/StarCitizen Helper/Modules/Module_MAIN.vb index 2409a98..fe97399 100644 --- a/StarCitizen Helper/Modules/Module_MAIN.vb +++ b/StarCitizen Helper/Modules/Module_MAIN.vb @@ -258,7 +258,7 @@ Module Module_MAIN Public OldPatcher_File_Name As String = Nothing Public LoginDataToken_SoureFileName As String = Nothing Public LoginDataToken_DestFileName As String = Nothing - Public g_langueage As String = "g_language" + Public g_language As String = "g_language" Public LocalizationFolderName As String = Nothing Public LanguageFolderDelimeter = Nothing Public LanguageFolderDefault = Nothing diff --git a/StarCitizen Helper/My Project/AssemblyInfo.vb b/StarCitizen Helper/My Project/AssemblyInfo.vb index f213a87..29f783c 100644 --- a/StarCitizen Helper/My Project/AssemblyInfo.vb +++ b/StarCitizen Helper/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/StarCitizen Helper/Resources/default_chinese.txt b/StarCitizen Helper/Resources/default_chinese.txt index 684e49a..061468d 100644 --- a/StarCitizen Helper/Resources/default_chinese.txt +++ b/StarCitizen Helper/Resources/default_chinese.txt @@ -72,8 +72,8 @@ l_SourceURL = 源URL: {0} l_Destination = 目标点: {0} l_FunctionEnabled = 启用函数 [{0}] l_FunctionDisabled = 禁用函数 [{0}] -l_Modification = 修改: {0} -l_ModificationModule = 模块模块: {0} +l_Modification = localization: {0} +l_ModificationModule = localization: {0} l_Enable = 启用{0} l_Disable = 禁用{0} l_EnabledT = 启用{0} @@ -243,8 +243,8 @@ ProcessKiller_MSG_ProcessSelectFromList = 请从列表中选择进程 #Localization Pack_CheckName_ShowAllBuild = 列出所有本地化包 -Pack_ButtonName_DownloadPack = 下载本地化包 -Pack_ButtonInfo_DownloadPack = 下载选中的本地化包 (包含核心) +Pack_ButtonName_DownloadPack = Download and install localization +Pack_ButtonInfo_DownloadPack = Dowbload and install pack from internet or local file Pack_ButtonName_PackInstallAll = Install Pack_ButtonInfo_PackInstallAll = 本地化和字体 Pack_Label_RepositoryName = 仓库: {0} @@ -252,7 +252,7 @@ Pack_Bottom_Info = 在下拉菜单中选择一个{1}后点击[{2}]来下载{0}. Pack_MSG_ChangesInfo = 更新日志可以在: {0}查看 Pack_MSG_CreateTempFolder = 已为本地化包创建文件夹:\n\t{0} Pack_MSG_AssignTempFolder = 已为本地化包指定文件夹:\n\t{0} -Pack_MSG_DownloadedVersion = 已下载版本: {0} +Pack_MSG_DownloadedVersion = Downloaded and installed version: {0} Pack_MSG_InstalledVersion = 已安装版本: {0} Pack_MSG_VersionUnspecified = 未知版本 Pack_MSG_ErrorAccessTempFolder = 缺少访问文件夹的权限 diff --git a/StarCitizen Helper/Resources/default_english.txt b/StarCitizen Helper/Resources/default_english.txt index a246394..ee5da96 100644 --- a/StarCitizen Helper/Resources/default_english.txt +++ b/StarCitizen Helper/Resources/default_english.txt @@ -72,8 +72,8 @@ l_SourceURL = Source URL: {0} l_Destination = Destination: {0} l_FunctionEnabled = Function [{0}] enabled l_FunctionDisabled = Function [{0}] disabled -l_Modification = Modification: {0} -l_ModificationModule = Modification: {0} +l_Modification = localization: {0} +l_ModificationModule = localization: {0} l_Enable = Enable {0} l_Disable = Disable {0} l_EnabledT = Enabled {0} @@ -243,8 +243,8 @@ ProcessKiller_MSG_ProcessSelectFromList = Choose one process #Localization Pack_CheckName_ShowAllBuild = Show all packages -Pack_ButtonName_DownloadPack = Download package -Pack_ButtonInfo_DownloadPack = Load pack from internet or local file +Pack_ButtonName_DownloadPack = Download and install localization +Pack_ButtonInfo_DownloadPack = Dowbload and install pack from internet or local file Pack_ButtonName_PackInstallAll = Install Pack_ButtonInfo_PackInstallAll = Localization and Fonts Pack_Label_RepositoryName = Repository: {0} @@ -252,7 +252,7 @@ Pack_Bottom_Info = To download {0} choose one {1} in dropdown menu and click [{2 Pack_MSG_ChangesInfo = Changelog available on: {0} Pack_MSG_CreateTempFolder = Created folder for downloaded localization packs:\n\t{0} Pack_MSG_AssignTempFolder = Setted folder for downloaded localization packs:\n\t{0} -Pack_MSG_DownloadedVersion = Downloaded version: {0} +Pack_MSG_DownloadedVersion = Downloaded and installed version: {0} Pack_MSG_InstalledVersion = Installed version: {0} Pack_MSG_VersionUnspecified = unknown Pack_MSG_ErrorAccessTempFolder = Missing access to downloads folder diff --git a/StarCitizen Helper/Resources/default_korean.txt b/StarCitizen Helper/Resources/default_korean.txt index 196b7ec..9c71c40 100644 --- a/StarCitizen Helper/Resources/default_korean.txt +++ b/StarCitizen Helper/Resources/default_korean.txt @@ -72,8 +72,8 @@ l_SourceURL = 소스 URL: {0} l_Destination = 대상: {0} l_FunctionEnabled = [{0}] 기능 활성화 l_FunctionDisabled = [{0}] 기능 비활성화 -l_Modification = 언어 변경: {0} -l_ModificationModule = 언어 변경: {0} +l_Modification = localization: {0} +l_ModificationModule = localization: {0} l_Enable = {0} 활성화 l_Disable = {0} 비활성화 l_EnabledT = {0} 활성화 @@ -243,8 +243,8 @@ ProcessKiller_MSG_ProcessSelectFromList = 프로세스 선택 #Localization Pack_CheckName_ShowAllBuild = Show all packages -Pack_ButtonName_DownloadPack = 팩 다운로드 -Pack_ButtonInfo_DownloadPack = Load pack from internet or local file +Pack_ButtonName_DownloadPack = Download and install localization +Pack_ButtonInfo_DownloadPack = Dowbload and install pack from internet or local file Pack_ButtonName_PackInstallAll = Install Pack_ButtonInfo_PackInstallAll = 현지화와 글꼴 Pack_Label_RepositoryName = Repository: {0} @@ -252,7 +252,7 @@ Pack_Bottom_Info = To download {0} choose one {1} in dropdown menu and click [{2 Pack_MSG_ChangesInfo = 변경된 점: {0} Pack_MSG_CreateTempFolder = 다운로드된 언어팩을 위한 폴더 생성:\n\t{0} Pack_MSG_AssignTempFolder = 다운로드 한 언어팩을 위한 설정된 폴더:\n\t{0} -Pack_MSG_DownloadedVersion = 다운로드된 버전: {0} +Pack_MSG_DownloadedVersion = Downloaded and installed version: {0} Pack_MSG_InstalledVersion = 설치된 버전: {0} Pack_MSG_VersionUnspecified = 알 수 없음 Pack_MSG_ErrorAccessTempFolder = 다운로드 폴더에 대한 엑세스 권한이 없습니다. diff --git a/StarCitizen Helper/Resources/default_russian.txt b/StarCitizen Helper/Resources/default_russian.txt index c0dbaf1..0c6b72e 100644 --- a/StarCitizen Helper/Resources/default_russian.txt +++ b/StarCitizen Helper/Resources/default_russian.txt @@ -72,8 +72,8 @@ l_SourceURL = l_Destination = : {0} l_FunctionEnabled = [{0}] l_FunctionDisabled = [{0}] -l_Modification = : {0} -l_ModificationModule = : {0} +l_Modification = : {0} +l_ModificationModule = : {0} l_Enable = {0} l_Disable = {0} l_EnabledT = {0} @@ -243,8 +243,8 @@ ProcessKiller_MSG_ProcessSelectFromList = #Localization Pack_CheckName_ShowAllBuild = -Pack_ButtonName_DownloadPack = -Pack_ButtonInfo_DownloadPack = +Pack_ButtonName_DownloadPack = +Pack_ButtonInfo_DownloadPack = Pack_ButtonName_PackInstallAll = Pack_ButtonInfo_PackInstallAll = Pack_Label_RepositoryName = : {0} @@ -252,7 +252,7 @@ Pack_Bottom_Info = Pack_MSG_ChangesInfo = Git \n : {0} Pack_MSG_CreateTempFolder = :\n\t{0} Pack_MSG_AssignTempFolder = :\n\t{0} -Pack_MSG_DownloadedVersion = : {0} +Pack_MSG_DownloadedVersion = : {0} Pack_MSG_InstalledVersion = : {0} Pack_MSG_VersionUnspecified = Pack_MSG_ErrorAccessTempFolder =