main: Added help menu

This commit is contained in:
Nathan Woodburn 2023-06-14 17:30:47 +10:00
parent 7c38bfc755
commit 5eb80bcd06
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
3 changed files with 93 additions and 3 deletions

View File

@ -41,6 +41,10 @@ namespace FireWallet
toolStripStatusLabelaccount = new ToolStripStatusLabel(); toolStripStatusLabelaccount = new ToolStripStatusLabel();
toolStripStatusLabelLedger = new ToolStripStatusLabel(); toolStripStatusLabelLedger = new ToolStripStatusLabel();
toolStripSplitButtonlogout = new ToolStripSplitButton(); toolStripSplitButtonlogout = new ToolStripSplitButton();
toolStripDropDownButtonHelp = new ToolStripDropDownButton();
githubToolStripMenuItem = new ToolStripMenuItem();
websiteToolStripMenuItem = new ToolStripMenuItem();
supportDiscordServerToolStripMenuItem = new ToolStripMenuItem();
timerNodeStatus = new System.Windows.Forms.Timer(components); timerNodeStatus = new System.Windows.Forms.Timer(components);
panelaccount = new Panel(); panelaccount = new Panel();
groupBoxaccount = new GroupBox(); groupBoxaccount = new GroupBox();
@ -139,7 +143,7 @@ namespace FireWallet
// statusStripmain // statusStripmain
// //
statusStripmain.Dock = DockStyle.Top; statusStripmain.Dock = DockStyle.Top;
statusStripmain.Items.AddRange(new ToolStripItem[] { toolStripStatusLabelNetwork, toolStripStatusLabelstatus, toolStripStatusLabelaccount, toolStripStatusLabelLedger, toolStripSplitButtonlogout }); statusStripmain.Items.AddRange(new ToolStripItem[] { toolStripStatusLabelNetwork, toolStripStatusLabelstatus, toolStripStatusLabelaccount, toolStripStatusLabelLedger, toolStripSplitButtonlogout, toolStripDropDownButtonHelp });
statusStripmain.Location = new Point(0, 0); statusStripmain.Location = new Point(0, 0);
statusStripmain.Name = "statusStripmain"; statusStripmain.Name = "statusStripmain";
statusStripmain.Size = new Size(1152, 22); statusStripmain.Size = new Size(1152, 22);
@ -190,6 +194,39 @@ namespace FireWallet
toolStripSplitButtonlogout.Visible = false; toolStripSplitButtonlogout.Visible = false;
toolStripSplitButtonlogout.ButtonClick += Logout; toolStripSplitButtonlogout.ButtonClick += Logout;
// //
// toolStripDropDownButtonHelp
//
toolStripDropDownButtonHelp.DisplayStyle = ToolStripItemDisplayStyle.Text;
toolStripDropDownButtonHelp.DropDownItems.AddRange(new ToolStripItem[] { githubToolStripMenuItem, websiteToolStripMenuItem, supportDiscordServerToolStripMenuItem });
toolStripDropDownButtonHelp.Image = (Image)resources.GetObject("toolStripDropDownButtonHelp.Image");
toolStripDropDownButtonHelp.ImageTransparentColor = Color.Magenta;
toolStripDropDownButtonHelp.Margin = new Padding(20, 2, 0, 0);
toolStripDropDownButtonHelp.Name = "toolStripDropDownButtonHelp";
toolStripDropDownButtonHelp.Size = new Size(45, 20);
toolStripDropDownButtonHelp.Text = "Help";
toolStripDropDownButtonHelp.ToolTipText = "Help";
//
// githubToolStripMenuItem
//
githubToolStripMenuItem.Name = "githubToolStripMenuItem";
githubToolStripMenuItem.Size = new Size(194, 22);
githubToolStripMenuItem.Text = "Github";
githubToolStripMenuItem.Click += githubToolStripMenuItem_Click;
//
// websiteToolStripMenuItem
//
websiteToolStripMenuItem.Name = "websiteToolStripMenuItem";
websiteToolStripMenuItem.Size = new Size(194, 22);
websiteToolStripMenuItem.Text = "Website";
websiteToolStripMenuItem.Click += websiteToolStripMenuItem_Click;
//
// supportDiscordServerToolStripMenuItem
//
supportDiscordServerToolStripMenuItem.Name = "supportDiscordServerToolStripMenuItem";
supportDiscordServerToolStripMenuItem.Size = new Size(194, 22);
supportDiscordServerToolStripMenuItem.Text = "Support Discord Server";
supportDiscordServerToolStripMenuItem.Click += supportDiscordServerToolStripMenuItem_Click;
//
// timerNodeStatus // timerNodeStatus
// //
timerNodeStatus.Enabled = true; timerNodeStatus.Enabled = true;
@ -1137,5 +1174,9 @@ namespace FireWallet
private Button buttonRevealAll; private Button buttonRevealAll;
private Button buttonExportDomains; private Button buttonExportDomains;
private Button buttonRenewAll; private Button buttonRenewAll;
private ToolStripDropDownButton toolStripDropDownButtonHelp;
private ToolStripMenuItem githubToolStripMenuItem;
private ToolStripMenuItem websiteToolStripMenuItem;
private ToolStripMenuItem supportDiscordServerToolStripMenuItem;
} }
} }

