Skip to content

Commit

Permalink
Merge branch 'bugfix/issue-1872/profile-info' into release
Browse files Browse the repository at this point in the history
Closes #1872
  • Loading branch information
phw198 committed Jun 16, 2024
2 parents 515b7b4 + 6a04eb0 commit 8a8293c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 8 deletions.
26 changes: 21 additions & 5 deletions src/OutlookGoogleCalendarSync/Forms/ProfileManage.Designer.cs

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

29 changes: 26 additions & 3 deletions src/OutlookGoogleCalendarSync/Forms/ProfileManage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ public ProfileManage(String action, ComboBox ddProfile) {
this.txtProfileName.Text = ddProfile.Text;
}

if (!Settings.Instance.UserIsBenefactor()) {
if (Settings.Instance.UserIsBenefactor()) {
panelDonationNote.Visible = false;
this.Height = 135;
this.Height = 185;
} else {
panelDonationNote.Visible = true;
this.Height = 255;
this.Height = 310;
}
}

Expand Down Expand Up @@ -81,5 +81,28 @@ private void ProfileManage_FormClosing(object sender, FormClosingEventArgs e) {
private void pbDonate_Click(object sender, EventArgs e) {
Program.Donate("Profiles");
}

/// <summary>
/// Detect when F1 is pressed for help
/// </summary>
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
try {
if (keyData == Keys.F1) {
try {
Helper.OpenBrowser(Program.OgcsWebsite + "/guide/settings");
return true; //This keystroke was handled, don't pass to the control with the focus
} catch (System.Exception ex) {
log.Warn("Failed to process captured F1 key.");
Ogcs.Exception.Analyse(ex);
System.Diagnostics.Process.Start(Program.OgcsWebsite + "/guide/settings");
return true;
}
}
} catch (System.Exception ex) {
log.Warn("Failed to process captured command key.");
Ogcs.Exception.Analyse(ex);
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
}

0 comments on commit 8a8293c

Please sign in to comment.