Skip to content

Commit

Permalink
Settings: Add reset, remove URL register buttons for now
Browse files Browse the repository at this point in the history
  • Loading branch information
InvisibleUp committed May 22, 2020
1 parent 8b3c9fa commit fcb8277
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 35 deletions.
2 changes: 1 addition & 1 deletion TwinPeaks/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private async void htmlContent_LinkClicked(object sender, HtmlLinkClickedEventAr

try {
newUri = new Uri(evt.Link);
} catch (Exception e) {
} catch (Exception) {
try {
newUri = new Uri(history[historyPos], evt.Link);
} catch (Exception e2) {
Expand Down
50 changes: 18 additions & 32 deletions TwinPeaks/Forms/Settings.Designer.cs

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

10 changes: 8 additions & 2 deletions TwinPeaks/Forms/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,16 @@ private void btnCancel_Click(object sender, EventArgs e)
this.Close();
}

private void btnReset_Click(object sender, EventArgs e)
{
Properties.Settings.Default.Reset();
this.Close();
}

// TODO: this probably isn't the way to handle this...
private void btnRegHandler_Click(object sender, EventArgs e)
{
RegistryKey key = Registry.ClassesRoot.OpenSubKey("TwinPeaksGemini"); //open myApp protocol's subkey
RegistryKey key = Registry.ClassesRoot.OpenSubKey("TwinPeaksGemini");
string appPath = Environment.GetCommandLineArgs()[0];

if (key == null)
Expand All @@ -166,7 +173,6 @@ private void btnRegHandler_Click(object sender, EventArgs e)

key.Close();
}

private void btnUnregHandler_Click(object sender, EventArgs e)
{
Registry.ClassesRoot.DeleteSubKeyTree("TwinPeaksGemini");
Expand Down

0 comments on commit fcb8277

Please sign in to comment.