From 6a067075b28fab192826d16b7efe3197f479812f Mon Sep 17 00:00:00 2001 From: grasmann Date: Mon, 22 May 2017 22:48:47 +0200 Subject: [PATCH] Updated mod finder, download process, update check; --- VMM/forms/About.Designer.vb | 17 ++- VMM/forms/About.vb | 3 + VMM/forms/Main.vb | 29 +++-- VMM/forms/Modules/ModuleControl.Designer.vb | 25 +--- VMM/forms/Modules/ModuleControl.vb | 67 +++++------ VMM/forms/Modules/ModuleDownload.Designer.vb | 1 + .../Modules/ModuleModBrowser.Designer.vb | 2 +- VMM/forms/Modules/ModuleModBrowser.vb | 4 + .../Modules/ModuleModContent.Designer.vb | 1 + VMM/forms/Modules/ModuleModContent.resx | 2 +- .../Modules/ModuleModDownloader.Designer.vb | 17 ++- VMM/forms/Modules/ModuleModDownloader.vb | 108 ++---------------- VMM/forms/Modules/ModuleModFinder.Designer.vb | 1 + VMM/forms/Modules/ModuleModList.Designer.vb | 60 +++++++++- VMM/forms/Modules/ModuleModList.resx | 21 ++++ VMM/forms/Modules/ModuleModList.vb | 44 ++++++- VMM/forms/Modules/ModuleMods.Designer.vb | 1 + VMM/forms/Modules/ModuleMods.vb | 32 ++++-- VMM/forms/Modules/ModuleOptions.Designer.vb | 9 +- VMM/forms/Modules/ModuleOutput.Designer.vb | 3 + .../Modules/ModuleProfileManager.Designer.vb | 5 +- VMM/forms/Modules/ModuleReadMe.Designer.vb | 1 + .../Modules/ModuleRequirements.Designer.vb | 1 + VMM/forms/Modules/ModuleRequirements.resx | 11 +- VMM/forms/Modules/ModuleWarning.Designer.vb | 1 + VMM/function/Helpers/ServerHelper.vb | 4 +- VMM/function/Version.vb | 2 +- 27 files changed, 274 insertions(+), 198 deletions(-) diff --git a/VMM/forms/About.Designer.vb b/VMM/forms/About.Designer.vb index 6d62c31..fe7e245 100644 --- a/VMM/forms/About.Designer.vb +++ b/VMM/forms/About.Designer.vb @@ -33,7 +33,9 @@ Partial Class About Me.btn_update = New System.Windows.Forms.Button() Me.lbl_up_to_date = New System.Windows.Forms.Label() Me.lbl_checking_update = New System.Windows.Forms.Label() + Me.pb_up_to_date = New System.Windows.Forms.PictureBox() CType(Me.pb_image, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.pb_up_to_date, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'lbl_name @@ -121,12 +123,22 @@ Partial Class About Me.lbl_checking_update.Text = "Checking for Mod Manager updates ..." Me.lbl_checking_update.Visible = False ' + 'pb_up_to_date + ' + Me.pb_up_to_date.Image = Global.VMM.My.Resources.Resources.install_16 + Me.pb_up_to_date.Location = New System.Drawing.Point(415, 112) + Me.pb_up_to_date.Name = "pb_up_to_date" + Me.pb_up_to_date.Size = New System.Drawing.Size(16, 16) + Me.pb_up_to_date.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize + Me.pb_up_to_date.TabIndex = 8 + Me.pb_up_to_date.TabStop = False + ' 'About ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(572, 250) - Me.Controls.Add(Me.lbl_checking_update) + Me.Controls.Add(Me.pb_up_to_date) Me.Controls.Add(Me.lbl_up_to_date) Me.Controls.Add(Me.btn_update) Me.Controls.Add(Me.lbl_update) @@ -134,6 +146,7 @@ Partial Class About Me.Controls.Add(Me.lbl_version) Me.Controls.Add(Me.lbl_name) Me.Controls.Add(Me.pb_image) + Me.Controls.Add(Me.lbl_checking_update) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.MaximizeBox = False @@ -142,6 +155,7 @@ Partial Class About Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "About" CType(Me.pb_image, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.pb_up_to_date, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -155,4 +169,5 @@ Partial Class About Friend WithEvents btn_update As Button Friend WithEvents lbl_up_to_date As Label Friend WithEvents lbl_checking_update As Label + Friend WithEvents pb_up_to_date As PictureBox End Class diff --git a/VMM/forms/About.vb b/VMM/forms/About.vb index c0f0837..363121d 100644 --- a/VMM/forms/About.vb +++ b/VMM/forms/About.vb @@ -7,6 +7,7 @@ Public Class About Private Sub _update_check_NoUpdate() Handles _update_check.NoUpdate lbl_up_to_date.Visible = True lbl_checking_update.Visible = False + pb_up_to_date.Visible = True End Sub Private Sub _update_check_UpdateAvailable(File As FileInfo) Handles _update_check.UpdateAvailable @@ -24,6 +25,8 @@ Public Class About lbl_update.Visible = False btn_update.Visible = False lbl_checking_update.Visible = True + pb_up_to_date.Visible = False + lbl_up_to_date.Visible = False _update_check.CheckForUpdate() End Sub End Class \ No newline at end of file diff --git a/VMM/forms/Main.vb b/VMM/forms/Main.vb index 2493f44..0f9b418 100644 --- a/VMM/forms/Main.vb +++ b/VMM/forms/Main.vb @@ -95,11 +95,16 @@ Public Class main Private Sub _download_mod_DownloadFinished() Handles _download_mod.DownloadFinished _mods = ModHelper.FindMods() - _mod_module.Close() - _mod_module = New ModuleMods() '_profiles, _settings, _mods) - _mod_module.Show(DockPanel1, DockState.Document) + Me.SuspendLayout() + DockPanel1.SuspendLayout() + '_mod_module.Close() + '_mod_module = New ModuleMods() '_profiles, _settings, _mods) + '_mod_module.Show(DockPanel1, DockState.Document) _mod_module.UpdateData(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) + _mod_module.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) show_modules() + DockPanel1.ResumeLayout() + Me.ResumeLayout() _controls.UpdateUI(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) End Sub @@ -107,9 +112,13 @@ Public Class main Private Sub _mod_downloader_DownloadFinished() Handles _mod_downloader.DownloadFinished _download_mod_DownloadFinished() + Me.SuspendLayout() + DockPanel1.SuspendLayout() If _mod_downloader.DockState = DockState.Document Then _mod_downloader.Show(DockPanel1, DockState.Document) End If + DockPanel1.ResumeLayout() + Me.ResumeLayout() End Sub @@ -128,7 +137,7 @@ Public Class main SettingsBakery.Save(_settings) End Sub - Private Sub _controls_ManageProfiles() Handles _controls.ManageProfiles + Private Sub _controls_ManageProfiles() Handles _controls.ManageProfiles, _mod_module.ManageProfiles 'Dim pm As New ProfileManager() '_profiles) 'pm.ShowDialog() _profile_manager.Show(DockPanel1, DockState.Document) @@ -178,10 +187,12 @@ Public Class main _mod_module = New ModuleMods _mod_module.Show(DockPanel1, DockState.Document) _mod_module.UpdateData(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) + _mod_module.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) _controls = New ModuleControl() _controls.Show(DockPanel1, DockState.DockTop) - _controls.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) + _controls.UpdateUI(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) + '_controls.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) '_read_me = New ModuleReadMe() _output = New ModuleOutput @@ -243,7 +254,7 @@ Public Class main Output("Settings saved.") '_settings.Patched = Not _settings.Patched '_controls.OnInstallerRun() - _controls.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) + _mod_module.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) _mod_module.UpdateData(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) End Sub @@ -297,12 +308,16 @@ Public Class main Dim _pane As DockPane = Nothing + Me.SuspendLayout() + DockPanel1.SuspendLayout() If _settings.HideModule.Contains("Output") Then _output.Show(DockPanel1, DockState.DockBottomAutoHide) Else _output.Show(DockPanel1, DockState.DockBottom) End If _mod_module.ShowModules(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) + DockPanel1.ResumeLayout() + Me.ResumeLayout() 'If _settings.HideModule.Contains("ReadMe") Then ' _read_me.Show(DockPanel1, DockState.DockRightAutoHide) 'Else @@ -365,7 +380,7 @@ Public Class main End Sub Private Sub _profile_manager_UpdateProfiles() Handles _profile_manager.UpdateProfiles - _controls.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) + _mod_module.UpdateProfiles(New ModuleArgs(_profiles, _settings, _mods, selected_profile())) End Sub Private Sub _controls_FindMods() Handles _controls.FindMods diff --git a/VMM/forms/Modules/ModuleControl.Designer.vb b/VMM/forms/Modules/ModuleControl.Designer.vb index f7e5617..4bdf5a5 100644 --- a/VMM/forms/Modules/ModuleControl.Designer.vb +++ b/VMM/forms/Modules/ModuleControl.Designer.vb @@ -26,7 +26,6 @@ Partial Class ModuleControl Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ModuleControl)) Me.btn_install = New System.Windows.Forms.Button() - Me.cmb_profiles = New System.Windows.Forms.ComboBox() Me.btn_find_mods = New System.Windows.Forms.Button() Me.btn_options = New System.Windows.Forms.Button() Me.btn_launch = New System.Windows.Forms.Button() @@ -46,26 +45,13 @@ Partial Class ModuleControl Me.btn_install.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText Me.btn_install.UseVisualStyleBackColor = True ' - 'cmb_profiles - ' - Me.cmb_profiles.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.cmb_profiles.Cursor = System.Windows.Forms.Cursors.Hand - Me.cmb_profiles.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.cmb_profiles.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.cmb_profiles.FormattingEnabled = True - Me.cmb_profiles.Location = New System.Drawing.Point(272, 1) - Me.cmb_profiles.Name = "cmb_profiles" - Me.cmb_profiles.Size = New System.Drawing.Size(224, 28) - Me.cmb_profiles.TabIndex = 10 - ' 'btn_find_mods ' Me.btn_find_mods.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.btn_find_mods.Image = Global.VMM.My.Resources.Resources.SearchWebHS Me.btn_find_mods.ImageAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btn_find_mods.Location = New System.Drawing.Point(177, 0) + Me.btn_find_mods.Location = New System.Drawing.Point(185, 0) Me.btn_find_mods.Name = "btn_find_mods" Me.btn_find_mods.Size = New System.Drawing.Size(94, 140) Me.btn_find_mods.TabIndex = 13 @@ -96,7 +82,7 @@ Partial Class ModuleControl Me.btn_launch.Image = Global.VMM.My.Resources.Resources.launch_24 Me.btn_launch.Location = New System.Drawing.Point(101, 0) Me.btn_launch.Name = "btn_launch" - Me.btn_launch.Size = New System.Drawing.Size(76, 140) + Me.btn_launch.Size = New System.Drawing.Size(84, 140) Me.btn_launch.TabIndex = 9 Me.btn_launch.Text = "Lanuch" Me.btn_launch.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText @@ -124,14 +110,10 @@ Partial Class ModuleControl Me.CloseButtonVisible = False Me.Controls.Add(Me.btn_find_mods) Me.Controls.Add(Me.btn_options) - Me.Controls.Add(Me.cmb_profiles) Me.Controls.Add(Me.btn_install) Me.Controls.Add(Me.btn_launch) Me.Controls.Add(Me.btn_about) - Me.DockAreas = CType(((((WeifenLuo.WinFormsUI.Docking.DockAreas.Float Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft) _ - Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight) _ - Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop) _ - Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockBottom), WeifenLuo.WinFormsUI.Docking.DockAreas) + Me.DockAreas = CType((WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockBottom), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "ModuleControl" @@ -141,7 +123,6 @@ Partial Class ModuleControl End Sub Friend WithEvents btn_install As Button Friend WithEvents btn_launch As Button - Friend WithEvents cmb_profiles As ComboBox Friend WithEvents btn_about As Button Friend WithEvents btn_options As Button Friend WithEvents btn_find_mods As Button diff --git a/VMM/forms/Modules/ModuleControl.vb b/VMM/forms/Modules/ModuleControl.vb index 3bd3e4a..e361255 100644 --- a/VMM/forms/Modules/ModuleControl.vb +++ b/VMM/forms/Modules/ModuleControl.vb @@ -16,9 +16,9 @@ Public Class ModuleControl ' ##### Events ################################################################################ - Private Sub cmb_profiles_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmb_profiles.SelectedIndexChanged - handle_combobox() - End Sub + 'Private Sub cmb_profiles_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmb_profiles.SelectedIndexChanged + ' handle_combobox() + 'End Sub Private Sub btn_install_Click(sender As Object, e As EventArgs) Handles btn_install.Click RaiseEvent InstallFramework() @@ -46,12 +46,12 @@ Public Class ModuleControl update_ui(Args.Settings) End Sub - Public Sub UpdateProfiles(Args As main.ModuleArgs) - 'list_profiles(Args.Profiles) - 'cmb_profiles.SelectedItem = Args.SelectedProfile.Name - 'update_ui(Args.Settings) - update_profiles(Args) - End Sub + 'Public Sub UpdateProfiles(Args As main.ModuleArgs) + ' 'list_profiles(Args.Profiles) + ' 'cmb_profiles.SelectedItem = Args.SelectedProfile.Name + ' 'update_ui(Args.Settings) + ' update_profiles(Args) + 'End Sub ' ##### Functionality ################################################################################ @@ -64,31 +64,32 @@ Public Class ModuleControl btn_install.Image = My.Resources.uninstall_16 End If btn_install.Enabled = PathHelper.HasFiles(PathHelper.Mods) - cmb_profiles.Enabled = Settings.Patched And PathHelper.HasFiles(PathHelper.Mods) - End Sub - - Private Sub update_profiles(Args As main.ModuleArgs) - list_profiles(Args.Profiles) - cmb_profiles.SelectedItem = Args.SelectedProfile.Name - update_ui(Args.Settings) + btn_find_mods.Enabled = Settings.Patched And PathHelper.HasFiles(PathHelper.Repository) + 'cmb_profiles.Enabled = Settings.Patched And PathHelper.HasFiles(PathHelper.Mods) End Sub - Private Sub list_profiles(Profiles As List(Of VermintideProfile)) - cmb_profiles.Items.Clear() - cmb_profiles.Items.Add("[Manage]") - For Each p As VermintideProfile In Profiles - cmb_profiles.Items.Add(p.Name) - Next - End Sub - - Private Sub handle_combobox() - If cmb_profiles.SelectedIndex = 0 Then - cmb_profiles.SelectedIndex = exclude_manage - RaiseEvent ManageProfiles() - Else - exclude_manage = cmb_profiles.SelectedIndex - RaiseEvent SelectProfile(cmb_profiles.Items(cmb_profiles.SelectedIndex)) - End If - End Sub + 'Private Sub update_profiles(Args As main.ModuleArgs) + ' list_profiles(Args.Profiles) + ' cmb_profiles.SelectedItem = Args.SelectedProfile.Name + ' update_ui(Args.Settings) + 'End Sub + + 'Private Sub list_profiles(Profiles As List(Of VermintideProfile)) + ' cmb_profiles.Items.Clear() + ' cmb_profiles.Items.Add("[Manage]") + ' For Each p As VermintideProfile In Profiles + ' cmb_profiles.Items.Add(p.Name) + ' Next + 'End Sub + + 'Private Sub handle_combobox() + ' If cmb_profiles.SelectedIndex = 0 Then + ' cmb_profiles.SelectedIndex = exclude_manage + ' RaiseEvent ManageProfiles() + ' Else + ' exclude_manage = cmb_profiles.SelectedIndex + ' RaiseEvent SelectProfile(cmb_profiles.Items(cmb_profiles.SelectedIndex)) + ' End If + 'End Sub End Class \ No newline at end of file diff --git a/VMM/forms/Modules/ModuleDownload.Designer.vb b/VMM/forms/Modules/ModuleDownload.Designer.vb index d2c4303..1141b21 100644 --- a/VMM/forms/Modules/ModuleDownload.Designer.vb +++ b/VMM/forms/Modules/ModuleDownload.Designer.vb @@ -52,6 +52,7 @@ Partial Class ModuleDownload Me.ClientSize = New System.Drawing.Size(292, 54) Me.Controls.Add(Me.ProgressBar1) Me.Controls.Add(Me.Label1) + Me.DockAreas = CType((WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockBottom), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.Name = "ModuleDownload" Me.Text = "Download" Me.ResumeLayout(False) diff --git a/VMM/forms/Modules/ModuleModBrowser.Designer.vb b/VMM/forms/Modules/ModuleModBrowser.Designer.vb index 2320c0c..f3875ab 100644 --- a/VMM/forms/Modules/ModuleModBrowser.Designer.vb +++ b/VMM/forms/Modules/ModuleModBrowser.Designer.vb @@ -114,7 +114,6 @@ Partial Class ModuleModBrowser Me.col_type.Name = "col_type" Me.col_type.ReadOnly = True Me.col_type.Visible = False - Me.col_type.Width = 56 ' 'ModuleModBrowser ' @@ -125,6 +124,7 @@ Partial Class ModuleModBrowser Me.CloseButtonVisible = False Me.Controls.Add(Me.DataGridView1) Me.Controls.Add(Me.ComboBox1) + Me.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document Me.Name = "ModuleModBrowser" Me.Text = "Mod Browser" CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit() diff --git a/VMM/forms/Modules/ModuleModBrowser.vb b/VMM/forms/Modules/ModuleModBrowser.vb index b4f94c3..a73425c 100644 --- a/VMM/forms/Modules/ModuleModBrowser.vb +++ b/VMM/forms/Modules/ModuleModBrowser.vb @@ -63,6 +63,7 @@ Public Class ModuleModBrowser Private Sub list_files(Files As List(Of FileInfo)) RaiseEvent RequestCheckModsInstalled(Files) + Dim scroll As Integer = DataGridView1.FirstDisplayedScrollingRowIndex DataGridView1.Rows.Clear() For Each file As FileInfo In Files DataGridView1.Rows.Add(file.DisplayName, file.Version, String.Format("{0} KB", FormatNumber(file.Size / 1024, 2)), "", "", file.Type) @@ -84,6 +85,9 @@ Public Class ModuleModBrowser End If Next + If scroll >= 0 And scroll <= DataGridView1.Rows.Count Then + DataGridView1.FirstDisplayedScrollingRowIndex = scroll + End If End Sub Private Sub _fetcher_DoWork(sender As Object, e As DoWorkEventArgs) Handles _fetcher.DoWork diff --git a/VMM/forms/Modules/ModuleModContent.Designer.vb b/VMM/forms/Modules/ModuleModContent.Designer.vb index 227a51f..2cdf8de 100644 --- a/VMM/forms/Modules/ModuleModContent.Designer.vb +++ b/VMM/forms/Modules/ModuleModContent.Designer.vb @@ -86,6 +86,7 @@ Partial Class ModuleModContent Me.ClientSize = New System.Drawing.Size(292, 266) Me.CloseButtonVisible = False Me.Controls.Add(Me.TreeView1) + Me.DockAreas = CType((WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.Name = "ModuleModContent" Me.Text = "Content" Me.ContextMenuStrip1.ResumeLayout(False) diff --git a/VMM/forms/Modules/ModuleModContent.resx b/VMM/forms/Modules/ModuleModContent.resx index 1500929..3c4ac92 100644 --- a/VMM/forms/Modules/ModuleModContent.resx +++ b/VMM/forms/Modules/ModuleModContent.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC4 - DAAAAk1TRnQBSQFMAgEBBQEAATABAAEwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + DAAAAk1TRnQBSQFMAgEBBQEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/VMM/forms/Modules/ModuleModDownloader.Designer.vb b/VMM/forms/Modules/ModuleModDownloader.Designer.vb index f28964f..e7aeea2 100644 --- a/VMM/forms/Modules/ModuleModDownloader.Designer.vb +++ b/VMM/forms/Modules/ModuleModDownloader.Designer.vb @@ -24,6 +24,7 @@ Partial Class ModuleModDownloader 'Do not modify it using the code editor. _ Private Sub InitializeComponent() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.DataGridView1 = New System.Windows.Forms.DataGridView() Me.col_name = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.col_progress = New System.Windows.Forms.DataGridViewTextBoxColumn() @@ -36,11 +37,20 @@ Partial Class ModuleModDownloader Me.DataGridView1.AllowUserToDeleteRows = False Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.col_name, Me.col_progress}) + DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.DataGridView1.DefaultCellStyle = DataGridViewCellStyle2 Me.DataGridView1.Dock = System.Windows.Forms.DockStyle.Fill Me.DataGridView1.Location = New System.Drawing.Point(0, 0) Me.DataGridView1.Name = "DataGridView1" Me.DataGridView1.ReadOnly = True Me.DataGridView1.RowHeadersVisible = False + Me.DataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.DataGridView1.Size = New System.Drawing.Size(396, 343) Me.DataGridView1.TabIndex = 0 ' @@ -53,18 +63,23 @@ Partial Class ModuleModDownloader ' 'col_progress ' + Me.col_progress.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells Me.col_progress.HeaderText = "Progress" Me.col_progress.Name = "col_progress" Me.col_progress.ReadOnly = True + Me.col_progress.Width = 73 ' 'ModuleModDownloader ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(396, 343) + Me.CloseButton = False + Me.CloseButtonVisible = False Me.Controls.Add(Me.DataGridView1) + Me.DockAreas = CType((WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.Name = "ModuleModDownloader" - Me.Text = "ModuleModDownloader" + Me.Text = "Downloads" CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) diff --git a/VMM/forms/Modules/ModuleModDownloader.vb b/VMM/forms/Modules/ModuleModDownloader.vb index 378cf1f..aafa899 100644 --- a/VMM/forms/Modules/ModuleModDownloader.vb +++ b/VMM/forms/Modules/ModuleModDownloader.vb @@ -4,118 +4,21 @@ Imports VMM Public Class ModuleModDownloader - 'Public Class Download - ' Public Property DisplayName As String - ' Public Property Name As String - ' Public Property Address As String - ' Public Property Target As String - ' Public Property Temp As String - - ' Private WithEvents _client As New WebClient - - ' Public Event DownloadFinished(Download As Download) - ' Public Event ProgressChanged(Download As Download, Percentage As Integer) - - ' Public Sub New(File As ModuleModBrowser.file_info) - ' DisplayName = File.DisplayName - ' Name = File.Name - ' Address = String.Format("{0}{1}", ServerHelper._domain_url, File.File) - ' Target = String.Format("{0}/{1}", PathHelper.Mods, File.File) - ' Temp = String.Format("{0}{1}", PathHelper.Temp, File.File.Replace("/", "\")) - ' '_worker.WorkerSupportsCancellation = True - ' '_worker.WorkerReportsProgress = True - ' 'start_download() - ' End Sub - - ' Public Sub StartDownload() - ' start_download() - ' End Sub - - ' Private Sub start_download() - ' Try - ' If My.Computer.FileSystem.FileExists(Temp) Then - ' My.Computer.FileSystem.DeleteFile(Temp) - ' End If - ' _client.DownloadFileAsync(New Uri(Address), Temp) - ' Debug.Print(String.Format("Downloading mod {0} from {1} to {2} ...", DisplayName, Address, Temp)) - ' Catch ex As Exception - ' Debug.Print(ex.Message) - ' End Try - ' End Sub - - ' Private Sub _client_DownloadProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs) Handles _client.DownloadProgressChanged - ' 'RaiseEvent ProgressChanged() - ' Debug.Print(e.ProgressPercentage) - ' RaiseEvent ProgressChanged(Me, e.ProgressPercentage) - ' End Sub - - ' Private Sub _client_DownloadFileCompleted(sender As Object, e As AsyncCompletedEventArgs) Handles _client.DownloadFileCompleted - ' Debug.Print("Finished") - ' RaiseEvent DownloadFinished(Me) - ' End Sub - - 'End Class - - 'Private _downloads As List(Of Download) - Private WithEvents _downloader As New Downloader Public Event ModDownloaded(Path As String) - Public Sub New() - InitializeComponent() - '_downloads = New List(Of Download) - End Sub - - 'Public Sub AddDownload(DisplayName As String, Name As String, Address As String, Target As String) - ' _downloads.Add(New Download(Name, Address, Target)) - ' Dim download As Download = _downloads(_downloads.Count - 1) - ' new_downloads(New List(Of Download)({download})) - 'End Sub - Public Sub AddDownload(Downloads As List(Of Download)) _downloader.AddDownloads(Downloads) - '_downloads.Add(Download) - 'AddHandler Download.DownloadFinished, AddressOf download_finished - 'AddHandler Download.ProgressChanged, AddressOf download_progress_changed new_downloads(Downloads) - 'Download.StartDownload() End Sub - 'Public Sub AddDownloads(Downloads As List(Of Download)) - ' _downloads.AddRange(Downloads) - ' new_downloads(Downloads) - 'End Sub - - 'Private Sub download_finished(Download As Download) - ' _downloads.Remove(Download) - ' For Each Row As DataGridViewRow In DataGridView1.Rows - ' Dim dl As Download = Row.Tag - ' If Not IsNothing(dl) Then - ' If Download.Name = dl.Name Then - ' 'DataGridView1.Rows.Remove(Row) - ' Exit Sub - ' End If - ' End If - ' Next - 'End Sub - - 'Private Sub download_progress_changed(Download As Download, Percentage As Integer) - ' For Each Row As DataGridViewRow In DataGridView1.Rows - ' Dim dl As Download = Row.Tag - ' If Not IsNothing(dl) Then - ' If Download.Name = dl.Name Then - ' Row.Cells(1).Value = Percentage - ' End If - ' End If - ' Next - 'End Sub - Private Sub new_downloads(Downloads As List(Of Download)) For Each download As Download In Downloads DataGridView1.Rows.Add(download.Name, "") Dim row As DataGridViewRow = DataGridView1.Rows(DataGridView1.Rows.Count - 1) row.Tag = download + Next End Sub @@ -134,7 +37,12 @@ Public Class ModuleModDownloader Dim dl As Download = Row.Tag If Not IsNothing(dl) Then If Download.Name = dl.Name Then - DataGridView1.Rows.Remove(Row) + Dim Icon As New DataGridViewImageCell + Icon.Value = My.Resources.install_16 + Icon.Style.Padding = New Padding(6, 0, 0, 0) + Icon.ImageLayout = DataGridViewImageCellLayout.Normal + Icon.Style.Alignment = DataGridViewContentAlignment.MiddleCenter + Row.Cells(1) = Icon Exit For End If End If @@ -152,7 +60,7 @@ Public Class ModuleModDownloader For Each Row As DataGridViewRow In DataGridView1.Rows Dim dl As Download = Row.Tag If Not IsNothing(dl) Then - If Download.Name = dl.Name Then + If Download.Name = dl.Name And TypeOf (Row.Cells(1).Value) Is String Then Row.Cells(1).Value = Percentage End If End If diff --git a/VMM/forms/Modules/ModuleModFinder.Designer.vb b/VMM/forms/Modules/ModuleModFinder.Designer.vb index dbe0d07..b3ac1c7 100644 --- a/VMM/forms/Modules/ModuleModFinder.Designer.vb +++ b/VMM/forms/Modules/ModuleModFinder.Designer.vb @@ -48,6 +48,7 @@ Partial Class ModuleModFinder Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(276, 253) Me.Controls.Add(Me.DockPanel1) + Me.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document Me.HideOnClose = True Me.Name = "ModuleModFinder" Me.Text = "Mod Finder" diff --git a/VMM/forms/Modules/ModuleModList.Designer.vb b/VMM/forms/Modules/ModuleModList.Designer.vb index bda89ab..027867e 100644 --- a/VMM/forms/Modules/ModuleModList.Designer.vb +++ b/VMM/forms/Modules/ModuleModList.Designer.vb @@ -38,6 +38,10 @@ Partial Class ModuleModList Me.ActivateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DeactivateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.SwapToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.cmb_profiles = New System.Windows.Forms.ComboBox() + Me.lbl_profile = New System.Windows.Forms.Label() + Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() + Me.DeleteToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() CType(Me.MetroGrid1, System.ComponentModel.ISupportInitialize).BeginInit() Me.ContextMenuStrip1.SuspendLayout() Me.SuspendLayout() @@ -47,16 +51,18 @@ Partial Class ModuleModList Me.MetroGrid1.AllowUserToAddRows = False Me.MetroGrid1.AllowUserToDeleteRows = False Me.MetroGrid1.AllowUserToResizeRows = False + Me.MetroGrid1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.MetroGrid1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.MetroGrid1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.col_image, Me.col_name, Me.col_author, Me.col_version, Me.col_readme, Me.col_1, Me.col_2}) Me.MetroGrid1.Cursor = System.Windows.Forms.Cursors.Hand - Me.MetroGrid1.Dock = System.Windows.Forms.DockStyle.Fill - Me.MetroGrid1.Location = New System.Drawing.Point(0, 0) + Me.MetroGrid1.Location = New System.Drawing.Point(0, 30) Me.MetroGrid1.Name = "MetroGrid1" Me.MetroGrid1.ReadOnly = True Me.MetroGrid1.RowHeadersVisible = False Me.MetroGrid1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect - Me.MetroGrid1.Size = New System.Drawing.Size(511, 342) + Me.MetroGrid1.Size = New System.Drawing.Size(511, 312) Me.MetroGrid1.TabIndex = 1 ' 'col_image @@ -114,9 +120,9 @@ Partial Class ModuleModList ' 'ContextMenuStrip1 ' - Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ActivateToolStripMenuItem, Me.DeactivateToolStripMenuItem, Me.SwapToolStripMenuItem}) + Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ActivateToolStripMenuItem, Me.DeactivateToolStripMenuItem, Me.SwapToolStripMenuItem, Me.ToolStripSeparator1, Me.DeleteToolStripMenuItem}) Me.ContextMenuStrip1.Name = "ContextMenuStrip1" - Me.ContextMenuStrip1.Size = New System.Drawing.Size(130, 70) + Me.ContextMenuStrip1.Size = New System.Drawing.Size(153, 120) ' 'ActivateToolStripMenuItem ' @@ -139,6 +145,42 @@ Partial Class ModuleModList Me.SwapToolStripMenuItem.Size = New System.Drawing.Size(129, 22) Me.SwapToolStripMenuItem.Text = "Swap" ' + 'cmb_profiles + ' + Me.cmb_profiles.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.cmb_profiles.Cursor = System.Windows.Forms.Cursors.Hand + Me.cmb_profiles.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.cmb_profiles.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmb_profiles.FormattingEnabled = True + Me.cmb_profiles.Location = New System.Drawing.Point(67, 0) + Me.cmb_profiles.Name = "cmb_profiles" + Me.cmb_profiles.Size = New System.Drawing.Size(444, 28) + Me.cmb_profiles.TabIndex = 2 + ' + 'lbl_profile + ' + Me.lbl_profile.AutoSize = True + Me.lbl_profile.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lbl_profile.Location = New System.Drawing.Point(2, 3) + Me.lbl_profile.Name = "lbl_profile" + Me.lbl_profile.Size = New System.Drawing.Size(62, 24) + Me.lbl_profile.TabIndex = 3 + Me.lbl_profile.Text = "Profile" + ' + 'ToolStripSeparator1 + ' + Me.ToolStripSeparator1.Name = "ToolStripSeparator1" + Me.ToolStripSeparator1.Size = New System.Drawing.Size(149, 6) + Me.ToolStripSeparator1.Visible = False + ' + 'DeleteToolStripMenuItem + ' + Me.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem" + Me.DeleteToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.DeleteToolStripMenuItem.Text = "Delete" + Me.DeleteToolStripMenuItem.Visible = False + ' 'ModuleModList ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -146,13 +188,17 @@ Partial Class ModuleModList Me.ClientSize = New System.Drawing.Size(511, 342) Me.CloseButton = False Me.CloseButtonVisible = False + Me.Controls.Add(Me.lbl_profile) + Me.Controls.Add(Me.cmb_profiles) Me.Controls.Add(Me.MetroGrid1) + Me.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "ModuleModList" Me.Text = "Mods" CType(Me.MetroGrid1, System.ComponentModel.ISupportInitialize).EndInit() Me.ContextMenuStrip1.ResumeLayout(False) Me.ResumeLayout(False) + Me.PerformLayout() End Sub Friend WithEvents MetroGrid1 As DataGridView @@ -167,4 +213,8 @@ Partial Class ModuleModList Friend WithEvents ActivateToolStripMenuItem As ToolStripMenuItem Friend WithEvents DeactivateToolStripMenuItem As ToolStripMenuItem Friend WithEvents SwapToolStripMenuItem As ToolStripMenuItem + Friend WithEvents cmb_profiles As ComboBox + Friend WithEvents lbl_profile As Label + Friend WithEvents ToolStripSeparator1 As ToolStripSeparator + Friend WithEvents DeleteToolStripMenuItem As ToolStripMenuItem End Class diff --git a/VMM/forms/Modules/ModuleModList.resx b/VMM/forms/Modules/ModuleModList.resx index 02b70d5..43eb879 100644 --- a/VMM/forms/Modules/ModuleModList.resx +++ b/VMM/forms/Modules/ModuleModList.resx @@ -138,6 +138,27 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + 182, 17 diff --git a/VMM/forms/Modules/ModuleModList.vb b/VMM/forms/Modules/ModuleModList.vb index d11b6b7..585658b 100644 --- a/VMM/forms/Modules/ModuleModList.vb +++ b/VMM/forms/Modules/ModuleModList.vb @@ -5,6 +5,8 @@ Imports Newtonsoft.Json Public Class ModuleModList + Private exclude_manage As Integer + Public Event SaveProfile() Public Event ShowReadMe(Text As String) Public Event Output(Text As String) @@ -13,6 +15,8 @@ Public Class ModuleModList Public Event RequestRefreshList() Public Event InstallMods() + Public Event ManageProfiles() + ' ##### Events ################################################################################ Private Sub Mods_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown @@ -36,8 +40,40 @@ Public Class ModuleModList select_mod() End Sub + Private Sub cmb_profiles_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmb_profiles.SelectedIndexChanged + handle_combobox() + End Sub + + Public Sub UpdateProfiles(Args As main.ModuleArgs) + update_profiles(Args) + End Sub + + Private Sub update_profiles(Args As main.ModuleArgs) + list_profiles(Args.Profiles) + cmb_profiles.SelectedItem = Args.SelectedProfile.Name + UpdateUI(Args) + End Sub + + Private Sub list_profiles(Profiles As List(Of VermintideProfile)) + cmb_profiles.Items.Clear() + cmb_profiles.Items.Add("[Manage]") + For Each p As VermintideProfile In Profiles + cmb_profiles.Items.Add(p.Name) + Next + End Sub + + Private Sub handle_combobox() + If cmb_profiles.SelectedIndex = 0 Then + cmb_profiles.SelectedIndex = exclude_manage + RaiseEvent ManageProfiles() + Else + exclude_manage = cmb_profiles.SelectedIndex + RaiseEvent SelectProfile(cmb_profiles.Items(cmb_profiles.SelectedIndex)) + End If + End Sub + Private Sub MetroGrid1_CellMouseDown(sender As Object, e As DataGridViewCellMouseEventArgs) Handles MetroGrid1.CellMouseDown - If e.RowIndex >= 0 And e.Button = MouseButtons.Right Then + If e.RowIndex >= 0 And e.Button = MouseButtons.Right And Not MetroGrid1.Rows(e.RowIndex).Selected Then MetroGrid1.ClearSelection() MetroGrid1.Rows(e.RowIndex).Selected = True End If @@ -82,6 +118,7 @@ Public Class ModuleModList Public Sub UpdateUI(Args As main.ModuleArgs) MetroGrid1.Enabled = Args.Settings.Patched + cmb_profiles.Enabled = Args.Settings.Patched And PathHelper.HasFiles(PathHelper.Mods) End Sub Public Sub SelectedProfile(Args As main.ModuleArgs) @@ -93,8 +130,13 @@ Public Class ModuleModList End Sub Public Sub RefreshList(Args As main.ModuleArgs) + Dim scroll As Integer = MetroGrid1.FirstDisplayedScrollingRowIndex list_mods(Args) + select_mod() RaiseEvent SelectProfile("") + If scroll >= 0 And scroll <= MetroGrid1.Rows.Count Then + MetroGrid1.FirstDisplayedScrollingRowIndex = scroll + End If 'RaiseEvent Output("Latest mod files were downloaded.") End Sub diff --git a/VMM/forms/Modules/ModuleMods.Designer.vb b/VMM/forms/Modules/ModuleMods.Designer.vb index ea06836..16d4cda 100644 --- a/VMM/forms/Modules/ModuleMods.Designer.vb +++ b/VMM/forms/Modules/ModuleMods.Designer.vb @@ -50,6 +50,7 @@ Partial Class ModuleMods Me.CloseButton = False Me.CloseButtonVisible = False Me.Controls.Add(Me.DockPanel1) + Me.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document Me.Name = "ModuleMods" Me.Text = "Mod List" Me.ResumeLayout(False) diff --git a/VMM/forms/Modules/ModuleMods.vb b/VMM/forms/Modules/ModuleMods.vb index d41251e..07ca94f 100644 --- a/VMM/forms/Modules/ModuleMods.vb +++ b/VMM/forms/Modules/ModuleMods.vb @@ -19,12 +19,20 @@ Public Class ModuleMods Public Event RequestOpenSource() Public Event Output(Text As String) + Public Event ManageProfiles() + Private Sub _mod_list_Output(Text As String) Handles _mod_list.Output, _requirements.Output RaiseEvent Output(Text) End Sub + Public Sub UpdateProfiles(Args As main.ModuleArgs) + _mod_list.UpdateProfiles(Args) + End Sub + Public Sub UpdateData(Args As main.ModuleArgs) _mod_list.UpdateUI(Args) + '_mod_list.UpdateMods() + _mod_list.RefreshList(Args) End Sub Public Sub New() @@ -91,32 +99,36 @@ Public Class ModuleMods 'Else ' _output.Show(DockPanel1, DockState.DockBottom) 'End If + Me.SuspendLayout() + DockPanel1.SuspendLayout() If Args.Settings.HideModule.Contains("ReadMe") Then - _read_me.Show(DockPanel1, DockState.DockRightAutoHide) + If Not _read_me.DockState = DockState.DockRightAutoHide Then _read_me.Show(DockPanel1, DockState.DockRightAutoHide) Else - _read_me.Show(DockPanel1, DockState.DockRight) + If Not _read_me.DockState = DockState.DockRight Then _read_me.Show(DockPanel1, DockState.DockRight) _pane = _read_me.Pane End If If Args.Settings.HideModule.Contains("Requirements") Then - _requirements.Show(DockPanel1, DockState.DockRightAutoHide) + If Not _requirements.DockState = DockState.DockRightAutoHide Then _requirements.Show(DockPanel1, DockState.DockRightAutoHide) Else If Not IsNothing(_pane) Then - _requirements.Show(_pane, DockAlignment.Bottom, 0.6) + If Not _requirements.VisibleState = DockState.DockRight Then _requirements.Show(_pane, DockAlignment.Bottom, 0.6) Else - _requirements.Show(DockPanel1, DockState.DockRight) + If Not _requirements.DockState = DockState.DockRight Then _requirements.Show(DockPanel1, DockState.DockRight) End If _pane = _requirements.Pane End If If Args.Settings.HideModule.Contains("Content") Then - _content.Show(DockPanel1, DockState.DockRightAutoHide) + If Not _content.DockState = DockState.DockRightAutoHide Then _content.Show(DockPanel1, DockState.DockRightAutoHide) Else If Not IsNothing(_pane) Then - _content.Show(_pane, DockAlignment.Bottom, 0.5) + If Not _content.VisibleState = DockState.DockRight Then _content.Show(_pane, DockAlignment.Bottom, 0.5) Else - _content.Show(DockPanel1, DockState.DockRight) + If Not _content.DockState = DockState.DockRight Then _content.Show(DockPanel1, DockState.DockRight) End If _pane = _content.Pane End If + DockPanel1.ResumeLayout() + Me.ResumeLayout() End Sub @@ -164,4 +176,8 @@ Public Class ModuleMods RaiseEvent RequestOpenSource() End Sub + Private Sub _mod_list_ManageProfiles() Handles _mod_list.ManageProfiles + RaiseEvent ManageProfiles() + End Sub + End Class \ No newline at end of file diff --git a/VMM/forms/Modules/ModuleOptions.Designer.vb b/VMM/forms/Modules/ModuleOptions.Designer.vb index 3d4bd8d..d3f2a33 100644 --- a/VMM/forms/Modules/ModuleOptions.Designer.vb +++ b/VMM/forms/Modules/ModuleOptions.Designer.vb @@ -62,9 +62,9 @@ Partial Class ModuleOptions 'tab_view ' Me.tab_view.Controls.Add(Me.grp_modules) - Me.tab_view.Location = New System.Drawing.Point(4, 24) + Me.tab_view.Location = New System.Drawing.Point(4, 22) Me.tab_view.Name = "tab_view" - Me.tab_view.Size = New System.Drawing.Size(353, 446) + Me.tab_view.Size = New System.Drawing.Size(353, 448) Me.tab_view.TabIndex = 1 Me.tab_view.Text = "View" Me.tab_view.UseVisualStyleBackColor = True @@ -119,10 +119,10 @@ Partial Class ModuleOptions 'tab_development ' Me.tab_development.Controls.Add(Me.grp_mod_repository) - Me.tab_development.Location = New System.Drawing.Point(4, 24) + Me.tab_development.Location = New System.Drawing.Point(4, 22) Me.tab_development.Name = "tab_development" Me.tab_development.Padding = New System.Windows.Forms.Padding(3) - Me.tab_development.Size = New System.Drawing.Size(353, 446) + Me.tab_development.Size = New System.Drawing.Size(353, 448) Me.tab_development.TabIndex = 0 Me.tab_development.Text = "Development" Me.tab_development.UseVisualStyleBackColor = True @@ -199,6 +199,7 @@ Partial Class ModuleOptions Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(363, 476) Me.Controls.Add(Me.Panel1) + Me.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document Me.HideOnClose = True Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "ModuleOptions" diff --git a/VMM/forms/Modules/ModuleOutput.Designer.vb b/VMM/forms/Modules/ModuleOutput.Designer.vb index c91d7b6..4f25e8b 100644 --- a/VMM/forms/Modules/ModuleOutput.Designer.vb +++ b/VMM/forms/Modules/ModuleOutput.Designer.vb @@ -63,6 +63,9 @@ Partial Class ModuleOutput Me.ClientSize = New System.Drawing.Size(292, 270) Me.CloseButtonVisible = False Me.Controls.Add(Me.RichTextBox1) + Me.DockAreas = CType((((WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight) _ + Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop) _ + Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockBottom), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "ModuleOutput" Me.Text = "Output" diff --git a/VMM/forms/Modules/ModuleProfileManager.Designer.vb b/VMM/forms/Modules/ModuleProfileManager.Designer.vb index dbfab48..15830b0 100644 --- a/VMM/forms/Modules/ModuleProfileManager.Designer.vb +++ b/VMM/forms/Modules/ModuleProfileManager.Designer.vb @@ -121,15 +121,16 @@ Partial Class ModuleProfileManager Me.DeleteToolStripMenuItem.Size = New System.Drawing.Size(130, 22) Me.DeleteToolStripMenuItem.Text = "Delete" ' - 'ProfileManager + 'ModuleProfileManager ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(441, 252) Me.Controls.Add(Me.grd_profiles) + Me.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document Me.HideOnClose = True Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) - Me.Name = "ProfileManager" + Me.Name = "ModuleProfileManager" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "Profile Manager" CType(Me.grd_profiles, System.ComponentModel.ISupportInitialize).EndInit() diff --git a/VMM/forms/Modules/ModuleReadMe.Designer.vb b/VMM/forms/Modules/ModuleReadMe.Designer.vb index e4e1bf9..f3370c8 100644 --- a/VMM/forms/Modules/ModuleReadMe.Designer.vb +++ b/VMM/forms/Modules/ModuleReadMe.Designer.vb @@ -50,6 +50,7 @@ Partial Class ModuleReadMe Me.ClientSize = New System.Drawing.Size(683, 440) Me.CloseButtonVisible = False Me.Controls.Add(Me.txt_readme) + Me.DockAreas = CType((WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "ModuleReadMe" Me.Text = "ReadMe" diff --git a/VMM/forms/Modules/ModuleRequirements.Designer.vb b/VMM/forms/Modules/ModuleRequirements.Designer.vb index d8de261..e734de5 100644 --- a/VMM/forms/Modules/ModuleRequirements.Designer.vb +++ b/VMM/forms/Modules/ModuleRequirements.Designer.vb @@ -117,6 +117,7 @@ Partial Class ModuleRequirements Me.CloseButtonVisible = False Me.Controls.Add(Me.lbl_no_requirements) Me.Controls.Add(Me.grd_requirements) + Me.DockAreas = CType((WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.Name = "ModuleRequirements" Me.Text = "Requirements" CType(Me.grd_requirements, System.ComponentModel.ISupportInitialize).EndInit() diff --git a/VMM/forms/Modules/ModuleRequirements.resx b/VMM/forms/Modules/ModuleRequirements.resx index 00caf15..04e98de 100644 --- a/VMM/forms/Modules/ModuleRequirements.resx +++ b/VMM/forms/Modules/ModuleRequirements.resx @@ -126,15 +126,6 @@ True - - True - - - True - - - True - 17, 17 @@ -143,7 +134,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABU - CgAAAk1TRnQBSQFMAgEBAgEAATABAAEwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CgAAAk1TRnQBSQFMAgEBAgEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/VMM/forms/Modules/ModuleWarning.Designer.vb b/VMM/forms/Modules/ModuleWarning.Designer.vb index 86505f3..e03ee76 100644 --- a/VMM/forms/Modules/ModuleWarning.Designer.vb +++ b/VMM/forms/Modules/ModuleWarning.Designer.vb @@ -63,6 +63,7 @@ Partial Class ModuleWarning Me.ClientSize = New System.Drawing.Size(292, 266) Me.Controls.Add(Me.btn_solve) Me.Controls.Add(Me.lbl_warning) + Me.DockAreas = CType((WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop Or WeifenLuo.WinFormsUI.Docking.DockAreas.DockBottom), WeifenLuo.WinFormsUI.Docking.DockAreas) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "ModuleWarning" Me.Text = "Warning" diff --git a/VMM/function/Helpers/ServerHelper.vb b/VMM/function/Helpers/ServerHelper.vb index c479f9b..be1bfb0 100644 --- a/VMM/function/Helpers/ServerHelper.vb +++ b/VMM/function/Helpers/ServerHelper.vb @@ -23,7 +23,9 @@ Public Class Download End Sub Public Sub StartDownload() - start_download() + If Not _client.IsBusy Then + start_download() + End If End Sub Private Sub start_download() diff --git a/VMM/function/Version.vb b/VMM/function/Version.vb index 38dcec3..74390bd 100644 --- a/VMM/function/Version.vb +++ b/VMM/function/Version.vb @@ -2,7 +2,7 @@ Public Const major As Integer = 0 Public Const minor As Integer = 5 - Public Const patch As Integer = 22 + Public Const patch As Integer = 23 Public ReadOnly Property Current() As String Get