diff --git a/Installs/AyaNovaINNO/AyaNova.iss b/Installs/AyaNovaINNO/AyaNova.iss index 03389b9..4f4a8eb 100644 --- a/Installs/AyaNovaINNO/AyaNova.iss +++ b/Installs/AyaNovaINNO/AyaNova.iss @@ -104,7 +104,8 @@ Source: "..\..\source\Plugins\AyaNova.PlugIn.XTools\bin\Release\AyaNova.PlugIn.X Source: "..\..\release\AyaNova.PlugIn.ClientRemover.dll"; DestDir: "{app}\plugins\ClientRemover";Permissions: everyone-full;Flags:ignoreversion; ;case 3379 Source: "..\..\release\AyaNova.PlugIn.V8.dll"; DestDir: "{app}\plugins\V8Export";Permissions: everyone-full;Flags:ignoreversion; -;Source: "..\..\3rdprtylibs\ziplib\ICSharpCode.SharpZipLib.dll"; DestDir: "{app}\plugins\Dump";Permissions: everyone-full;Flags:ignoreversion; +Source: "..\..\source\Plugins\AyaNova.Plugin.V8\libs\HtmlAgilityPack.dll"; DestDir: "{app}\plugins\V8Export";Permissions: everyone-full;Flags:ignoreversion; +Source: "..\..\source\Plugins\AyaNova.Plugin.V8\libs\ReverseMarkdown.dll"; DestDir: "{app}\plugins\V8Export";Permissions: everyone-full;Flags:ignoreversion; ;firebird files diff --git a/source/MBI/packages.config b/source/MBI/packages.config new file mode 100644 index 0000000..101fdf5 --- /dev/null +++ b/source/MBI/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/source/Plugins/AyaNova.Plugin.QBOI/GetToken.Designer.cs b/source/Plugins/AyaNova.Plugin.QBOI/GetToken.Designer.cs new file mode 100644 index 0000000..409b31e --- /dev/null +++ b/source/Plugins/AyaNova.Plugin.QBOI/GetToken.Designer.cs @@ -0,0 +1,79 @@ +namespace AyaNova.PlugIn.QBOI +{ + partial class GetToken + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.btnCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 35); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(393, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Please wait, this dialog will close automatically when authentication is complete" + + "d..."; + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(413, 85); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 1; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // GetToken + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(500, 120); + this.ControlBox = false; + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.label1); + this.Name = "GetToken"; + this.Text = "Fetching QuickBooks Online token"; + this.Load += new System.EventHandler(this.GetToken_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file diff --git a/source/Plugins/AyaNova.Plugin.QBOI/GetToken.cs b/source/Plugins/AyaNova.Plugin.QBOI/GetToken.cs new file mode 100644 index 0000000..2b961e9 --- /dev/null +++ b/source/Plugins/AyaNova.Plugin.QBOI/GetToken.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Net.Http; + +namespace AyaNova.PlugIn.QBOI +{ + public partial class GetToken : Form + { + static readonly HttpClient client = new HttpClient(); + string QBOI2_SESSION_TOKEN = ""; + + public string LastError { get; set; } + public string FetchedToken { get; set; } + + public GetToken(string sessionID) + { + InitializeComponent(); + QBOI2_SESSION_TOKEN = sessionID; + LastError = string.Empty; + FetchedToken = string.Empty; + } + + private async void GetToken_Load(object sender, EventArgs e) + { + while (string.IsNullOrEmpty(FetchedToken) && string.IsNullOrEmpty(LastError)) + { + await TryFetchAsync(); + } + } + + private async Task TryFetchAsync() + { + try + { + HttpResponseMessage response = await client.GetAsync("https://qboauth.ayanova.com/fetch/" + QBOI2_SESSION_TOKEN); + if (response.IsSuccessStatusCode) + { + //set the token and return + FetchedToken = await response.Content.ReadAsStringAsync(); + this.DialogResult = DialogResult.OK; + this.Close(); + } + + if (response.StatusCode != System.Net.HttpStatusCode.NotFound) + { + response.EnsureSuccessStatusCode();//throw exception, is unexpected result + } + } + catch (HttpRequestException err) + { + LastError = err.Message; + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + LastError = "User selected CANCEL when attepting to fetch token"; + this.DialogResult = DialogResult.Cancel; + this.Close(); + + } + + + + + + } +} diff --git a/source/Plugins/AyaNova.Plugin.QBOI/GetToken.resx b/source/Plugins/AyaNova.Plugin.QBOI/GetToken.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/source/Plugins/AyaNova.Plugin.QBOI/GetToken.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 56fa5c1..ff206b0 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -191,11 +191,8 @@ namespace AyaNova.PlugIn.V8 /* TODO: * - * locales - Add *customXX locale keys in RAVEN for each v7 comparable object that is custom text able so can properly do localized text - but, figure out where they are stored in v7 because the export isn't bombing so where are they going or coming from? - - * todo locales for custom fields fixup - needs objects keys at destination first. + Add to installer + * * todo: once have moved beyond what's in the v8 import stuff then need to remove all that, though maybe comment out some bits as some may be useful for import / export?? * todo: make up stub versions of all the core biz objects so can test a full wiki, attachment etc import diff --git a/source/WBI/packages.config b/source/WBI/packages.config new file mode 100644 index 0000000..101fdf5 --- /dev/null +++ b/source/WBI/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/source/WinFormApp/app.config b/source/WinFormApp/app.config index e04b520..f74407e 100644 --- a/source/WinFormApp/app.config +++ b/source/WinFormApp/app.config @@ -17,6 +17,10 @@ + + + + \ No newline at end of file diff --git a/source/WinFormApp/config.txt b/source/WinFormApp/config.txt index f6b9a2d..c8e70a1 100644 --- a/source/WinFormApp/config.txt +++ b/source/WinFormApp/config.txt @@ -1,23 +1,20 @@ - + DataBase MSSQL Server=DEV-V7-LAPTOP\SQLEXPRESS;initial catalog=AyaNova;User Id=sa; Password = abraxis; - - - + + - + +--> + - +