Skip to content

Commit

Permalink
Introduced a simple GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ciao1092 committed May 6, 2023
1 parent 35c1a6f commit 6aa2091
Show file tree
Hide file tree
Showing 8 changed files with 639 additions and 104 deletions.
24 changes: 19 additions & 5 deletions IELauncher-setup/IELauncher-setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Internet Explorer Launcher"
"ProductCode" = "8:{A6233FA0-011D-4542-8B1C-1A718C540C31}"
"PackageCode" = "8:{00F19482-C55D-4C1A-9050-E6620AF10143}"
"ProductCode" = "8:{E6079CF5-6BEF-46E2-B448-EC301ACC4C72}"
"PackageCode" = "8:{958A7D10-4830-48A2-B758-E9C0283FE01E}"
"UpgradeCode" = "8:{815B85C8-159A-4343-BCB9-71606837330A}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.1"
"ProductVersion" = "8:2.0.0"
"Manufacturer" = "8:ciao1092"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:https://github.com/ciao1092/IELauncher/issues"
Expand All @@ -293,7 +293,7 @@
"ARPCONTACT" = "8:ciao1092"
"Keywords" = "8:"
"ARPCOMMENTS" = "8:Install ciao1092's Internet Explorer Launcher"
"ARPURLINFOABOUT" = "8:https://ciao1092.github.io"
"ARPURLINFOABOUT" = "8:https://ciao1092.github.io/"
"ARPPRODUCTICON" = "8:_D9D14A42FF7147AAB9C0690071930D78"
"ARPIconIndex" = "3:0"
"SearchPath" = "8:"
Expand Down Expand Up @@ -401,7 +401,21 @@
{
"Name" = "8:Internet Explorer"
"Arguments" = "8:"
"Description" = "8:"
"Description" = "8:Launch Internet Explorer"
"ShowCmd" = "3:1"
"IconIndex" = "3:0"
"Transitive" = "11:FALSE"
"Target" = "8:_9DBE96CA6F5647699802957ACE25CC8B"
"Folder" = "8:_918381D1C22944CD80E32A258E402778"
"WorkingFolder" = "8:_2D004DBFF97E4300A7357FFA7598421C"
"Icon" = "8:_D9D14A42FF7147AAB9C0690071930D78"
"Feature" = "8:"
}
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_AC01A68D432342119869BB07C4AABBA7"
{
"Name" = "8:Internet Explorer Launcher GUI"
"Arguments" = "8:/gui:true"
"Description" = "8:A simple GUI for the Internet Explorer Launcher"
"ShowCmd" = "3:1"
"IconIndex" = "3:0"
"Transitive" = "11:FALSE"
Expand Down
3 changes: 2 additions & 1 deletion IELauncher.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Global
{38B3AEC6-FC7C-4316-B033-00C7D8125968}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38B3AEC6-FC7C-4316-B033-00C7D8125968}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38B3AEC6-FC7C-4316-B033-00C7D8125968}.Release|Any CPU.Build.0 = Release|Any CPU
{A4CF426E-B5F5-4048-93DD-1CE23A31A40F}.Debug|Any CPU.ActiveCfg = Debug
{A4CF426E-B5F5-4048-93DD-1CE23A31A40F}.Debug|Any CPU.ActiveCfg = Release
{A4CF426E-B5F5-4048-93DD-1CE23A31A40F}.Release|Any CPU.ActiveCfg = Release
{A4CF426E-B5F5-4048-93DD-1CE23A31A40F}.Release|Any CPU.Build.0 = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion IELauncher/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<userSettings>
<IELauncher.Properties.Settings>
<setting name="StartupURL" serializeAs="String">
<value>about:blank</value>
<value>https://ciao1092.github.io/</value>
</setting>
</IELauncher.Properties.Settings>
</userSettings>
Expand Down
151 changes: 151 additions & 0 deletions IELauncher/Gui.Designer.cs

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

87 changes: 87 additions & 0 deletions IELauncher/Gui.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
using IELauncher.Properties;
using System.Diagnostics;
using System.Linq.Expressions;
using System.Reflection;
using System.Windows.Forms;

namespace IELauncher
{
public partial class Gui : Form
{
public Gui()
{
InitializeComponent();
}

public string CurrentVersion
{
get
{
string? productVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion;
if (productVersion != null)
return productVersion;
else return string.Empty;
}
}

private void applyButton_Click(object sender, EventArgs e)
{
saveSettings();
cancelButton.Text = "Close";
((Button)sender).Enabled = false;
}

private void saveSettings()
{
if (string.IsNullOrWhiteSpace(startUpUrlTextBox.Text))
{
startUpUrlTextBox.Text = "about:blank";
}

Settings.Default.StartupURL = startUpUrlTextBox.Text;
Settings.Default.Save();
return;
}

private void Gui_FormClosing(object sender, FormClosingEventArgs e)
{
if (DialogResult == DialogResult.None)
{
DialogResult = DialogResult.Cancel;
}
}

private void cancelButton_Click(object sender, EventArgs e)
{
Close();
}

private void OKButton_Click(object sender, EventArgs e)
{
saveSettings();
DialogResult = DialogResult.OK;
Close();
}

private void Gui_Load(object sender, EventArgs e)
{
startUpUrlTextBox.Text = Settings.Default.StartupURL;
applyButton.Enabled = false;
}

private void startUpUrlTextBox_TextChanged(object sender, EventArgs e)
{
cancelButton.Text = "Cancel";
applyButton.Enabled = true;
}

private void aboutLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
aboutLink.LinkVisited = true;
ProcessStartInfo startInfo = new();
startInfo.FileName = "https://github.com/ciao1092/IELauncher/";
startInfo.UseShellExecute = true;
Process.Start(startInfo);
}
}
}
Loading

0 comments on commit 6aa2091

Please sign in to comment.