diff --git a/AyaNovaQBI/ApproveCompanyFile.Designer.cs b/AyaNovaQBI/ApproveCompanyFile.Designer.cs new file mode 100644 index 0000000..76dc7be --- /dev/null +++ b/AyaNovaQBI/ApproveCompanyFile.Designer.cs @@ -0,0 +1,115 @@ +namespace AyaNovaQBI +{ + partial class ApproveCompanyFile + { + /// + /// 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.lblCompany = new System.Windows.Forms.Label(); + this.lblPath = new System.Windows.Forms.Label(); + this.lblExplain = new System.Windows.Forms.Label(); + this.btnCancel = new System.Windows.Forms.Button(); + this.btnOK = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lblCompany + // + this.lblCompany.Dock = System.Windows.Forms.DockStyle.Top; + this.lblCompany.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCompany.Location = new System.Drawing.Point(0, 0); + this.lblCompany.Name = "lblCompany"; + this.lblCompany.Size = new System.Drawing.Size(522, 30); + this.lblCompany.TabIndex = 0; + this.lblCompany.Text = "A company"; + // + // lblPath + // + this.lblPath.Dock = System.Windows.Forms.DockStyle.Top; + this.lblPath.Location = new System.Drawing.Point(0, 30); + this.lblPath.Name = "lblPath"; + this.lblPath.Size = new System.Drawing.Size(522, 37); + this.lblPath.TabIndex = 1; + // + // lblExplain + // + this.lblExplain.Dock = System.Windows.Forms.DockStyle.Top; + this.lblExplain.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblExplain.Location = new System.Drawing.Point(0, 67); + this.lblExplain.Name = "lblExplain"; + this.lblExplain.Size = new System.Drawing.Size(522, 23); + this.lblExplain.TabIndex = 2; + this.lblExplain.Text = "AyaNova QBI will work with this company file"; + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(4, 158); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 3; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(435, 158); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 4; + this.btnOK.Text = "OK"; + this.btnOK.UseVisualStyleBackColor = true; + // + // ApproveCompanyFile + // + this.AcceptButton = this.btnOK; + 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(522, 193); + this.ControlBox = false; + this.Controls.Add(this.btnOK); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.lblExplain); + this.Controls.Add(this.lblPath); + this.Controls.Add(this.lblCompany); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "ApproveCompanyFile"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "ApproveCompanyFile"; + this.Load += new System.EventHandler(this.ApproveCompanyFile_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lblCompany; + private System.Windows.Forms.Label lblPath; + private System.Windows.Forms.Label lblExplain; + private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.Button btnOK; + } +} \ No newline at end of file diff --git a/AyaNovaQBI/ApproveCompanyFile.cs b/AyaNovaQBI/ApproveCompanyFile.cs new file mode 100644 index 0000000..b82b99d --- /dev/null +++ b/AyaNovaQBI/ApproveCompanyFile.cs @@ -0,0 +1,41 @@ +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; + +namespace AyaNovaQBI +{ + public partial class ApproveCompanyFile : Form + { + public ApproveCompanyFile() + { + InitializeComponent(); + } + private string _CompanyName; + private string _CompanyPath; + public string QBCompanyName + { + set + { + _CompanyName = value; + } + } + public string QBCompanyPath + { + set + { + _CompanyPath = value; + } + } + private void ApproveCompanyFile_Load(object sender, EventArgs e) + { + this.lblCompany.Text = _CompanyName; + this.lblPath.Text = _CompanyPath; + } + } +} diff --git a/AyaNovaQBI/ApproveCompanyFile.resx b/AyaNovaQBI/ApproveCompanyFile.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/AyaNovaQBI/ApproveCompanyFile.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/AyaNovaQBI/AyaNovaQBI.csproj b/AyaNovaQBI/AyaNovaQBI.csproj index 0643303..0aad182 100644 --- a/AyaNovaQBI/AyaNovaQBI.csproj +++ b/AyaNovaQBI/AyaNovaQBI.csproj @@ -70,6 +70,12 @@ + + Form + + + ApproveCompanyFile.cs + Form @@ -114,6 +120,9 @@ Waiting.cs + + ApproveCompanyFile.cs + auth.cs diff --git a/AyaNovaQBI/util.cs b/AyaNovaQBI/util.cs index dac622e..7245546 100644 --- a/AyaNovaQBI/util.cs +++ b/AyaNovaQBI/util.cs @@ -748,7 +748,7 @@ namespace AyaNovaQBI /// if any are missing or invalid prompt for them /// /// - public static pfstat ValidateSettings(bool ForceReset) + public static async Task ValidateSettings(bool ForceReset) { bool SetEverything = false; if (ForceReset) @@ -776,7 +776,7 @@ namespace AyaNovaQBI if (s0.ShowDialog() == DialogResult.Cancel) { - IntegrationLog.Log(QBID, "PFC: User cancelled when shown company file currently open - " + QCompanyFile); + await IntegrationLog( "PFC: User cancelled when shown company file currently open - " + QCompanyFile); return pfstat.Cancel;