Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 00191dc

Browse files
committed
1.2
1 parent bf35c06 commit 00191dc

File tree

5 files changed

+35
-34
lines changed

5 files changed

+35
-34
lines changed

MainForm.Designer.cs

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MainForm.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace TinyDRPC
99
{
1010
public partial class MainForm : Form
1111
{
12-
public string CurrentVersion = "1.1";
12+
public string CurrentVersion = "1.2";
1313
private DiscordRpcClient? drpc;
1414

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

122-
if (config.runMinimized && config.runOnStartup)
123-
{
124-
System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback((obj) =>
125-
{
126-
this.Invoke(new MethodInvoker(delegate ()
127-
{
128-
tinyDrpcNotifyIcon.Visible = true;
129-
Hide();
130-
}));
131-
}), null, 50, Timeout.Infinite);
132-
}
133-
134122
if (checkUpdateOnStartup.Checked)
135123
{
136124
CheckForUpdate();
@@ -145,6 +133,18 @@ private void MainForm_Load(object sender, EventArgs e)
145133
{
146134
case 0: _ = new DarkModeCS(this); break;
147135
}
136+
137+
if (config.runMinimized && config.runOnStartup)
138+
{
139+
System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback((obj) =>
140+
{
141+
this.Invoke(new MethodInvoker(delegate ()
142+
{
143+
tinyDrpcNotifyIcon.Visible = true;
144+
Hide();
145+
}));
146+
}), null, 100, Timeout.Infinite);
147+
}
148148
}
149149

150150
private void topText_TextChanged(object sender, EventArgs e)

TinyDRPC.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<PackageIcon>tinydrpc_100x100.png</PackageIcon>
1717
<RepositoryUrl>https://github.com/michioxd/TinyDRPC</RepositoryUrl>
1818
<PackageReadmeFile>README.md</PackageReadmeFile>
19-
<Version>1.1</Version>
19+
<Version>1.2</Version>
20+
<AssemblyVersion>1.2</AssemblyVersion>
2021
</PropertyGroup>
2122

2223
<ItemGroup>

TinyDRPC.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "CodeDependencies.iss"
66

77
#define MyAppName "TinyDRPC"
8-
#define MyAppVersion "1.1"
8+
#define MyAppVersion "1.2"
99
#define MyAppPublisher "michioxd"
1010
#define MyAppURL "https://github.com/michioxd/TinyDRPC"
1111
#define MyAppExeName "TinyDRPC.exe"

Utils/Configuration.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public Configuration LoadConfiguration()
3939

4040
foreach (string line in lines)
4141
{
42-
string[] parts = line.Split('=');
43-
if (parts.Length == 2)
42+
int index = line.IndexOf('=');
43+
if (index > 0)
4444
{
45-
string key = parts[0].Trim();
46-
string value = parts[1].Trim();
45+
string key = line.Substring(0, index).Trim();
46+
string value = line.Substring(index + 1).Trim();
4747
SetProperty(config, key, value);
4848
}
4949
}

0 commit comments

Comments
 (0)