View File

@ -48,6 +48,14 @@ namespace FireWallet
timerNodeStatus.Stop(); timerNodeStatus.Stop();
LoadSettings(); LoadSettings();
UpdateTheme(); UpdateTheme();
// Theme drop down
foreach (ToolStripMenuItem c in toolStripDropDownButtonHelp.DropDownItems)
{
c.ForeColor = ColorTranslator.FromHtml(theme["foreground"]);
c.BackColor = ColorTranslator.FromHtml(theme["background"]);
}
toolStripDropDownButtonHelp.DropDown.BackColor = ColorTranslator.FromHtml(theme["background"]);
if (await LoadNode() != true) this.Close(); if (await LoadNode() != true) this.Close();
@ -903,7 +911,8 @@ namespace FireWallet
if (watchOnly) if (watchOnly)
{ {
APIresponse = await APIPost("", true, "{\"method\": \"listtransactions\",\"params\": [\"default\"," + toGet + "," + toSkip + ", true]}"); APIresponse = await APIPost("", true, "{\"method\": \"listtransactions\",\"params\": [\"default\"," + toGet + "," + toSkip + ", true]}");
} else }
else
{ {
APIresponse = await APIPost("", true, "{\"method\": \"listtransactions\",\"params\": [\"default\"," + toGet + "," + toSkip + "]}"); APIresponse = await APIPost("", true, "{\"method\": \"listtransactions\",\"params\": [\"default\"," + toGet + "," + toSkip + "]}");
} }
@ -1983,5 +1992,36 @@ namespace FireWallet
AddBatch(domain, "RENEW"); AddBatch(domain, "RENEW");
} }
} }
private void githubToolStripMenuItem_Click(object sender, EventArgs e)
{
// Open the GitHub page
ProcessStartInfo psi = new ProcessStartInfo
{
FileName = "https://github.com/Nathanwoodburn/FireWallet/",
UseShellExecute = true
};
Process.Start(psi);
}
private void websiteToolStripMenuItem_Click(object sender, EventArgs e)
{
ProcessStartInfo psi = new ProcessStartInfo
{
FileName = "https://firewallet",
UseShellExecute = true
};
Process.Start(psi);
}
private void supportDiscordServerToolStripMenuItem_Click(object sender, EventArgs e)
{
ProcessStartInfo psi = new ProcessStartInfo
{
FileName = "https://l.woodburn.au/discord",
UseShellExecute = true
};
Process.Start(psi);
}
} }
} }

View File

@ -120,10 +120,19 @@
<metadata name="statusStripmain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="statusStripmain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>133, 17</value> <value>133, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripDropDownButtonHelp.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<metadata name="timerNodeStatus.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timerNodeStatus.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>269, 17</value> <value>269, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAEAAAAAAAEAIAB2pAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAOEAAADAAgGAAAAfG+p9QAAIABJ AAABAAEAAAAAAAEAIAB2pAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAOEAAADAAgGAAAAfG+p9QAAIABJ