Skip to content

Commit aa41ae4

Browse files
Enhance - Remove Unused Functions and codes
Enhance - Make Target Other Location forms modifiable Enhance - Make a textbox holding the selected path of the target location explorer form Enhance - Implements Manual Application Check Update... Enhance - Enhance the order of added target locations number from descending to ascending. New folder was set to bottom instead of top Enhance - Play the Windows Chime sound after successfull Zip Archiving run Fix Bug - Fix box when right mouse click on root node Fix Bug - Correct the mispelled messages
1 parent cf079ce commit aa41ae4

Some content is hidden

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

48 files changed

+13242
-1837
lines changed

.vs/OneClickZip/v16/.suo

-60 KB
Binary file not shown.

App.config

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<value>0</value>
1818
</setting>
1919
<setting name="app_version_patch" serializeAs="String">
20-
<value>3</value>
20+
<value>4</value>
2121
</setting>
2222
<setting name="app_version_revision" serializeAs="String">
2323
<value>r1</value>
@@ -35,11 +35,29 @@
3535
<value>Github Link</value>
3636
</setting>
3737
<setting name="about_website_link" serializeAs="String">
38-
<value>https://github.com/AngelsSoftwareOrg/OneClickZip</value>
38+
<value>https://github.com/{0}/{1}</value>
3939
</setting>
4040
<setting name="LAST_OPENED_DIRECTORY" serializeAs="String">
4141
<value />
4242
</setting>
43+
<setting name="github_api_endpoint" serializeAs="String">
44+
<value>https://api.github.com</value>
45+
</setting>
46+
<setting name="github_api_endpoint_latest_release" serializeAs="String">
47+
<value>/repos/{0}/{1}/releases/latest</value>
48+
</setting>
49+
<setting name="app_organization" serializeAs="String">
50+
<value>AngelsSoftwareOrg</value>
51+
</setting>
52+
<setting name="app_name" serializeAs="String">
53+
<value>OneClickZip</value>
54+
</setting>
55+
<setting name="github_username" serializeAs="String">
56+
<value>angelsburger90</value>
57+
</setting>
58+
<setting name="github_access_token" serializeAs="String">
59+
<value>fba0a3bd40a064a</value>
60+
</setting>
4361
</OneClickZip.Properties.Settings>
4462
</applicationSettings>
4563
<runtime>
@@ -60,6 +78,10 @@
6078
<assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
6179
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
6280
</dependentAssembly>
81+
<dependentAssembly>
82+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
83+
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
84+
</dependentAssembly>
6385
</assemblyBinding>
6486
</runtime>
6587
</configuration>

Forms/Help/AboutFrm.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public partial class AboutFrm : Form
1616
public AboutFrm()
1717
{
1818
InitializeComponent();
19-
2019
}
2120

2221
private void About_Load(object sender, EventArgs e)
@@ -25,7 +24,7 @@ private void About_Load(object sender, EventArgs e)
2524
txtBoxAuthor.Text = Properties.Settings.Default.about_author;
2625
txtBoxEmail.Text = Properties.Settings.Default.about_email;
2726
txtBoxWebsiteTitle.Text = Properties.Settings.Default.about_website_title;
28-
txtBoxWebSiteLink.Text = Properties.Settings.Default.about_website_link;
27+
txtBoxWebSiteLink.Text = ApplicationSettings.ApplicationWebsiteLink;
2928
txtBoxVersion.Text = ApplicationSettings.ApplicationVersion;
3029
}
3130

Forms/Help/UpdatesFrm.Designer.cs

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

Forms/Help/UpdatesFrm.cs

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Data;
5+
using System.Drawing;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
using System.Windows.Forms;
10+
using OneClickZip.Includes.Classes;
11+
using OneClickZip.Includes.Interface.API;
12+
using OneClickZip.Includes.Resources;
13+
14+
namespace OneClickZip.Forms.Help
15+
{
16+
public partial class UpdatesFrm : Form
17+
{
18+
private ProjectRepositoryEndpoint projectRepositoryEndpoint = new ProjectRepositoryEndpoint();
19+
20+
public UpdatesFrm()
21+
{
22+
InitializeComponent();
23+
}
24+
25+
private void btnCheckForUpdate_Click(object sender, EventArgs e)
26+
{
27+
try
28+
{
29+
btnCheckForUpdate.Enabled = false;
30+
richTxtBoxMessage.Clear();
31+
AddRichtextMessage("Application version:", Color.Black);
32+
AddRichtextMessage(" > " + ApplicationSettings.ApplicationVersion, Color.Orange);
33+
AddRichtextMessage(Environment.NewLine, Color.Black);
34+
AddRichtextMessage("Checking for updates...", Color.Black);
35+
IRepositoryRelease release = projectRepositoryEndpoint.RepositoryLatestRelease();
36+
37+
if (projectRepositoryEndpoint.IsApplicationVersionUpToDate(release))
38+
{
39+
AddRichtextMessage(Environment.NewLine, Color.Black);
40+
AddRichtextMessage("[Release Notice of this update]", Color.Blue);
41+
AddRichtextMessage(release.ReleaseNote, Color.Black);
42+
AddRichtextMessage(Environment.NewLine, Color.Black);
43+
AddRichtextMessage("Application is up to date...", Color.Green);
44+
AddRichtextMessage(Environment.NewLine, Color.Black);
45+
}
46+
else
47+
{
48+
AddRichtextMessage(Environment.NewLine, Color.Black);
49+
AddRichtextMessage("!!! A new version was available !!!", Color.Orange);
50+
AddRichtextMessage(Environment.NewLine, Color.Black);
51+
AddRichtextMessage("[New Version]", Color.Blue);
52+
AddRichtextMessage(release.ReleaseTagName, Color.Black);
53+
AddRichtextMessage(Environment.NewLine, Color.Black);
54+
AddRichtextMessage("[Release Notice]", Color.Blue);
55+
AddRichtextMessage(release.ReleaseNote, Color.Black);
56+
AddRichtextMessage(Environment.NewLine, Color.Black);
57+
AddRichtextMessage("[Release package download URL]", Color.Blue);
58+
AddRichtextMessage(release.ReleaseURL, Color.Black);
59+
}
60+
}
61+
catch (Exception ex)
62+
{
63+
AddRichtextMessage(Environment.NewLine, Color.Black);
64+
AddRichtextMessage(">>>>>>>>>>", Color.DarkBlue);
65+
AddRichtextMessage(ex.Message, Color.Red);
66+
AddRichtextMessage("<<<<<<<<<<", Color.DarkBlue);
67+
AddRichtextMessage(Environment.NewLine, Color.Black);
68+
AddRichtextMessage("Try again later to refresh request update quota or if your internet is stable...", Color.Orange);
69+
}
70+
btnCheckForUpdate.Enabled = true;
71+
}
72+
73+
private void btnExit_Click(object sender, EventArgs e)
74+
{
75+
this.Close();
76+
}
77+
78+
private void AddRichtextMessage(String message, Color color)
79+
{
80+
richTxtBoxMessage.SelectionStart = richTxtBoxMessage.TextLength;
81+
richTxtBoxMessage.SelectionLength = 0;
82+
83+
richTxtBoxMessage.SelectionColor = color;
84+
richTxtBoxMessage.AppendText(message);
85+
richTxtBoxMessage.SelectionColor = richTxtBoxMessage.ForeColor;
86+
richTxtBoxMessage.AppendText(Environment.NewLine);
87+
richTxtBoxMessage.ScrollToCaret();
88+
}
89+
90+
}
91+
}

0 commit comments

Comments
 (0)