This commit is contained in:
2022-07-07 19:31:11 +00:00
parent 32c9ef078f
commit 217206c687
3 changed files with 51 additions and 13 deletions

View File

@@ -44,7 +44,6 @@
this.refreshQuickBooksConnectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.onlineManualToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.technicalsupportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.grid = new System.Windows.Forms.DataGridView();
@@ -163,7 +162,6 @@
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.onlineManualToolStripMenuItem,
this.technicalsupportToolStripMenuItem,
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
@@ -173,20 +171,16 @@
//
this.onlineManualToolStripMenuItem.Name = "onlineManualToolStripMenuItem";
this.onlineManualToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.onlineManualToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.onlineManualToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.onlineManualToolStripMenuItem.Text = "&Online manual";
//
// technicalsupportToolStripMenuItem
//
this.technicalsupportToolStripMenuItem.Name = "technicalsupportToolStripMenuItem";
this.technicalsupportToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.technicalsupportToolStripMenuItem.Text = "Technical &support";
this.onlineManualToolStripMenuItem.Click += new System.EventHandler(this.onlineManualToolStripMenuItem_Click);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// exitToolStripMenuItem
//
@@ -345,7 +339,6 @@
private System.Windows.Forms.ToolStripMenuItem refreshQuickBooksConnectionToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem onlineManualToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem technicalsupportToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.DataGridView grid;

View File

@@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -47,6 +48,7 @@ namespace AyaNovaQBI
// MessageBox.Show("STUB: mainform,no maps, no integration data set");
//}
}
Text = "AyaNova QBI - " + util.QCompanyName;
grid.Visible = true;
menuStrip1.Enabled = true;
//MessageBox.Show("DONE / OK");
@@ -128,5 +130,22 @@ namespace AyaNovaQBI
//todo: this.InitInvoices();
}
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
Assembly a = Assembly.GetExecutingAssembly();
string sVersion = "AyaNova QBI version " + util.DisplayVersion(a.GetName().Version) + "\r\n";
System.Diagnostics.FileVersionInfo fileVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(a.Location);
if (fileVersion.FileBuildPart > 0)
sVersion += " (Patch " + fileVersion.FileBuildPart.ToString() + ")\r\n";
sVersion += "Copyright 2000-2022 Ground Zero Tech-Works Inc.\r\n";
MessageBox.Show(sVersion, "About");
}
private void onlineManualToolStripMenuItem_Click(object sender, EventArgs e)
{
util.OpenWebURL("https://ayanova.com/qbi/docs");
}
}
}

View File

@@ -3252,7 +3252,6 @@ namespace AyaNovaQBI
#endregion quickbooks Terms
#region Change QB Item price
public static async Task ChangeQBItemPrice(string QBListID, decimal NewPrice)
@@ -3628,7 +3627,6 @@ namespace AyaNovaQBI
#endregion exception helper
#region Import / refresh to AyaNova
public static async Task RefreshAyaNovaCustomerFromQBAsync(IntegrationItem im)
@@ -5657,5 +5655,33 @@ namespace AyaNovaQBI
#endregion export to quickbooks
#endregion qbi stuff (anything not api)
#region general utils
static public void OpenWebURL(object oUrl)
{
if (oUrl == null) return;
string sUrl = oUrl.ToString();
if (sUrl == "") return;
if (sUrl.ToLower().StartsWith("http"))
System.Diagnostics.Process.Start(sUrl);
else
System.Diagnostics.Process.Start("https://" + sUrl);
}
/// <summary>
/// Return a semantic versioning display of assembly version information
/// </summary>
/// <param name="fileVersion"></param>
/// <returns></returns>
public static string DisplayVersion(Version fileVersion)//case 2003
{
return fileVersion.Major.ToString() + "." + fileVersion.Minor.ToString();
}
#endregion general utils
}//EOC
}//EONS