From cf383b0d176c9fee4e1d299638b4d25707b5aab1 Mon Sep 17 00:00:00 2001 From: le huy hoang Date: Mon, 18 Jan 2016 17:43:53 +0700 Subject: [PATCH 1/5] Update Coordinates.json Work in Champion Select --- LoLMasteryManager/Coordinates.json | 162 ++++++++++++++--------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/LoLMasteryManager/Coordinates.json b/LoLMasteryManager/Coordinates.json index d6186ba..3f4249b 100644 --- a/LoLMasteryManager/Coordinates.json +++ b/LoLMasteryManager/Coordinates.json @@ -1,87 +1,87 @@ { - "reference_client_size": "1280, 800", + "reference_client_size": "1152, 720", "mastery_coordinates_menu": { - "6111": "387, 267", - "6114": "521, 267", - "6121": "422, 339", - "6122": "489, 339", - "6131": "388, 410", - "6134": "522, 410", - "6141": "422, 481", - "6142": "489, 481", - "6151": "388, 552", - "6154": "522, 552", - "6161": "388, 623", - "6162": "455, 623", - "6164": "522, 623", - "6211": "937, 267", - "6212": "1071, 267", - "6221": "972, 339", - "6223": "1039, 339", - "6231": "938, 410", - "6232": "1072, 410", - "6241": "972, 481", - "6242": "1039, 481", - "6251": "938, 552", - "6252": "1072, 552", - "6261": "938, 623", - "6262": "1005, 623", - "6263": "1072, 623", - "6311": "662, 267", - "6312": "796, 267", - "6321": "663, 339", - "6322": "730, 339", - "6323": "797, 339", - "6331": "663, 410", - "6332": "797, 410", - "6342": "697, 481", - "6343": "764, 481", - "6351": "663, 552", - "6352": "797, 552", - "6361": "663, 623", - "6362": "730, 623", - "6363": "797, 623" + "6111": "350,245", + "6114": "470,245", + "6121": "385,310", + "6122": "445,310", + "6131": "350,371", + "6134": "471,371", + "6141": "385,435", + "6142": "440,435", + "6151": "348,500", + "6154": "470,500", + "6161": "354,565", + "6162": "410,565", + "6164": "475,565", + "6211": "846,247", + "6212": "965,247", + "6221": "883,310", + "6223": "940,310", + "6231": "843,370", + "6232": "965,370", + "6241": "879,436", + "6242": "937,436", + "6251": "840,500", + "6252": "963,500", + "6261": "848,560", + "6262": "905,560", + "6263": "970,560", + "6311": "595,242", + "6312": "720,242", + "6321": "602,312", + "6322": "658,312", + "6323": "723,312", + "6331": "596,370", + "6332": "717,370", + "6342": "632,438", + "6343": "689,438", + "6351": "596,500", + "6352": "717,500", + "6361": "600,567", + "6362": "663,563", + "6363": "721,566" }, "mastery_coordinates_champion_select": { - "6111": "397, 186", - "6114": "531, 186", - "6121": "432, 258", - "6122": "499, 258", - "6131": "398, 329", - "6134": "532, 329", - "6141": "432, 400", - "6142": "499, 400", - "6151": "398, 471", - "6154": "532, 471", - "6161": "398, 542", - "6162": "465, 542", - "6164": "532, 542", - "6211": "947, 186", - "6212": "1081, 186", - "6221": "982, 258", - "6223": "1049, 258", - "6231": "948, 329", - "6232": "1082, 329", - "6241": "982, 400", - "6242": "1049, 400", - "6251": "948, 471", - "6252": "1082, 471", - "6261": "948, 542", - "6262": "1015, 542", - "6263": "1082, 542", - "6311": "672, 186", - "6312": "806, 186", - "6321": "673, 258", - "6322": "740, 258", - "6323": "807, 258", - "6331": "673, 329", - "6332": "807, 329", - "6342": "707, 400", - "6343": "774, 400", - "6351": "673, 471", - "6352": "807, 471", - "6361": "673, 542", - "6362": "740, 542", - "6363": "807, 542" + "6111": "364, 200", + "6114": "485, 200", + "6121": "398, 270", + "6122": "463, 270", + "6131": "371, 330", + "6134": "487, 330", + "6141": "404, 390", + "6142": "456, 390", + "6151": "366, 460", + "6154": "490, 460", + "6161": "369, 520", + "6162": "426, 520", + "6164": "488, 520", + "6211": "864, 200", + "6212": "986, 200", + "6221": "895, 260", + "6223": "954, 260", + "6231": "858, 325", + "6232": "981, 325", + "6241": "896, 395", + "6242": "953, 395", + "6251": "864, 455", + "6252": "978, 455", + "6261": "861, 520", + "6262": "920, 520", + "6263": "983, 520", + "6311": "614, 200", + "6312": "737, 200", + "6321": "618, 265", + "6322": "679, 265", + "6323": "736, 265", + "6331": "613, 325", + "6332": "733, 325", + "6342": "650, 390", + "6343": "706, 390", + "6351": "614, 455", + "6352": "739, 455", + "6361": "618, 520", + "6362": "675, 520", + "6363": "735, 520" } } From 806d1e693bf57e2dc8ea2566c633641aaa2a21a1 Mon Sep 17 00:00:00 2001 From: hoang0109 Date: Sat, 6 Feb 2016 23:16:49 +0700 Subject: [PATCH 2/5] Chinh sua giao dien, them Clien Name, Kieu Select, Change Size Lol --- LoLMasteryManager/Admin.vb | 8 +- .../ClientControls/ClientControls.vb | 4 +- .../ClientMasteryPageNameInputField.vb | 20 ++- .../ClientReturnPointsButton.vb | 25 ++-- .../ClientSaveMasteriesButton.vb | 26 ++-- LoLMasteryManager/Main.Designer.vb | 115 +++++++++++++----- LoLMasteryManager/Main.vb | 87 +++++++++---- LoLMasteryManager/MasteryAssigner.vb | 110 +++++++---------- LoLMasteryManager/MasteryManager.vb | 3 +- .../Models/MasteryCoordinates.vb | 3 + .../My Project/Resources.Designer.vb | 15 ++- 11 files changed, 236 insertions(+), 180 deletions(-) diff --git a/LoLMasteryManager/Admin.vb b/LoLMasteryManager/Admin.vb index ac48cdd..9ccb60d 100644 --- a/LoLMasteryManager/Admin.vb +++ b/LoLMasteryManager/Admin.vb @@ -9,9 +9,9 @@ Public Class Admin Dim oMasteryCoordinatesFile As New MasteryCoordinatesFile - Dim sMenuScreenshotPath As String = "D:\Google Drive\LoL Mastery Manager\Client - Menu.png" - Dim sChampionSelectScreenshotPath As String = "D:\Google Drive\LoL Mastery Manager\Client - Champion Select.png" - Dim sMasteryIconDirectory As String = "D:\Google Drive\LoL Mastery Manager\Masteries" + Dim sMenuScreenshotPath As String = "D:\LoL Mastery Manager\Client - Menu.png" + Dim sChampionSelectScreenshotPath As String = "D:\LoL Mastery Manager\Client - Champion Select.png" + Dim sMasteryIconDirectory As String = "D:\LoL Mastery Manager\Masteries" Dim oLocator As New MasteryLocator Dim oMasteryCoordinateFile As New MasteryCoordinatesFile @@ -73,7 +73,7 @@ Public Class Admin Try - Dim sMasteryCoordinatesPath As String = Path.Combine("D:\Google Drive\LoL Mastery Manager", "Coordinates.json") + Dim sMasteryCoordinatesPath As String = Path.Combine("D:\LoL Mastery Manager", "Coordinates.json") Dim sMasteryCoordinatesJson As String = JsonConvert.SerializeObject(masteryCoordinateListFile) Using oStreamWriter As New StreamWriter(sMasteryCoordinatesPath) diff --git a/LoLMasteryManager/ClientControls/ClientControls.vb b/LoLMasteryManager/ClientControls/ClientControls.vb index 3455e3f..7db5aaf 100644 --- a/LoLMasteryManager/ClientControls/ClientControls.vb +++ b/LoLMasteryManager/ClientControls/ClientControls.vb @@ -11,8 +11,8 @@ Public Structure Medium - Public Const Width As Integer = 1280 - Public Const Height As Integer = 800 + Public Const Width As Integer = 1152 + Public Const Height As Integer = 720 End Structure diff --git a/LoLMasteryManager/ClientControls/ClientMasteryPageNameInputField.vb b/LoLMasteryManager/ClientControls/ClientMasteryPageNameInputField.vb index f675aec..f56122c 100644 --- a/LoLMasteryManager/ClientControls/ClientMasteryPageNameInputField.vb +++ b/LoLMasteryManager/ClientControls/ClientMasteryPageNameInputField.vb @@ -5,28 +5,22 @@ Public Const Width As Integer = 165 Public Const Height As Integer = 20 - Public Structure ChampionSelect + Public Structure ChampionSelect_Old - Public Structure Small - Public Const X As Double = ClientSize.Small.Width / 112 - Public Const Y As Double = ClientSize.Small.Height / 165 + Public Const X As Double = ClientSize.Medium.Width / 128 + Public Const Y As Double = ClientSize.Medium.Height / 190 - End Structure - Public Structure Medium - Public Const X As Double = ClientSize.Medium.Width / 132 - Public Const Y As Double = ClientSize.Medium.Height / 172 + End Structure + Public Structure ChampionSelect - End Structure - Public Structure Large + Public Const X As Double = ClientSize.Medium.Width / 115 + Public Const Y As Double = ClientSize.Medium.Height / 103 - Public Const X As Double = ClientSize.Large.Width / 70 - Public Const Y As Double = ClientSize.Medium.Height / 150 - End Structure End Structure diff --git a/LoLMasteryManager/ClientControls/ClientReturnPointsButton.vb b/LoLMasteryManager/ClientControls/ClientReturnPointsButton.vb index ac87962..4515316 100644 --- a/LoLMasteryManager/ClientControls/ClientReturnPointsButton.vb +++ b/LoLMasteryManager/ClientControls/ClientReturnPointsButton.vb @@ -5,31 +5,20 @@ Public Const Width As Integer = 175 Public Const Height As Integer = 25 - Public Structure ChampionSelect - - Public Structure Small - - Public Const X As Double = ClientSize.Small.Width / 120 - Public Const Y As Double = ClientSize.Small.Height / 285 - - End Structure + Public Structure ChampionSelect_Old - Public Structure Medium + Public Const X As Double = ClientSize.Medium.Width / 139 + Public Const Y As Double = ClientSize.Medium.Height / 325 - Public Const X As Double = ClientSize.Medium.Width / 145 - Public Const Y As Double = ClientSize.Medium.Height / 325 - End Structure - - Public Structure Large + End Structure + Public Structure ChampionSelect - Public Const X As Double = ClientSize.Large.Width / 85 - Public Const Y As Double = ClientSize.Large.Height / 320 + Public Const X As Double = ClientSize.Medium.Width / 126 + Public Const Y As Double = ClientSize.Medium.Height / 245 - End Structure End Structure - Public Structure Menu Public Const X As Double = ClientSize.Small.Width / 105 diff --git a/LoLMasteryManager/ClientControls/ClientSaveMasteriesButton.vb b/LoLMasteryManager/ClientControls/ClientSaveMasteriesButton.vb index b1a7b82..89b9909 100644 --- a/LoLMasteryManager/ClientControls/ClientSaveMasteriesButton.vb +++ b/LoLMasteryManager/ClientControls/ClientSaveMasteriesButton.vb @@ -5,28 +5,16 @@ Public Const Width As Integer = 175 Public Const Height As Integer = 25 - Public Structure ChampionSelect - - Public Structure Small - - Public Const X As Double = ClientSize.Small.Width / 120 - Public Const Y As Double = ClientSize.Small.Height / 265 - - End Structure - - Public Structure Medium + Public Structure ChampionSelect_Old - Public Const X As Double = ClientSize.Medium.Width / 145 - Public Const Y As Double = ClientSize.Medium.Height / 295 + Public Const X As Double = ClientSize.Medium.Width / 145 + Public Const Y As Double = ClientSize.Medium.Height / 300 - End Structure - - Public Structure Large - - Public Const X As Double = ClientSize.Large.Width / 85 - Public Const Y As Double = ClientSize.Large.Height / 285 + End Structure + Public Structure ChampionSelect - End Structure + Public Const X As Double = ClientSize.Medium.Width / 126 + Public Const Y As Double = ClientSize.Medium.Height / 217 End Structure diff --git a/LoLMasteryManager/Main.Designer.vb b/LoLMasteryManager/Main.Designer.vb index 9f7bd2c..2bdaac6 100644 --- a/LoLMasteryManager/Main.Designer.vb +++ b/LoLMasteryManager/Main.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class Main Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,7 +20,7 @@ Partial Class Main 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. - _ + Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Main)) Me.cboChampion = New System.Windows.Forms.ComboBox() @@ -30,15 +30,20 @@ Partial Class Main Me.lblRole = New System.Windows.Forms.Label() Me.lblStats = New System.Windows.Forms.Label() Me.btnAssignMasteries = New System.Windows.Forms.Button() - Me.chkInChampionSelect = New System.Windows.Forms.CheckBox() Me.lblVersion = New System.Windows.Forms.LinkLabel() Me.lblClientVersion = New System.Windows.Forms.LinkLabel() + Me.CbClienName = New System.Windows.Forms.ComboBox() + Me.CbMenuOrSelect = New System.Windows.Forms.ComboBox() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.Label3 = New System.Windows.Forms.Label() + Me.Button1 = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'cboChampion ' Me.cboChampion.FormattingEnabled = True - Me.cboChampion.Location = New System.Drawing.Point(69, 12) + Me.cboChampion.Location = New System.Drawing.Point(90, 12) Me.cboChampion.Name = "cboChampion" Me.cboChampion.Size = New System.Drawing.Size(261, 21) Me.cboChampion.TabIndex = 0 @@ -46,7 +51,7 @@ Partial Class Main 'lblChampion ' Me.lblChampion.AutoSize = True - Me.lblChampion.Location = New System.Drawing.Point(9, 15) + Me.lblChampion.Location = New System.Drawing.Point(30, 15) Me.lblChampion.Name = "lblChampion" Me.lblChampion.Size = New System.Drawing.Size(54, 13) Me.lblChampion.TabIndex = 1 @@ -55,7 +60,7 @@ Partial Class Main 'cboRole ' Me.cboRole.FormattingEnabled = True - Me.cboRole.Location = New System.Drawing.Point(69, 39) + Me.cboRole.Location = New System.Drawing.Point(90, 39) Me.cboRole.Name = "cboRole" Me.cboRole.Size = New System.Drawing.Size(261, 21) Me.cboRole.TabIndex = 2 @@ -63,7 +68,7 @@ Partial Class Main 'cboStats ' Me.cboStats.FormattingEnabled = True - Me.cboStats.Location = New System.Drawing.Point(69, 66) + Me.cboStats.Location = New System.Drawing.Point(90, 66) Me.cboStats.Name = "cboStats" Me.cboStats.Size = New System.Drawing.Size(261, 21) Me.cboStats.TabIndex = 3 @@ -71,7 +76,7 @@ Partial Class Main 'lblRole ' Me.lblRole.AutoSize = True - Me.lblRole.Location = New System.Drawing.Point(34, 42) + Me.lblRole.Location = New System.Drawing.Point(55, 42) Me.lblRole.Name = "lblRole" Me.lblRole.Size = New System.Drawing.Size(29, 13) Me.lblRole.TabIndex = 4 @@ -80,7 +85,7 @@ Partial Class Main 'lblStats ' Me.lblStats.AutoSize = True - Me.lblStats.Location = New System.Drawing.Point(32, 69) + Me.lblStats.Location = New System.Drawing.Point(53, 69) Me.lblStats.Name = "lblStats" Me.lblStats.Size = New System.Drawing.Size(31, 13) Me.lblStats.TabIndex = 5 @@ -88,31 +93,19 @@ Partial Class Main ' 'btnAssignMasteries ' - Me.btnAssignMasteries.Location = New System.Drawing.Point(202, 105) + Me.btnAssignMasteries.Location = New System.Drawing.Point(219, 150) Me.btnAssignMasteries.Name = "btnAssignMasteries" Me.btnAssignMasteries.Size = New System.Drawing.Size(128, 23) Me.btnAssignMasteries.TabIndex = 6 Me.btnAssignMasteries.Text = "Assign Masteries" Me.btnAssignMasteries.UseVisualStyleBackColor = True ' - 'chkInChampionSelect - ' - Me.chkInChampionSelect.AutoSize = True - Me.chkInChampionSelect.Checked = True - Me.chkInChampionSelect.CheckState = System.Windows.Forms.CheckState.Checked - Me.chkInChampionSelect.Location = New System.Drawing.Point(12, 111) - Me.chkInChampionSelect.Name = "chkInChampionSelect" - Me.chkInChampionSelect.Size = New System.Drawing.Size(118, 17) - Me.chkInChampionSelect.TabIndex = 8 - Me.chkInChampionSelect.Text = "In Champion Select" - Me.chkInChampionSelect.UseVisualStyleBackColor = True - ' 'lblVersion ' Me.lblVersion.ActiveLinkColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(120, Byte), Integer), CType(CType(192, Byte), Integer)) Me.lblVersion.AutoSize = True Me.lblVersion.LinkColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(120, Byte), Integer), CType(CType(192, Byte), Integer)) - Me.lblVersion.Location = New System.Drawing.Point(9, 136) + Me.lblVersion.Location = New System.Drawing.Point(26, 181) Me.lblVersion.Name = "lblVersion" Me.lblVersion.Size = New System.Drawing.Size(31, 13) Me.lblVersion.TabIndex = 9 @@ -125,7 +118,7 @@ Partial Class Main Me.lblClientVersion.ActiveLinkColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(120, Byte), Integer), CType(CType(192, Byte), Integer)) Me.lblClientVersion.AutoSize = True Me.lblClientVersion.LinkColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(120, Byte), Integer), CType(CType(192, Byte), Integer)) - Me.lblClientVersion.Location = New System.Drawing.Point(271, 136) + Me.lblClientVersion.Location = New System.Drawing.Point(288, 181) Me.lblClientVersion.Name = "lblClientVersion" Me.lblClientVersion.Size = New System.Drawing.Size(59, 13) Me.lblClientVersion.TabIndex = 10 @@ -133,17 +126,76 @@ Partial Class Main Me.lblClientVersion.Text = "Patch 1.11" Me.lblClientVersion.VisitedLinkColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(120, Byte), Integer), CType(CType(192, Byte), Integer)) ' + 'CbClienName + ' + Me.CbClienName.FormattingEnabled = True + Me.CbClienName.Items.AddRange(New Object() {"PVP.net Client", "Protect by Son Nguyen (www.sonnguyen.xyz)"}) + Me.CbClienName.Location = New System.Drawing.Point(90, 93) + Me.CbClienName.Name = "CbClienName" + Me.CbClienName.Size = New System.Drawing.Size(261, 21) + Me.CbClienName.TabIndex = 3 + ' + 'CbMenuOrSelect + ' + Me.CbMenuOrSelect.FormattingEnabled = True + Me.CbMenuOrSelect.Items.AddRange(New Object() {"Mastery in Menu", "Mastery in Champion Select Old", "Mastery in Champion Select New (ver 6)"}) + Me.CbMenuOrSelect.Location = New System.Drawing.Point(90, 120) + Me.CbMenuOrSelect.Name = "CbMenuOrSelect" + Me.CbMenuOrSelect.Size = New System.Drawing.Size(261, 21) + Me.CbMenuOrSelect.TabIndex = 3 + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(20, 101) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(64, 13) + Me.Label1.TabIndex = 5 + Me.Label1.Text = "Client Name" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(5, 125) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(79, 13) + Me.Label2.TabIndex = 5 + Me.Label2.Text = "Menu or Select" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(20, 160) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(42, 13) + Me.Label3.TabIndex = 5 + Me.Label3.Text = "Version" + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(109, 150) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(104, 23) + Me.Button1.TabIndex = 11 + Me.Button1.Text = "Change Size LOL" + Me.Button1.UseVisualStyleBackColor = True + ' 'Main ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(342, 158) + Me.ClientSize = New System.Drawing.Size(373, 206) + Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.lblClientVersion) Me.Controls.Add(Me.lblVersion) - Me.Controls.Add(Me.chkInChampionSelect) Me.Controls.Add(Me.btnAssignMasteries) + Me.Controls.Add(Me.Label3) + Me.Controls.Add(Me.Label2) + Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.lblStats) Me.Controls.Add(Me.lblRole) + Me.Controls.Add(Me.CbMenuOrSelect) + Me.Controls.Add(Me.CbClienName) Me.Controls.Add(Me.cboStats) Me.Controls.Add(Me.cboRole) Me.Controls.Add(Me.lblChampion) @@ -151,7 +203,7 @@ Partial Class Main Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "Main" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "LoL Mastery Manager" + Me.Text = "LoL Mastery Manager edit by Hoang0109" Me.ResumeLayout(False) Me.PerformLayout() @@ -164,7 +216,12 @@ Partial Class Main Friend WithEvents lblRole As Label Friend WithEvents lblStats As Label Friend WithEvents btnAssignMasteries As Button - Friend WithEvents chkInChampionSelect As CheckBox Friend WithEvents lblVersion As LinkLabel Friend WithEvents lblClientVersion As LinkLabel + Friend WithEvents CbClienName As ComboBox + Friend WithEvents CbMenuOrSelect As ComboBox + Friend WithEvents Label1 As Label + Friend WithEvents Label2 As Label + Friend WithEvents Label3 As Label + Friend WithEvents Button1 As Button End Class diff --git a/LoLMasteryManager/Main.vb b/LoLMasteryManager/Main.vb index 00e3f9a..21855e1 100644 --- a/LoLMasteryManager/Main.vb +++ b/LoLMasteryManager/Main.vb @@ -1,4 +1,6 @@ Imports System.Timers +Imports System.Diagnostics +Imports System.Runtime.InteropServices Public Class Main @@ -11,6 +13,7 @@ Public Class Main Private _MasteryManager As New MasteryManager Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load + CbClienName.SelectedIndex = 0 Try @@ -28,7 +31,8 @@ Public Class Main _Timer = New Timer(1000) - _Timer.Enabled = True + _Timer.Enabled = False + #End If @@ -105,9 +109,27 @@ Public Class Main lblClientVersion.Links.Add(oChampionGGLink) End Sub + + Friend Shared Sub MoveWindow(hwnd As IntPtr, X As Integer, Y As Integer, nWidth As Integer, nHeight As Integer, bRepaint As Boolean) + End Sub + Friend Shared Function GetWindowRect(hWnd As IntPtr, ByRef rect As RECT) As Boolean + End Function + Private Sub ChangeSizeWindow() + Dim processes As Process() = Process.GetProcesses() + If processes.Length > 0 Then + For i As Integer = 0 To processes.Length - 1 + If processes(i).MainWindowTitle = CbClienName.Text Then - Private Sub btnAssignMasteries_Click(sender As Object, e As EventArgs) Handles btnAssignMasteries.Click + Console.Write("tim thay cua so") + + MoveWindow(processes(i).MainWindowHandle, 0, 0, 1152, 720, False) + End If + Next + End If + + End Sub + Private Sub btnAssignMasteries_Click(sender As Object, e As EventArgs) Handles btnAssignMasteries.Click Try Dim sChampionKey As String = CType(cboChampion.SelectedItem, Champion).Key @@ -140,27 +162,7 @@ Public Class Main End Sub - Private Sub chkInChampionSelect_CheckedChanged(sender As Object, e As EventArgs) Handles chkInChampionSelect.CheckedChanged - Try - - If chkInChampionSelect.Checked Then - - _MasteryManager.SetMode(Modes.ChampionSelect) - - Else - - _MasteryManager.SetMode(Modes.Menu) - - End If - - Catch ex As Exception - - MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - - End Try - - End Sub Private Sub lblVersion_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lblVersion.LinkClicked @@ -196,12 +198,49 @@ Public Class Main Dim oLeagueWindow As IntPtr = HwndInterface.GetHwndFromTitle(My.Resources.LeagueClientWindowTitle) + Dim oLeagueSize = HwndInterface.GetHwndSize(oLeagueWindow) Dim oLeaguePosition = HwndInterface.GetHwndPos(oLeagueWindow) - Debug.WriteLine(String.Format("Client: {{ {0}, {1} }}", oLeaguePosition, oLeagueSize)) - Debug.WriteLine(New Point(Cursor.Position.X - oLeaguePosition.X, Cursor.Position.Y - oLeaguePosition.Y)) + Debug.WriteLine(My.Resources.LeagueClientWindowTitle) + + + End Sub + + Private Sub cboStats_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboStats.SelectedIndexChanged + + End Sub + + Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CbClienName.SelectedIndexChanged + My.Resources.LeagueClientWindowTitle = CbClienName.Text + + Debug.WriteLine(My.Resources.LeagueClientWindowTitle) + End Sub + + Private Sub CbMenuOrSelect_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CbMenuOrSelect.SelectedIndexChanged + Try + If CbMenuOrSelect.SelectedIndex = 0 Then + _MasteryManager.SetMode(Modes.Menu) + End If + If CbMenuOrSelect.SelectedIndex = 1 Then + _MasteryManager.SetMode(Modes.ChampionSelect_Old) + End If + If CbMenuOrSelect.SelectedIndex = 2 Then + _MasteryManager.SetMode(Modes.ChampionSelect) + End If + Catch ex As Exception + + MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + + End Try + End Sub + + Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click + + End Sub + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + ChangeSizeWindow() End Sub #End If diff --git a/LoLMasteryManager/MasteryAssigner.vb b/LoLMasteryManager/MasteryAssigner.vb index 7439856..9c29d09 100644 --- a/LoLMasteryManager/MasteryAssigner.vb +++ b/LoLMasteryManager/MasteryAssigner.vb @@ -82,11 +82,11 @@ Public Class MasteryAssigner Mouse.Move(oPosition) - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Mouse.LeftClick() - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Catch ex As Exception @@ -110,11 +110,11 @@ Public Class MasteryAssigner Mouse.Move(oPosition) - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Mouse.LeftClick() - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Catch ex As Exception @@ -138,11 +138,11 @@ Public Class MasteryAssigner Mouse.Move(oPosition) - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Mouse.LeftClick() - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Catch ex As Exception @@ -200,7 +200,7 @@ Public Class MasteryAssigner Mouse.Move(oMasteryPosition) ' Sleep the thread to ensure the mouse has time to move - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) ' If the mastery has all of the points for that row If mastery.Ranks = 5 Then @@ -209,7 +209,7 @@ Public Class MasteryAssigner Mouse.LeftClick() ' Sleep the thread to ensure the click has time to complete - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Else ' Points shared between both masteries on the row @@ -220,7 +220,7 @@ Public Class MasteryAssigner Mouse.LeftClick() ' Sleep the thread to ensure the click has time to complete - Threading.Thread.Sleep(100) + Threading.Thread.Sleep(300) Next iRank ' Loop through the mastery ranks @@ -262,6 +262,10 @@ Public Class MasteryAssigner oMasteryPosition = _MasteryCoordinatesListFile.MasteryCoordinatesChampionSelect(sID) + Case Modes.ChampionSelect_Old + + oMasteryPosition = _MasteryCoordinatesListFile.MasteryCoordinatesChampionSelect_Old(sID) + End Select Dim oPosition As New Point @@ -309,29 +313,20 @@ Public Class MasteryAssigner If _Mode = Modes.ChampionSelect Then - Select Case oLeagueClientWindowSize.Width - - Case < ClientSize.Medium.Width - - oMasteryPageNameInputFieldOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientMasteryPageNameInputField.ChampionSelect.Small.X)) - oMasteryPageNameInputFieldOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientMasteryPageNameInputField.ChampionSelect.Small.Y)) - - Case >= ClientSize.Medium.Width, < ClientSize.Large.Width - - oMasteryPageNameInputFieldOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientMasteryPageNameInputField.ChampionSelect.Medium.X)) - oMasteryPageNameInputFieldOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientMasteryPageNameInputField.ChampionSelect.Medium.Y)) + oMasteryPageNameInputFieldOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientMasteryPageNameInputField.ChampionSelect.X)) + oMasteryPageNameInputFieldOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientMasteryPageNameInputField.ChampionSelect.Y)) + End If - Case >= ClientSize.Large.Width + If _Mode = Modes.Menu Then - oMasteryPageNameInputFieldOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientMasteryPageNameInputField.ChampionSelect.Large.X)) - oMasteryPageNameInputFieldOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientMasteryPageNameInputField.ChampionSelect.Large.Y)) + oMasteryPageNameInputFieldOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientMasteryPageNameInputField.Menu.X)) + oMasteryPageNameInputFieldOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientMasteryPageNameInputField.Menu.Y)) - End Select + End If + If _Mode = Modes.ChampionSelect_Old Then - Else - - oMasteryPageNameInputFieldOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientMasteryPageNameInputField.Menu.X)) - oMasteryPageNameInputFieldOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientMasteryPageNameInputField.Menu.Y)) + oMasteryPageNameInputFieldOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientMasteryPageNameInputField.ChampionSelect_Old.X)) + oMasteryPageNameInputFieldOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientMasteryPageNameInputField.ChampionSelect_Old.Y)) End If @@ -352,35 +347,23 @@ Public Class MasteryAssigner Dim oLeagueClientWindowSize As Size = GetLeagueClientWindowSize() Dim oSaveMasteriesButtonOffsets As New Point - If _Mode = Modes.ChampionSelect Then - - Select Case oLeagueClientWindowSize.Width - - Case < ClientSize.Medium.Width + If _Mode = Modes.ChampionSelect_Old Then - oSaveMasteriesButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientSaveMasteriesButton.ChampionSelect.Small.X)) - oSaveMasteriesButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientSaveMasteriesButton.ChampionSelect.Small.Y)) - Case >= ClientSize.Medium.Width, < ClientSize.Large.Width + oSaveMasteriesButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientSaveMasteriesButton.ChampionSelect_Old.X)) + oSaveMasteriesButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientSaveMasteriesButton.ChampionSelect_Old.Y)) - oSaveMasteriesButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientSaveMasteriesButton.ChampionSelect.Medium.X)) - oSaveMasteriesButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientSaveMasteriesButton.ChampionSelect.Medium.Y)) + End If - Case >= ClientSize.Large.Width - oSaveMasteriesButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientSaveMasteriesButton.ChampionSelect.Large.X)) - oSaveMasteriesButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientSaveMasteriesButton.ChampionSelect.Large.Y)) + If _Mode = Modes.Menu Then - End Select + oSaveMasteriesButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientSaveMasteriesButton.Menu.X)) + oSaveMasteriesButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientSaveMasteriesButton.Menu.Y)) - Else + End If - oSaveMasteriesButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientSaveMasteriesButton.Menu.X)) - oSaveMasteriesButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientSaveMasteriesButton.Menu.Y)) - - End If - - Return oSaveMasteriesButtonOffsets + Return oSaveMasteriesButtonOffsets Catch ex As Exception @@ -397,32 +380,25 @@ Public Class MasteryAssigner Dim oLeagueClientWindowSize As Size = GetLeagueClientWindowSize() Dim oReturnPointsButtonOffsets As New Point - If _Mode = Modes.ChampionSelect Then - - Select Case oLeagueClientWindowSize.Width - - Case < ClientSize.Medium.Width - - oReturnPointsButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientReturnPointsButton.ChampionSelect.Small.X)) - oReturnPointsButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientReturnPointsButton.ChampionSelect.Small.Y)) - - Case >= ClientSize.Medium.Width, < ClientSize.Large.Width + If _Mode = Modes.ChampionSelect_Old Then - oReturnPointsButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientReturnPointsButton.ChampionSelect.Medium.X)) - oReturnPointsButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientReturnPointsButton.ChampionSelect.Medium.Y)) - Case >= ClientSize.Large.Width + oReturnPointsButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientReturnPointsButton.ChampionSelect_Old.X)) + oReturnPointsButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientReturnPointsButton.ChampionSelect_Old.Y)) - oReturnPointsButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientReturnPointsButton.ChampionSelect.Large.X)) - oReturnPointsButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientReturnPointsButton.ChampionSelect.Large.Y)) - - End Select + End If - Else + If _Mode = Modes.Menu Then oReturnPointsButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientReturnPointsButton.Menu.X)) oReturnPointsButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientReturnPointsButton.Menu.Y)) + End If + If _Mode = Modes.ChampionSelect Then + + oReturnPointsButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientReturnPointsButton.ChampionSelect.X)) + oReturnPointsButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientReturnPointsButton.ChampionSelect.Y)) + End If Return oReturnPointsButtonOffsets diff --git a/LoLMasteryManager/MasteryManager.vb b/LoLMasteryManager/MasteryManager.vb index 78e7191..1088136 100644 --- a/LoLMasteryManager/MasteryManager.vb +++ b/LoLMasteryManager/MasteryManager.vb @@ -4,6 +4,7 @@ Imports Newtonsoft.Json Public Enum Modes + ChampionSelect_Old ChampionSelect Menu @@ -101,7 +102,7 @@ Public Class MasteryManager While _LoadingWindow Is Nothing OrElse Not _LoadingWindow.IsHandleCreated - Thread.Sleep(100) + Thread.Sleep(300) End While diff --git a/LoLMasteryManager/Models/MasteryCoordinates.vb b/LoLMasteryManager/Models/MasteryCoordinates.vb index 5f25b20..8ace5a5 100644 --- a/LoLMasteryManager/Models/MasteryCoordinates.vb +++ b/LoLMasteryManager/Models/MasteryCoordinates.vb @@ -14,6 +14,9 @@ Partial Public Module Models Public MasteryCoordinatesChampionSelect As New Dictionary(Of String, Point) + + Public MasteryCoordinatesChampionSelect_Old As New Dictionary(Of String, Point) + End Class End Module diff --git a/LoLMasteryManager/My Project/Resources.Designer.vb b/LoLMasteryManager/My Project/Resources.Designer.vb index ac7f818..d828040 100644 --- a/LoLMasteryManager/My Project/Resources.Designer.vb +++ b/LoLMasteryManager/My Project/Resources.Designer.vb @@ -77,7 +77,7 @@ Namespace My.Resources Return ResourceManager.GetString("DataDragonUrl", resourceCulture) End Get End Property - + ''' ''' Looks up a localized string similar to https://github.com/maxdeviant/lol-mastery-manager/releases/latest. ''' @@ -86,11 +86,20 @@ Namespace My.Resources Return ResourceManager.GetString("GitHubLatestReleaseUrl", resourceCulture) End Get End Property - + + Private mdescription As String + Public Property LeagueClientWindowTitle() As String + Set(ByVal Value As String) + mdescription = Value + End Set + Get + LeagueClientWindowTitle = mdescription + End Get + End Property ''' ''' Looks up a localized string similar to PVP.net Client. ''' - Friend ReadOnly Property LeagueClientWindowTitle() As String + Friend ReadOnly Property LeagueClientWindowTitle1() As String Get Return ResourceManager.GetString("LeagueClientWindowTitle", resourceCulture) End Get From a2cce1876353375ad88f0cf6c8d86e3cfc1ac429 Mon Sep 17 00:00:00 2001 From: hoang0109 Date: Sat, 6 Feb 2016 23:22:43 +0700 Subject: [PATCH 3/5] Change Sleep Time --- LoLMasteryManager/Coordinates.json | 162 +++++++++++++-------------- LoLMasteryManager/MasteryAssigner.vb | 18 +-- LoLMasteryManager/MasteryManager.vb | 2 +- 3 files changed, 91 insertions(+), 91 deletions(-) diff --git a/LoLMasteryManager/Coordinates.json b/LoLMasteryManager/Coordinates.json index 3f4249b..d6186ba 100644 --- a/LoLMasteryManager/Coordinates.json +++ b/LoLMasteryManager/Coordinates.json @@ -1,87 +1,87 @@ { - "reference_client_size": "1152, 720", + "reference_client_size": "1280, 800", "mastery_coordinates_menu": { - "6111": "350,245", - "6114": "470,245", - "6121": "385,310", - "6122": "445,310", - "6131": "350,371", - "6134": "471,371", - "6141": "385,435", - "6142": "440,435", - "6151": "348,500", - "6154": "470,500", - "6161": "354,565", - "6162": "410,565", - "6164": "475,565", - "6211": "846,247", - "6212": "965,247", - "6221": "883,310", - "6223": "940,310", - "6231": "843,370", - "6232": "965,370", - "6241": "879,436", - "6242": "937,436", - "6251": "840,500", - "6252": "963,500", - "6261": "848,560", - "6262": "905,560", - "6263": "970,560", - "6311": "595,242", - "6312": "720,242", - "6321": "602,312", - "6322": "658,312", - "6323": "723,312", - "6331": "596,370", - "6332": "717,370", - "6342": "632,438", - "6343": "689,438", - "6351": "596,500", - "6352": "717,500", - "6361": "600,567", - "6362": "663,563", - "6363": "721,566" + "6111": "387, 267", + "6114": "521, 267", + "6121": "422, 339", + "6122": "489, 339", + "6131": "388, 410", + "6134": "522, 410", + "6141": "422, 481", + "6142": "489, 481", + "6151": "388, 552", + "6154": "522, 552", + "6161": "388, 623", + "6162": "455, 623", + "6164": "522, 623", + "6211": "937, 267", + "6212": "1071, 267", + "6221": "972, 339", + "6223": "1039, 339", + "6231": "938, 410", + "6232": "1072, 410", + "6241": "972, 481", + "6242": "1039, 481", + "6251": "938, 552", + "6252": "1072, 552", + "6261": "938, 623", + "6262": "1005, 623", + "6263": "1072, 623", + "6311": "662, 267", + "6312": "796, 267", + "6321": "663, 339", + "6322": "730, 339", + "6323": "797, 339", + "6331": "663, 410", + "6332": "797, 410", + "6342": "697, 481", + "6343": "764, 481", + "6351": "663, 552", + "6352": "797, 552", + "6361": "663, 623", + "6362": "730, 623", + "6363": "797, 623" }, "mastery_coordinates_champion_select": { - "6111": "364, 200", - "6114": "485, 200", - "6121": "398, 270", - "6122": "463, 270", - "6131": "371, 330", - "6134": "487, 330", - "6141": "404, 390", - "6142": "456, 390", - "6151": "366, 460", - "6154": "490, 460", - "6161": "369, 520", - "6162": "426, 520", - "6164": "488, 520", - "6211": "864, 200", - "6212": "986, 200", - "6221": "895, 260", - "6223": "954, 260", - "6231": "858, 325", - "6232": "981, 325", - "6241": "896, 395", - "6242": "953, 395", - "6251": "864, 455", - "6252": "978, 455", - "6261": "861, 520", - "6262": "920, 520", - "6263": "983, 520", - "6311": "614, 200", - "6312": "737, 200", - "6321": "618, 265", - "6322": "679, 265", - "6323": "736, 265", - "6331": "613, 325", - "6332": "733, 325", - "6342": "650, 390", - "6343": "706, 390", - "6351": "614, 455", - "6352": "739, 455", - "6361": "618, 520", - "6362": "675, 520", - "6363": "735, 520" + "6111": "397, 186", + "6114": "531, 186", + "6121": "432, 258", + "6122": "499, 258", + "6131": "398, 329", + "6134": "532, 329", + "6141": "432, 400", + "6142": "499, 400", + "6151": "398, 471", + "6154": "532, 471", + "6161": "398, 542", + "6162": "465, 542", + "6164": "532, 542", + "6211": "947, 186", + "6212": "1081, 186", + "6221": "982, 258", + "6223": "1049, 258", + "6231": "948, 329", + "6232": "1082, 329", + "6241": "982, 400", + "6242": "1049, 400", + "6251": "948, 471", + "6252": "1082, 471", + "6261": "948, 542", + "6262": "1015, 542", + "6263": "1082, 542", + "6311": "672, 186", + "6312": "806, 186", + "6321": "673, 258", + "6322": "740, 258", + "6323": "807, 258", + "6331": "673, 329", + "6332": "807, 329", + "6342": "707, 400", + "6343": "774, 400", + "6351": "673, 471", + "6352": "807, 471", + "6361": "673, 542", + "6362": "740, 542", + "6363": "807, 542" } } diff --git a/LoLMasteryManager/MasteryAssigner.vb b/LoLMasteryManager/MasteryAssigner.vb index 9c29d09..313f564 100644 --- a/LoLMasteryManager/MasteryAssigner.vb +++ b/LoLMasteryManager/MasteryAssigner.vb @@ -82,11 +82,11 @@ Public Class MasteryAssigner Mouse.Move(oPosition) - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Mouse.LeftClick() - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Catch ex As Exception @@ -110,11 +110,11 @@ Public Class MasteryAssigner Mouse.Move(oPosition) - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Mouse.LeftClick() - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Catch ex As Exception @@ -138,11 +138,11 @@ Public Class MasteryAssigner Mouse.Move(oPosition) - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Mouse.LeftClick() - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Catch ex As Exception @@ -200,7 +200,7 @@ Public Class MasteryAssigner Mouse.Move(oMasteryPosition) ' Sleep the thread to ensure the mouse has time to move - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) ' If the mastery has all of the points for that row If mastery.Ranks = 5 Then @@ -209,7 +209,7 @@ Public Class MasteryAssigner Mouse.LeftClick() ' Sleep the thread to ensure the click has time to complete - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Else ' Points shared between both masteries on the row @@ -220,7 +220,7 @@ Public Class MasteryAssigner Mouse.LeftClick() ' Sleep the thread to ensure the click has time to complete - Threading.Thread.Sleep(300) + Threading.Thread.Sleep(150) Next iRank ' Loop through the mastery ranks diff --git a/LoLMasteryManager/MasteryManager.vb b/LoLMasteryManager/MasteryManager.vb index 1088136..0f1d65a 100644 --- a/LoLMasteryManager/MasteryManager.vb +++ b/LoLMasteryManager/MasteryManager.vb @@ -102,7 +102,7 @@ Public Class MasteryManager While _LoadingWindow Is Nothing OrElse Not _LoadingWindow.IsHandleCreated - Thread.Sleep(300) + Thread.Sleep(150) End While From 732c5732615c51424bf7bbffb8aaf6805eef9d9a Mon Sep 17 00:00:00 2001 From: hoang0109 Date: Wed, 17 Feb 2016 22:17:55 +0700 Subject: [PATCH 4/5] Them luu bang ho tro mua moi --- LoLMasteryManager/App.config | 6 +- LoLMasteryManager/LoLMasteryManager.vbproj | 6 +- LoLMasteryManager/MasteryAssigner.vb | 7 +++ .../My Project/Resources.Designer.vb | 3 +- .../My Project/Settings.Designer.vb | 62 +++++++++---------- 5 files changed, 47 insertions(+), 37 deletions(-) diff --git a/LoLMasteryManager/App.config b/LoLMasteryManager/App.config index 2ae8254..1729194 100644 --- a/LoLMasteryManager/App.config +++ b/LoLMasteryManager/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/LoLMasteryManager/LoLMasteryManager.vbproj b/LoLMasteryManager/LoLMasteryManager.vbproj index c0249fe..cfe5c7b 100644 --- a/LoLMasteryManager/LoLMasteryManager.vbproj +++ b/LoLMasteryManager/LoLMasteryManager.vbproj @@ -11,8 +11,10 @@ LoLMasteryManager 512 WindowsForms - v4.5.2 + v4.5 true + + AnyCPU @@ -25,6 +27,7 @@ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + false AnyCPU @@ -55,6 +58,7 @@ app.manifest + false diff --git a/LoLMasteryManager/MasteryAssigner.vb b/LoLMasteryManager/MasteryAssigner.vb index 313f564..e32da9d 100644 --- a/LoLMasteryManager/MasteryAssigner.vb +++ b/LoLMasteryManager/MasteryAssigner.vb @@ -347,6 +347,13 @@ Public Class MasteryAssigner Dim oLeagueClientWindowSize As Size = GetLeagueClientWindowSize() Dim oSaveMasteriesButtonOffsets As New Point + If _Mode = Modes.ChampionSelect Then + + + oSaveMasteriesButtonOffsets.X = CInt(Math.Floor(oLeagueClientWindowSize.Width / ClientSaveMasteriesButton.ChampionSelect.X)) + oSaveMasteriesButtonOffsets.Y = CInt(Math.Floor(oLeagueClientWindowSize.Height / ClientSaveMasteriesButton.ChampionSelect.Y)) + + End If If _Mode = Modes.ChampionSelect_Old Then diff --git a/LoLMasteryManager/My Project/Resources.Designer.vb b/LoLMasteryManager/My Project/Resources.Designer.vb index d828040..d9c908e 100644 --- a/LoLMasteryManager/My Project/Resources.Designer.vb +++ b/LoLMasteryManager/My Project/Resources.Designer.vb @@ -77,7 +77,7 @@ Namespace My.Resources Return ResourceManager.GetString("DataDragonUrl", resourceCulture) End Get End Property - + ''' ''' Looks up a localized string similar to https://github.com/maxdeviant/lol-mastery-manager/releases/latest. ''' @@ -86,7 +86,6 @@ Namespace My.Resources Return ResourceManager.GetString("GitHubLatestReleaseUrl", resourceCulture) End Get End Property - Private mdescription As String Public Property LeagueClientWindowTitle() As String Set(ByVal Value As String) diff --git a/LoLMasteryManager/My Project/Settings.Designer.vb b/LoLMasteryManager/My Project/Settings.Designer.vb index 0a56512..6b6219c 100644 --- a/LoLMasteryManager/My Project/Settings.Designer.vb +++ b/LoLMasteryManager/My Project/Settings.Designer.vb @@ -13,42 +13,42 @@ Option Explicit On Namespace My - - _ + + _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) - + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean + Private Shared addedHandler As Boolean - Private Shared addedHandlerLockObject As New Object + Private Shared addedHandlerLockObject As New Object - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub #End If #End Region - + Public Shared ReadOnly Property [Default]() As MySettings Get - + #If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If #End If Return defaultInstance End Get @@ -57,13 +57,13 @@ Namespace My End Namespace Namespace My - - _ + + _ Friend Module MySettingsProperty - - _ + + _ Friend ReadOnly Property Settings() As Global.LoLMasteryManager.My.MySettings Get Return Global.LoLMasteryManager.My.MySettings.Default From 38807e89a0fce5936809644945026c1d13f6183e Mon Sep 17 00:00:00 2001 From: hoang0109 Date: Thu, 18 Feb 2016 13:49:50 +0700 Subject: [PATCH 5/5] Edit Client Name --- LoLMasteryManager/Main.Designer.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LoLMasteryManager/Main.Designer.vb b/LoLMasteryManager/Main.Designer.vb index 2bdaac6..95f7110 100644 --- a/LoLMasteryManager/Main.Designer.vb +++ b/LoLMasteryManager/Main.Designer.vb @@ -128,12 +128,14 @@ Partial Class Main ' 'CbClienName ' + Me.CbClienName.Enabled = False Me.CbClienName.FormattingEnabled = True Me.CbClienName.Items.AddRange(New Object() {"PVP.net Client", "Protect by Son Nguyen (www.sonnguyen.xyz)"}) Me.CbClienName.Location = New System.Drawing.Point(90, 93) Me.CbClienName.Name = "CbClienName" Me.CbClienName.Size = New System.Drawing.Size(261, 21) Me.CbClienName.TabIndex = 3 + Me.CbClienName.Text = "PVP.net Client" ' 'CbMenuOrSelect '