diff --git a/Source/HourBoostr.Settings/App.config b/Source/HourBoostr.Settings/App.config
index 092bcb0..2131f74 100644
--- a/Source/HourBoostr.Settings/App.config
+++ b/Source/HourBoostr.Settings/App.config
@@ -27,7 +27,7 @@
-
+
diff --git a/Source/HourBoostr.Settings/Properties/AssemblyInfo.cs b/Source/HourBoostr.Settings/Properties/AssemblyInfo.cs
index 8fec524..9bc74ec 100644
--- a/Source/HourBoostr.Settings/Properties/AssemblyInfo.cs
+++ b/Source/HourBoostr.Settings/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.1.8")]
-[assembly: AssemblyFileVersion("4.1.8")]
+[assembly: AssemblyVersion("4.1.9")]
+[assembly: AssemblyFileVersion("4.1.9")]
diff --git a/Source/HourBoostr.Settings/Ui/AppGames.cs b/Source/HourBoostr.Settings/Ui/AppGames.cs
index 617e73b..e466505 100644
--- a/Source/HourBoostr.Settings/Ui/AppGames.cs
+++ b/Source/HourBoostr.Settings/Ui/AppGames.cs
@@ -6,9 +6,10 @@
using System.Text.RegularExpressions;
using System.Linq;
using System.Windows.Forms;
-using System.Runtime.InteropServices;
using HourBoostr.Settings.Core;
using HourBoostr.Settings.Objects;
+using SingleBoostr.Core.Misc;
+using SingleBoostr.Core.Enums;
namespace HourBoostr.Settings.Ui
{
@@ -24,22 +25,7 @@ public partial class AppGames : Form
/// Stores all game available on a user account
///
private List mGames = new List();
-
-
- ///
- /// SendMessage import
- /// Specifically used in this case for setting placeholder text for text controls
- ///
- /// IntPtr
- /// int
- /// int
- /// [MarshalAs(UnmanagedType.LPWStr)]string
- ///
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
- private static extern int SendMessage(IntPtr hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)]string lParam);
- private const int EM_SETCUEBANNER = 0x1501;
-
-
+
///
/// Form constructor
/// Sets placeholder text
@@ -50,8 +36,8 @@ public AppGames()
Size = new Size(381, 120);
/*Set placeholder text for text controls*/
- SendMessage(txtProfile.Handle, EM_SETCUEBANNER, 0, "https://steamcommunity.com/id/ezzpify");
- SendMessage(txtSearch.Handle, EM_SETCUEBANNER, 0, "Search Game");
+ Utils.SendMessage(txtProfile.Handle, Messages.EM_SETCUEBANNER, 0, Const.Steam.Example_Profile.URLCUSTOM);
+ Utils.SendMessage(txtSearch.Handle, Messages.EM_SETCUEBANNER, 0, "Search Game");
ActiveControl = lvlExampleInput;
}
@@ -67,29 +53,20 @@ private void ShowLoading(bool show)
picLoading.Visible = show;
}
-
///
/// Highlight when mouse over
///
/// object
/// EventArgs
- private void lvlExampleInput_MouseEnter(object sender, EventArgs e)
- {
- lvlExampleInput.ForeColor = SystemColors.Highlight;
- }
-
+ private void lvlExampleInput_MouseEnter(object sender, EventArgs e) => lvlExampleInput.ForeColor = SystemColors.Highlight;
///
/// De-highlight when mouse over
///
/// object
/// EventArgs
- private void lvlExampleInput_MouseLeave(object sender, EventArgs e)
- {
- lvlExampleInput.ForeColor = Color.Gray;
- }
-
-
+ private void lvlExampleInput_MouseLeave(object sender, EventArgs e) => lvlExampleInput.ForeColor = Color.Gray;
+
///
/// Input example click
/// Shows several ways to input acceptable data
@@ -100,15 +77,14 @@ private void lvlExampleInput_Click(object sender, EventArgs e)
{
MessageBox.Show(
"Full url\n"
- + "• https://steamcommunity.com/id/ezzpify\n"
- + "• http://steamcommunity.com/profiles/76561197960285265\n\n"
+ + $"• {Const.Steam.Example_Profile.URLCUSTOM}\n"
+ + $"• {Const.Steam.Example_Profile.URL}\n\n"
+ "Custom url or SteamID64\n"
- + "• 76561197960285265\n"
- + "• ezzpify",
+ + $"• {Const.Steam.Example_Profile.STEAMID}\n"
+ + $"• {Const.Steam.Example_Profile.CUSTOMURL}",
"Example input");
}
-
///
/// txtProfile keydown
/// If input is valid it will start the background worker and try to fetch the games
@@ -142,7 +118,6 @@ private void txtProfile_KeyDown(object sender, KeyEventArgs e)
}
}
-
///
/// Checks if the input value is a steam url, or can be formatted as one
///
@@ -174,10 +149,10 @@ private static string CheckInput(string input)
{
/*See if the input is SteamID64 (which is 17 in length, only numbers)*/
if (reg3.IsMatch(input) && input.Length == 17)
- url = $"https://steamcommunity.com/profile/{input}";
+ url = Utils.STEAM_URL("community", $"profiles/{input}");
/*Lastly we'll assume it's a custom url*/
else if (reg4.IsMatch(input))
- url = $"http://steamcommunity.com/id/{input}";
+ url = Utils.STEAM_URL("community", $"id/{input}");
}
/*We'll strip the url of the last slash since we'll add that later on*/
@@ -187,7 +162,6 @@ private static string CheckInput(string input)
return url;
}
-
///
/// Bwg main worker
/// Fetches game list from steam profile
@@ -206,7 +180,6 @@ private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
}
}
-
///
/// Bwg completed
/// Adds all the games fetched to the listbox
@@ -221,30 +194,23 @@ private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerComplet
txtProfile.Enabled = true;
gameList.Items.Clear();
- foreach (var game in mGames)
- gameList.Items.Add(game.name);
+ mGames.ForEach(game => gameList.Items.Add(game.name));
- if (gameList.Items.Count == 0)
- {
- Size = new Size(381, 120);
- gameGroup.Visible = false;
- }
+ if (gameList.Items.Count != 0) return;
+
+ Size = new Size(381, 120);
+ gameGroup.Visible = false;
}
-
///
/// Loads all games from available games list into listboxes
///
private void LoadAvailableGames()
{
gameList.Items.Clear();
- foreach (var game in mGames)
- {
- gameList.Items.Add(game.name);
- }
+ mGames.ForEach(game => gameList.Items.Add(game.name));
}
-
///
/// Sorts the global lists by name and adds them to the listboxes
///
@@ -270,7 +236,6 @@ private void RefreshLists()
mGamesSelected.ForEach(o => selectedList.Items.Add(o.name));
}
-
///
/// Adds the selected game to selected games and removes it from games
///
@@ -292,7 +257,6 @@ private void gameList_SelectedIndexChanged(object sender, EventArgs e)
}
}
-
///
/// Re-adds the selected game to games and removes it from selected games
/// Just reverse of the above function
@@ -302,32 +266,24 @@ private void gameList_SelectedIndexChanged(object sender, EventArgs e)
private void selectedList_SelectedIndexChanged(object sender, EventArgs e)
{
var item = selectedList.SelectedItem;
- if (item == null)
- return;
+ if (item == null) return;
var selected = mGamesSelected.FirstOrDefault(o => o.name == (string)item);
- if (selected != null)
- {
- mGames.Add(selected);
- mGamesSelected.Remove(selected);
+ if (selected == null) return;
- RefreshLists();
- }
+ mGames.Add(selected);
+ mGamesSelected.Remove(selected);
+ RefreshLists();
}
-
///
/// Just refresh each time user types and it will filter
/// games in RefreshLists function
///
/// object
/// EventArgs
- private void txtSearch_TextChanged(object sender, EventArgs e)
- {
- RefreshLists();
- }
-
-
+ private void txtSearch_TextChanged(object sender, EventArgs e) => RefreshLists();
+
///
/// Closing event
/// Since we want to be able to access the game list after user closes form
diff --git a/Source/HourBoostr.Settings/Ui/AppHome.cs b/Source/HourBoostr.Settings/Ui/AppHome.cs
index dc32944..0c8d90d 100644
--- a/Source/HourBoostr.Settings/Ui/AppHome.cs
+++ b/Source/HourBoostr.Settings/Ui/AppHome.cs
@@ -3,15 +3,15 @@
using System.Data;
using System.Drawing;
using System.Linq;
-using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
using Newtonsoft.Json;
-using System.Runtime.InteropServices;
using HourBoostr.Settings.Objects;
using SteamKit2;
+using SingleBoostr.Core.Misc;
+using SingleBoostr.Core.Enums;
namespace HourBoostr.Settings.Ui
{
@@ -22,27 +22,11 @@ public partial class AppHome : Form
///
private Config.Settings mSettings = new Config.Settings();
-
///
/// The account we're currently modifying
///
private SingleBoostr.Core.Objects.AccountSettings mActiveAccount;
-
-
- ///
- /// SendMessage import
- /// Specifically used in this case for setting placeholder text for text controls
- ///
- /// IntPtr
- /// int
- /// int
- /// [MarshalAs(UnmanagedType.LPWStr)]string
- ///
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
- private static extern int SendMessage(IntPtr hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)]string lParam);
- private const int EM_SETCUEBANNER = 0x1501;
-
-
+
///
/// Constructor
/// Sets placeholder text for text controls
@@ -52,14 +36,13 @@ public AppHome()
InitializeComponent();
/*Set placeholder text for text controls*/
- SendMessage(txtUsername.Handle, EM_SETCUEBANNER, 0, "Username");
- SendMessage(txtPassword.Handle, EM_SETCUEBANNER, 0, "Password");
- SendMessage(txtLoginKey.Handle, EM_SETCUEBANNER, 0, "Login Key");
- SendMessage(txtResponse.Handle, EM_SETCUEBANNER, 0, "Chat Response");
- SendMessage(txtGameItem.Handle, EM_SETCUEBANNER, 0, "Game ID");
+ Utils.SendMessage(txtUsername.Handle, Messages.EM_SETCUEBANNER, 0, "Username");
+ Utils.SendMessage(txtPassword.Handle, Messages.EM_SETCUEBANNER, 0, "Password");
+ Utils.SendMessage(txtLoginKey.Handle, Messages.EM_SETCUEBANNER, 0, "Login Key");
+ Utils.SendMessage(txtResponse.Handle, Messages.EM_SETCUEBANNER, 0, "Chat Response");
+ Utils.SendMessage(txtGameItem.Handle, Messages.EM_SETCUEBANNER, 0, "Game ID");
}
-
///
/// Form load
/// Finds HourBoostr.Settings.json and loads it
@@ -67,16 +50,16 @@ public AppHome()
private void mainForm_Load(object sender, EventArgs e)
{
/*If HourBoostr is running, give warning about saving settings*/
- var procs = Process.GetProcessesByName("hourboostr");
+ var procs = Process.GetProcessesByName(Const.HourBoostr.NAME.ToLower());
if (procs.Length > 0)
{
- MessageBox.Show("Settings will be overwritten when you close HourBoostr.\n"
- + "I would not recommend making any changes here while HourBoostr is running.\n"
- + "If you need to make any changes, make a copy of HourBoostr.Settings.json.", "Warning");
+ MessageBox.Show($"Settings will be overwritten when you close {Const.HourBoostr.NAME}.\n"
+ + $"I would not recommend making any changes here while {Const.HourBoostr.NAME} is running.\n"
+ + $"If you need to make any changes, make a copy of {Const.HourBoostr.SETTINGS_FILE}.", "Warning");
}
/*Find the HourBoostr.Settings.json file if it exists and load it up*/
- string file = Path.Combine(Application.StartupPath, "HourBoostr.Settings.json");
+ string file = Path.Combine(Application.StartupPath, Const.HourBoostr.SETTINGS_FILE);
if (File.Exists(file))
{
try
@@ -91,7 +74,7 @@ private void mainForm_Load(object sender, EventArgs e)
}
catch (Exception ex)
{
- MessageBox.Show($"Could not read the HourBoostr.Settings.json\n\n{ex.Message}", "Ruh roh!");
+ MessageBox.Show($"Could not read the {Const.HourBoostr.SETTINGS_FILE}\n\n{ex.Message}", "Ruh roh!");
}
}
@@ -99,7 +82,6 @@ private void mainForm_Load(object sender, EventArgs e)
RefreshAccountList();
}
-
///
/// Adds all users to listbox
///
@@ -133,7 +115,6 @@ Usernames that are empty gets an display name*/
SelectFirstAccount();
}
-
///
/// If an active account is set, save the changes made to it from the controls
///
@@ -177,7 +158,6 @@ private void SaveCurrentAccount()
}
}
-
///
/// Gets the user in list depending on accountListBox index
///
@@ -224,18 +204,13 @@ private void accountListBox_SelectedIndexChanged(object sender, EventArgs e)
}
}
-
///
/// Save settings when form is closed
///
/// object
/// FormClosingEventArgs
- private void mainForm_FormClosing(object sender, FormClosingEventArgs e)
- {
- SaveAccountJson();
- }
-
-
+ private void mainForm_FormClosing(object sender, FormClosingEventArgs e) => SaveAccountJson();
+
///
/// Saves all accounts and exits the application
///
@@ -260,26 +235,20 @@ private void SaveAccountJson()
}
}
-
///
/// Selects the last account in account list box
///
- private void SelectLastAccount()
- {
- accountListBox.SelectedIndex = accountListBox.Items.Count - 1;
- }
-
+ private void SelectLastAccount() => accountListBox.SelectedIndex = accountListBox.Items.Count - 1;
///
/// Selected the first account in account list box
///
private void SelectFirstAccount()
{
- if (accountListBox.Items.Count > 0)
- accountListBox.SelectedIndex = 0;
+ if (accountListBox.Items.Count <= 0) return;
+ accountListBox.SelectedIndex = 0;
}
-
///
/// Creates a new account in the list
///
@@ -295,7 +264,6 @@ private void lblNewAccount_Click(object sender, EventArgs e)
SelectLastAccount();
}
-
///
/// Updates the listbox account name when user leaves username control
///
@@ -326,7 +294,6 @@ private void txtUsername_Leave(object sender, EventArgs e)
accountListBox.Items[accountListBox.SelectedIndex] = username;
}
-
///
/// If user types anything we'll auto-enable community and show online
/// Since they are needed to respond
@@ -342,7 +309,6 @@ private void txtResponse_TextChanged(object sender, EventArgs e)
}
}
-
///
/// Refreshes the gameListBox and fills it with items from mActiveAccount
///
@@ -353,7 +319,6 @@ private void RefreshGameList()
mActiveAccount.Games.ForEach(o => gameList.Items.Add(o));
}
-
///
/// Allows for the contextMenu to open on right click
///
@@ -369,7 +334,6 @@ private void accountListBox_MouseDown(object sender, MouseEventArgs e)
}
}
-
///
/// Cancels the opening of the menu if no listbox item is selected
///
@@ -377,11 +341,10 @@ private void accountListBox_MouseDown(object sender, MouseEventArgs e)
/// CancelEventArgs
private void accountListBoxMenu_Opening(object sender, CancelEventArgs e)
{
- if (accountListBox.SelectedItem == null)
- e.Cancel = true;
+ if (accountListBox.SelectedItem != null) return;
+ e.Cancel = true;
}
-
///
/// accountListBoxMenu remove button event
/// Deletes selected account
@@ -400,15 +363,13 @@ private void removeAccountToolStripMenuItem_Click(object sender, EventArgs e)
"Delete User", MessageBoxButtons.YesNo);
}
- if (diagResult == DialogResult.No)
- return;
+ if (diagResult == DialogResult.No) return;
/*Remove all accounts that matches that username*/
mSettings.Accounts.RemoveAll(o => o.Details.Username == mActiveAccount.Details.Username);
RefreshAccountList();
}
-
///
/// Adds a game id to the game list
///
@@ -418,8 +379,7 @@ private void txtGameItem_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
- int gameId = -1;
- if (int.TryParse(txtGameItem.Text, out gameId))
+ if (int.TryParse(txtGameItem.Text, out int gameId))
{
if (!mActiveAccount.Games.Contains(gameId))
{
@@ -434,7 +394,6 @@ private void txtGameItem_KeyDown(object sender, KeyEventArgs e)
}
}
-
///
/// Allows for the contextMenu to open on right click
///
@@ -450,7 +409,6 @@ private void gameList_MouseDown(object sender, MouseEventArgs e)
}
}
-
///
/// Cancels the opening of the menu if no listbox item is selected
///
@@ -458,11 +416,10 @@ private void gameList_MouseDown(object sender, MouseEventArgs e)
/// CancelEventArgs
private void gameListMenu_Opening(object sender, CancelEventArgs e)
{
- if (gameList.SelectedItem == null)
- e.Cancel = true;
+ if (gameList.SelectedItem != null) return;
+ e.Cancel = true;
}
-
///
/// Removes an gameid from gameList box
///
@@ -476,7 +433,6 @@ private void removeToolStripMenuItem_Click(object sender, EventArgs e)
RefreshGameList();
}
-
///
/// Prevents any typing in loginkey textbox
/// Not using ReadOnly because I don't like how it greys it out
@@ -484,66 +440,42 @@ private void removeToolStripMenuItem_Click(object sender, EventArgs e)
///
/// object
/// KeyPressEventArgs
- private void txtLoginKey_KeyPress(object sender, KeyPressEventArgs e)
- {
- e.Handled = true;
- }
-
-
+ private void txtLoginKey_KeyPress(object sender, KeyPressEventArgs e) => e.Handled = true;
+
///
/// lblRemoveLoginKey set textcolor to blue to show that it's highlighted
///
/// object
/// EventArgs
- private void lblRemoveLoginKey_MouseEnter(object sender, EventArgs e)
- {
- lblRemoveLoginKey.ForeColor = SystemColors.Highlight;
- }
-
-
+ private void lblRemoveLoginKey_MouseEnter(object sender, EventArgs e) => lblRemoveLoginKey.ForeColor = SystemColors.Highlight;
+
///
/// lblRemoveLoginKey set textcolor to blue to show that it's not highlighted
///
/// object
/// EventArgs
- private void lblRemoveLoginKey_MouseLeave(object sender, EventArgs e)
- {
- lblRemoveLoginKey.ForeColor = Color.Gray;
- }
-
-
+ private void lblRemoveLoginKey_MouseLeave(object sender, EventArgs e)=> lblRemoveLoginKey.ForeColor = Color.Gray;
+
///
/// Remove the loginkey text
///
/// object
/// EventArgs
- private void lblRemoveLoginKey_Click(object sender, EventArgs e)
- {
- txtLoginKey.Text = string.Empty;
- }
-
-
+ private void lblRemoveLoginKey_Click(object sender, EventArgs e) => txtLoginKey.Text = string.Empty;
+
///
/// lblFindGames set textcolor to blue to show that it's highlighted
///
/// object
/// EventArgs
- private void lblFindGames_MouseEnter(object sender, EventArgs e)
- {
- lblFindGames.ForeColor = SystemColors.Highlight;
- }
-
-
+ private void lblFindGames_MouseEnter(object sender, EventArgs e) => lblFindGames.ForeColor = SystemColors.Highlight;
+
///
/// lblFindGames set textcolor to blue to show that it's not highlighted
///
/// object
/// EventArgs
- private void lblFindGames_MouseLeave(object sender, EventArgs e)
- {
- lblFindGames.ForeColor = Color.Gray;
- }
-
+ private void lblFindGames_MouseLeave(object sender, EventArgs e) => lblFindGames.ForeColor = Color.Gray;
///
/// Opens game finder form
@@ -567,36 +499,21 @@ private void lblFindGames_Click(object sender, EventArgs e)
gameWindow.Close();
}
-
///
/// Check if both Community and OnlineStatus are checked
/// Then we can enable the Chat Response textbox
///
/// object
/// EventArgs
- private void cbCommunity_CheckedChanged(object sender, EventArgs e)
- {
- if (cbOnlineStatus.Checked && cbCommunity.Checked)
- txtResponse.Enabled = true;
- else
- txtResponse.Enabled = false;
- }
-
-
+ private void cbCommunity_CheckedChanged(object sender, EventArgs e) => txtResponse.Enabled = (cbOnlineStatus.Checked && cbCommunity.Checked);
+
///
/// Check if both Community and OnlineStatus are checked
/// Then we can enable the Chat Response textbox
///
/// object
/// EventArgs
- private void cbOnlineStatus_CheckedChanged(object sender, EventArgs e)
- {
- if (cbOnlineStatus.Checked && cbCommunity.Checked)
- txtResponse.Enabled = true;
- else
- txtResponse.Enabled = false;
- }
-
+ private void cbOnlineStatus_CheckedChanged(object sender, EventArgs e) => txtResponse.Enabled = (cbOnlineStatus.Checked && cbCommunity.Checked);
///
/// Starts HourBoostr if it exists in this folder
@@ -611,10 +528,10 @@ private void lblStartBooster_Click(object sender, EventArgs e)
return;
}
- if (File.Exists(Path.Combine(Application.StartupPath, "HourBoostr.exe")))
+ if (File.Exists(Path.Combine(Application.StartupPath, Const.HourBoostr.IDLER_EXE)))
{
var proc = new Process();
- proc.StartInfo.FileName = "HourBoostr.exe";
+ proc.StartInfo.FileName = Const.HourBoostr.IDLER_EXE;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
SaveAccountJson();
@@ -626,30 +543,22 @@ private void lblStartBooster_Click(object sender, EventArgs e)
}
else
{
- MessageBox.Show("Can't find HourBoostr.exe", "Woops..");
+ MessageBox.Show($"Can't find {Const.HourBoostr.IDLER_EXE}", "Woops..");
}
}
-
///
/// lblStartBooster set textcolor to blue to show that it's highlighted
///
/// object
/// EventArgs
- private void lblStartBooster_MouseEnter(object sender, EventArgs e)
- {
- lblStartBooster.ForeColor = SystemColors.Highlight;
- }
-
+ private void lblStartBooster_MouseEnter(object sender, EventArgs e) => lblStartBooster.ForeColor = SystemColors.Highlight;
///
/// lblStartBooster set textcolor to blue to show that it's not highlighted
///
/// object
/// EventArgs
- private void lblStartBooster_MouseLeave(object sender, EventArgs e)
- {
- lblStartBooster.ForeColor = Color.Gray;
- }
+ private void lblStartBooster_MouseLeave(object sender, EventArgs e) => lblStartBooster.ForeColor = Color.Gray;
}
}
diff --git a/Source/HourBoostr/App.config b/Source/HourBoostr/App.config
index 4d86e32..b595787 100644
--- a/Source/HourBoostr/App.config
+++ b/Source/HourBoostr/App.config
@@ -27,7 +27,7 @@
-
+
diff --git a/Source/HourBoostr/Properties/AssemblyInfo.cs b/Source/HourBoostr/Properties/AssemblyInfo.cs
index 521e3fb..9343a0d 100644
--- a/Source/HourBoostr/Properties/AssemblyInfo.cs
+++ b/Source/HourBoostr/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.1.8")]
-[assembly: AssemblyFileVersion("4.1.8")]
+[assembly: AssemblyVersion("4.1.9")]
+[assembly: AssemblyFileVersion("4.1.9")]
diff --git a/Source/SingleBoostr.Core/Enums/Messages.cs b/Source/SingleBoostr.Core/Enums/Messages.cs
new file mode 100644
index 0000000..5df2042
--- /dev/null
+++ b/Source/SingleBoostr.Core/Enums/Messages.cs
@@ -0,0 +1,7 @@
+namespace SingleBoostr.Core.Enums
+{
+ public enum Messages
+ {
+ EM_SETCUEBANNER = 0x1501
+ }
+}
diff --git a/Source/SingleBoostr.Core/Misc/Const.cs b/Source/SingleBoostr.Core/Misc/Const.cs
index 140a123..d919039 100644
--- a/Source/SingleBoostr.Core/Misc/Const.cs
+++ b/Source/SingleBoostr.Core/Misc/Const.cs
@@ -27,16 +27,25 @@ public sealed class Steam
public const string NAME = "Steam";
public static string EXE => $"{NAME}.exe";
public static SteamGroup GROUP = new SteamGroup(34411249, "Fallox");
- public const int MAX_GAMES = 33;
public static string APP_LIST_URL => Utils.STEAM_URL("api", "ISteamApps/GetAppList/v2");
public static string STORE_JSON_URL => Utils.STEAM_URL("store", "api/appdetails/?appids=");
public static string CARD_PRICE_URL => Utils.STEAM_URL("enhancedsteam", "market_data/average_card_prices/?cur=eur&appids=");
+ public static readonly int MAX_GAMES = 33;
+
+ public sealed class Example_Profile
+ {
+ public static readonly string NAME = "ღ uoh";
+ public static readonly string STEAMID = "76561199109931625";
+ public static readonly string CUSTOMURL = "U-oh";
+ public static string URL => Utils.STEAM_URL("community", $"profiles/{STEAMID}");
+ public static string URLCUSTOM => Utils.STEAM_URL("community", $"id/{CUSTOMURL}");
+ }
}
public sealed class SingleBoostr
{
public const string NAME = "SingleBoostr";
- public const string VERSION = "4.1.8";
+ public const string VERSION = "4.1.9";
public static string IDLER_EXE => $"{NAME}.Game.exe";
public static string APP_LIST => $"{NAME}.AppList.json";
public static string SETTINGS_FILE => $"{NAME}.Settings.json";
@@ -46,7 +55,7 @@ public sealed class SingleBoostr
public sealed class HourBoostr
{
public const string NAME = "HourBoostr";
- public const string VERSION = "4.1.8";
+ public const string VERSION = "4.1.9";
public static string IDLER_EXE => $"{NAME}.exe";
public static string SETTINGS_EXE => $"{NAME}.Settings.exe";
public static string SETTINGS_FILE => $"{NAME}.Settings.json";
diff --git a/Source/SingleBoostr.Core/Misc/Utils.cs b/Source/SingleBoostr.Core/Misc/Utils.cs
index 91de7be..60bf861 100644
--- a/Source/SingleBoostr.Core/Misc/Utils.cs
+++ b/Source/SingleBoostr.Core/Misc/Utils.cs
@@ -2,9 +2,11 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;
+using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.Win32;
+using SingleBoostr.Core.Enums;
namespace SingleBoostr.Core.Misc
{
@@ -19,6 +21,18 @@ public static class Utils
public static string Truncate(string value, int maxLength) => string.IsNullOrEmpty(value) ? value : value.Length <= maxLength ? value : value.Substring(0, maxLength) + "...";
public static string STEAM_URL(string sub, string request) => (sub.ToLower().Equals("community") ? "http://steamcommunity.com/" : sub.ToLower().Equals("enhancedsteam") ? "https://api.enhancedsteam.com/" : $"http://{sub.ToLower()}.steampowered.com/") + request;
public static string GITHUB_URL(bool raw, string request) => (raw ? "https://raw.githubusercontent.com/" : "https://github.com/") + request;
+
+ ///
+ /// SendMessage import
+ ///
+ /// IntPtr
+ /// int
+ /// int
+ /// [MarshalAs(UnmanagedType.LPWStr)]string
+ ///
+ [DllImport("user32.dll", CharSet = CharSet.Auto)]
+ private static extern int SendMessage(IntPtr hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);
+ public static int SendMessage(IntPtr hWnd, Messages msg, int wParam, string lParam) => SendMessage(hWnd, (int)msg, wParam, lParam);
///
/// Handles custom variable replacment
diff --git a/Source/SingleBoostr.Core/Properties/AssemblyInfo.cs b/Source/SingleBoostr.Core/Properties/AssemblyInfo.cs
index d20423e..05d90df 100644
--- a/Source/SingleBoostr.Core/Properties/AssemblyInfo.cs
+++ b/Source/SingleBoostr.Core/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.1.8")]
-[assembly: AssemblyFileVersion("4.1.8")]
+[assembly: AssemblyVersion("4.1.9")]
+[assembly: AssemblyFileVersion("4.1.9")]
diff --git a/Source/SingleBoostr.Core/SingleBoostr.Core.csproj b/Source/SingleBoostr.Core/SingleBoostr.Core.csproj
index 86af725..f6c96f7 100644
--- a/Source/SingleBoostr.Core/SingleBoostr.Core.csproj
+++ b/Source/SingleBoostr.Core/SingleBoostr.Core.csproj
@@ -35,8 +35,8 @@
x86
-
- ..\packages\AutoMapper.10.1.1\lib\net461\AutoMapper.dll
+
+ ..\packages\AutoMapper.7.0.1\lib\net45\AutoMapper.dll
..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
@@ -107,6 +107,9 @@
..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
+
@@ -117,6 +120,7 @@
+
diff --git a/Source/SingleBoostr.Core/app.config b/Source/SingleBoostr.Core/app.config
index 2259c01..e7a16df 100644
--- a/Source/SingleBoostr.Core/app.config
+++ b/Source/SingleBoostr.Core/app.config
@@ -16,7 +16,7 @@
-
+
diff --git a/Source/SingleBoostr.Core/packages.config b/Source/SingleBoostr.Core/packages.config
index 7886858..2aae698 100644
--- a/Source/SingleBoostr.Core/packages.config
+++ b/Source/SingleBoostr.Core/packages.config
@@ -1,6 +1,6 @@
-
+
@@ -22,4 +22,5 @@
+
\ No newline at end of file
diff --git a/Source/SingleBoostr.Game/App.config b/Source/SingleBoostr.Game/App.config
index 1342555..232ea2d 100644
--- a/Source/SingleBoostr.Game/App.config
+++ b/Source/SingleBoostr.Game/App.config
@@ -11,7 +11,7 @@
-
+
diff --git a/Source/SingleBoostr.Game/Properties/AssemblyInfo.cs b/Source/SingleBoostr.Game/Properties/AssemblyInfo.cs
index 043a717..e275183 100644
--- a/Source/SingleBoostr.Game/Properties/AssemblyInfo.cs
+++ b/Source/SingleBoostr.Game/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.1.8")]
-[assembly: AssemblyFileVersion("4.1.8")]
+[assembly: AssemblyVersion("4.1.9")]
+[assembly: AssemblyFileVersion("4.1.9")]
diff --git a/Source/SingleBoostr.Game/SingleBoostr.Game.csproj b/Source/SingleBoostr.Game/SingleBoostr.Game.csproj
index 1440247..e6db6b1 100644
--- a/Source/SingleBoostr.Game/SingleBoostr.Game.csproj
+++ b/Source/SingleBoostr.Game/SingleBoostr.Game.csproj
@@ -102,8 +102,8 @@
8.0
-
- ..\packages\AutoMapper.10.1.1\lib\net461\AutoMapper.dll
+
+ ..\packages\AutoMapper.7.0.1\lib\net45\AutoMapper.dll
..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
diff --git a/Source/SingleBoostr.Game/packages.config b/Source/SingleBoostr.Game/packages.config
index 9444ec6..163b6fb 100644
--- a/Source/SingleBoostr.Game/packages.config
+++ b/Source/SingleBoostr.Game/packages.config
@@ -1,6 +1,6 @@
-
+
diff --git a/Source/SingleBoostr/App.config b/Source/SingleBoostr/App.config
index e794c66..789e5f6 100644
--- a/Source/SingleBoostr/App.config
+++ b/Source/SingleBoostr/App.config
@@ -15,7 +15,7 @@
-
+
diff --git a/Source/SingleBoostr/Properties/AssemblyInfo.cs b/Source/SingleBoostr/Properties/AssemblyInfo.cs
index 99b6868..561fc58 100644
--- a/Source/SingleBoostr/Properties/AssemblyInfo.cs
+++ b/Source/SingleBoostr/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.1.8")]
-[assembly: AssemblyFileVersion("4.1.8")]
+[assembly: AssemblyVersion("4.1.9")]
+[assembly: AssemblyFileVersion("4.1.9")]
diff --git a/Source/SingleBoostr/SingleBoostr.csproj b/Source/SingleBoostr/SingleBoostr.csproj
index 283c4ed..9b6d8e6 100644
--- a/Source/SingleBoostr/SingleBoostr.csproj
+++ b/Source/SingleBoostr/SingleBoostr.csproj
@@ -63,8 +63,8 @@
SingleBoostr.Program
-
- ..\packages\AutoMapper.10.1.1\lib\net461\AutoMapper.dll
+
+ ..\packages\AutoMapper.7.0.1\lib\net45\AutoMapper.dll
..\packages\HtmlAgilityPack.1.11.37\lib\Net45\HtmlAgilityPack.dll
diff --git a/Source/SingleBoostr/packages.config b/Source/SingleBoostr/packages.config
index 048db90..502edcb 100644
--- a/Source/SingleBoostr/packages.config
+++ b/Source/SingleBoostr/packages.config
@@ -1,6 +1,6 @@
-
+
diff --git a/Source/Steam4NET/Properties/AssemblyInfo.cs b/Source/Steam4NET/Properties/AssemblyInfo.cs
index 75577d1..7752504 100644
--- a/Source/Steam4NET/Properties/AssemblyInfo.cs
+++ b/Source/Steam4NET/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.1.8")]
-[assembly: AssemblyFileVersion("4.1.8")]
+[assembly: AssemblyVersion("4.1.9")]
+[assembly: AssemblyFileVersion("4.1.9")]
diff --git a/version.json b/version.json
index 304d7a1..8e49ce2 100644
--- a/version.json
+++ b/version.json
@@ -2,13 +2,13 @@
"Applications": [
{
"Name":"SingleBoostr",
- "Version": "4.1.8",
+ "Version": "4.1.9",
"Info": "New features added, See Github for more info."
},
{
"Name":"HourBoostr",
- "Version": "4.1.8",
- "Info": "Bug fix, temp removed json encryption"
+ "Version": "4.1.9",
+ "Info": "Updated UI, Faster Preformance plus new features added!"
}
]
}