Skip to content

Commit ffa741c

Browse files
authored
Add files via upload
1 parent dfa308d commit ffa741c

83 files changed

Lines changed: 64814 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SafeNotes/AppManager.cs

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
// File: SafeNotes/EventHandlers.cs
22
using MaterialSkin;
3+
using Newtonsoft.Json.Linq;
34
using System;
45
using System.Diagnostics;
56
using System.Drawing;
67
using System.IO;
7-
using System.Windows.Forms;
8-
using System.Security.Cryptography;
9-
using System.Security;
8+
using System.Linq;
9+
using System.Net.Http;
1010
using System.Runtime.InteropServices;
11-
using System.Text.RegularExpressions;
11+
using System.Security;
12+
using System.Security.Cryptography;
1213
using System.Text;
13-
using System.Linq;
14+
using System.Text.RegularExpressions;
15+
using System.Threading.Tasks;
16+
using System.Windows.Forms;
1417

1518
namespace SafeNotes
1619
{
@@ -89,6 +92,37 @@ private async void MainForm_Load(object sender, EventArgs e)
8992
ApplyDateCheckbox.Checked = _settings.SaveDate;
9093
DisableNotificationsCheckbox.Checked = _settings.DisableNotifications;
9194
RequirePinToLogin.Checked = _settings.RequirePinCode;
95+
96+
// Fetch latest release info to populate ReleaseNotesMultiText
97+
try
98+
{
99+
using (var http = new HttpClient())
100+
{
101+
http.DefaultRequestHeaders.UserAgent.ParseAdd("SafeNotesUpdater/1.0");
102+
string repo = "Thymester/SafeNotes";
103+
104+
// Get all releases as JSON array
105+
var json = await http.GetStringAsync($"https://api.github.com/repos/{repo}/releases");
106+
var releases = JArray.Parse(json);
107+
108+
ReleaseNotesMultiText.Clear();
109+
110+
foreach (var release in releases)
111+
{
112+
string latestVersion = release["tag_name"]?.ToString() ?? "Unknown";
113+
string releaseTitle = release["name"]?.ToString() ?? "No title";
114+
string releaseBody = release["body"]?.ToString() ?? "No changelog available";
115+
116+
ReleaseNotesMultiText.AppendText(
117+
$"Title: {releaseTitle}\r\nVersion: {latestVersion}\r\n\nChangelog:\r\n{releaseBody}\r\n\r\n------------------------\r\n\r\n"
118+
);
119+
}
120+
}
121+
}
122+
catch (Exception ex)
123+
{
124+
ReleaseNotesMultiText.Text = $"Unable to fetch release notes: {ex.Message}";
125+
}
92126
}
93127

94128
private void RequirePenToLogin_CheckedChanged(object sender, EventArgs e)

SafeNotes/AppSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// File: SafeNotes/AppSettings.cs
12
public class AppSettings
23
{
34
public string UserPassword { get; set; } = string.Empty;

SafeNotes/EventHandlers.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// File: SafeNotes/EventHandlers.cs
22
using Newtonsoft.Json.Linq;
3-
using System.Net.Http;
4-
using System.IO;
5-
using System.Windows.Forms;
6-
using System.Diagnostics;
7-
using System.Threading.Tasks;
3+
using SafeNotes;
84
using System;
95
using System.Collections.Generic;
6+
using System.Diagnostics;
7+
using System.IO;
108
using System.Linq;
9+
using System.Net.Http;
10+
using System.Threading.Tasks;
11+
using System.Windows.Forms;
1112

1213
public class EventHandlerClass
1314
{
@@ -146,4 +147,3 @@ echo Update complete >> ""{logPath}""
146147
}
147148
}
148149
}
149-

SafeNotes/MainForm.Designer.cs

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

SafeNotes/MainForm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// File: SafeNotes/mainForm.cs
22
using MaterialSkin;
33
using MaterialSkin.Controls;
4+
using System;
45
using System.Windows.Forms;
56

67
namespace SafeNotes

SafeNotes/MainForm.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@
150150
<metadata name="LabelVisibilityTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
151151
<value>309, 18</value>
152152
</metadata>
153+
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
154+
<value>58</value>
155+
</metadata>
153156
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
154157
<value>
155158
AAABAAkAEBAAAAEAIABoBAAAlgAAABgYAAABACAAiAkAAP4EAAAgIAAAAQAgAKgQAACGDgAAMDAAAAEA

SafeNotes/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
// File: SafeNotes/Program.cs
2+
using System;
23
using System.Windows.Forms;
34

45
namespace SafeNotes

SafeNotes/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
// it resets to zero and then increments the Major release. Bug releases are the typical release but can increment Minor releases if they are at 9 and the build is also at 9.
2828

2929
// Set version information for an assembly:
30-
[assembly: AssemblyVersion("1.4.0.0")] // MAJOR.MINOR.BUGS.BUILD
31-
[assembly: AssemblyFileVersion("1.4.0.0")] // MAJOR.MINOR.BUGS.BUILD
30+
[assembly: AssemblyVersion("1.4.3.0")] // MAJOR.MINOR.BUGS.BUILD
31+
[assembly: AssemblyFileVersion("1.4.3.0")] // MAJOR.MINOR.BUGS.BUILD
6.43 MB
Binary file not shown.
557 KB
Binary file not shown.

0 commit comments

Comments
 (0)