Skip to content

Commit

Permalink
1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
michioxd committed Feb 9, 2024
1 parent bf35c06 commit 00191dc
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 34 deletions.
30 changes: 15 additions & 15 deletions MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace TinyDRPC
{
public partial class MainForm : Form
{
public string CurrentVersion = "1.1";
public string CurrentVersion = "1.2";
private DiscordRpcClient? drpc;

public MainForm()
Expand Down Expand Up @@ -119,18 +119,6 @@ private void MainForm_Load(object sender, EventArgs e)
runMinimized.Enabled = runOnStartup.Checked;
versionLabel.Text = $"Version: {CurrentVersion} - powered by michioxd";

if (config.runMinimized && config.runOnStartup)
{
System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback((obj) =>
{
this.Invoke(new MethodInvoker(delegate ()
{
tinyDrpcNotifyIcon.Visible = true;
Hide();
}));
}), null, 50, Timeout.Infinite);
}

if (checkUpdateOnStartup.Checked)
{
CheckForUpdate();
Expand All @@ -145,6 +133,18 @@ private void MainForm_Load(object sender, EventArgs e)
{
case 0: _ = new DarkModeCS(this); break;
}

if (config.runMinimized && config.runOnStartup)
{
System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback((obj) =>
{
this.Invoke(new MethodInvoker(delegate ()
{
tinyDrpcNotifyIcon.Visible = true;
Hide();
}));
}), null, 100, Timeout.Infinite);
}
}

private void topText_TextChanged(object sender, EventArgs e)
Expand Down
3 changes: 2 additions & 1 deletion TinyDRPC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<PackageIcon>tinydrpc_100x100.png</PackageIcon>
<RepositoryUrl>https://github.com/michioxd/TinyDRPC</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Version>1.1</Version>
<Version>1.2</Version>
<AssemblyVersion>1.2</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TinyDRPC.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "CodeDependencies.iss"

#define MyAppName "TinyDRPC"
#define MyAppVersion "1.1"
#define MyAppVersion "1.2"
#define MyAppPublisher "michioxd"
#define MyAppURL "https://github.com/michioxd/TinyDRPC"
#define MyAppExeName "TinyDRPC.exe"
Expand Down
8 changes: 4 additions & 4 deletions Utils/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public Configuration LoadConfiguration()

foreach (string line in lines)
{
string[] parts = line.Split('=');
if (parts.Length == 2)
int index = line.IndexOf('=');
if (index > 0)
{
string key = parts[0].Trim();
string value = parts[1].Trim();
string key = line.Substring(0, index).Trim();
string value = line.Substring(index + 1).Trim();
SetProperty(config, key, value);
}
}
Expand Down

0 comments on commit 00191dc

Please sign in to comment.