From da234e0569298cdf220274b65829dbf4b9bec5b8 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 7 Jul 2022 20:27:38 +0000 Subject: [PATCH] --- AyaNovaQBI/AyaNovaQBI.csproj | 9 ++ AyaNovaQBI/InvoiceTemplateBuilder.Designer.cs | 76 +++++++++++ AyaNovaQBI/InvoiceTemplateBuilder.cs | 38 ++++++ AyaNovaQBI/InvoiceTemplateBuilder.resx | 120 ++++++++++++++++++ AyaNovaQBI/MainForm.Designer.cs | 27 ++-- AyaNovaQBI/MainForm.cs | 5 + 6 files changed, 262 insertions(+), 13 deletions(-) create mode 100644 AyaNovaQBI/InvoiceTemplateBuilder.Designer.cs create mode 100644 AyaNovaQBI/InvoiceTemplateBuilder.cs create mode 100644 AyaNovaQBI/InvoiceTemplateBuilder.resx diff --git a/AyaNovaQBI/AyaNovaQBI.csproj b/AyaNovaQBI/AyaNovaQBI.csproj index 1f0723e..50c1266 100644 --- a/AyaNovaQBI/AyaNovaQBI.csproj +++ b/AyaNovaQBI/AyaNovaQBI.csproj @@ -93,6 +93,12 @@ + + Form + + + InvoiceTemplateBuilder.cs + Form @@ -233,6 +239,9 @@ CopyableMessageBox.cs + + InvoiceTemplateBuilder.cs + LinkAyaObjectToQBConfirm.cs diff --git a/AyaNovaQBI/InvoiceTemplateBuilder.Designer.cs b/AyaNovaQBI/InvoiceTemplateBuilder.Designer.cs new file mode 100644 index 0000000..0d43f17 --- /dev/null +++ b/AyaNovaQBI/InvoiceTemplateBuilder.Designer.cs @@ -0,0 +1,76 @@ +namespace AyaNovaQBI +{ + partial class InvoiceTemplateBuilder + { + /// + /// 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.btnOK = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(713, 532); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 21; + this.btnOK.Text = "OK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(12, 532); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 20; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // InvoiceTemplateBuilder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 570); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.btnCancel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "InvoiceTemplateBuilder"; + this.Text = "InvoiceTemplateBuilder"; + this.Load += new System.EventHandler(this.InvoiceTemplateBuilder_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file diff --git a/AyaNovaQBI/InvoiceTemplateBuilder.cs b/AyaNovaQBI/InvoiceTemplateBuilder.cs new file mode 100644 index 0000000..cb7d3f4 --- /dev/null +++ b/AyaNovaQBI/InvoiceTemplateBuilder.cs @@ -0,0 +1,38 @@ +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 InvoiceTemplateBuilder : Form + { + public InvoiceTemplateBuilder() + { + InitializeComponent(); + } + + private void InvoiceTemplateBuilder_Load(object sender, EventArgs e) + { + btnCancel.Text = util.AyaTranslations["Cancel"]; + btnOK.Text = util.AyaTranslations["OK"]; + } + + private void btnOK_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + Close(); + } + + private void btnCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + } +} diff --git a/AyaNovaQBI/InvoiceTemplateBuilder.resx b/AyaNovaQBI/InvoiceTemplateBuilder.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/AyaNovaQBI/InvoiceTemplateBuilder.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/MainForm.Designer.cs b/AyaNovaQBI/MainForm.Designer.cs index 18ba1db..193b756 100644 --- a/AyaNovaQBI/MainForm.Designer.cs +++ b/AyaNovaQBI/MainForm.Designer.cs @@ -28,8 +28,8 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.invoicesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); @@ -151,12 +151,13 @@ this.invoiceDescriptiveTextTemplateToolStripMenuItem.Name = "invoiceDescriptiveTextTemplateToolStripMenuItem"; this.invoiceDescriptiveTextTemplateToolStripMenuItem.Size = new System.Drawing.Size(245, 22); this.invoiceDescriptiveTextTemplateToolStripMenuItem.Text = "&Invoice descriptive text template"; + this.invoiceDescriptiveTextTemplateToolStripMenuItem.Click += new System.EventHandler(this.invoiceDescriptiveTextTemplateToolStripMenuItem_Click); // // refreshCachedDataToolStripMenuItem // this.refreshCachedDataToolStripMenuItem.Name = "refreshCachedDataToolStripMenuItem"; this.refreshCachedDataToolStripMenuItem.Size = new System.Drawing.Size(245, 22); - this.refreshCachedDataToolStripMenuItem.Text = "Refresh cached data"; + this.refreshCachedDataToolStripMenuItem.Text = "&Refresh cached data"; this.refreshCachedDataToolStripMenuItem.Click += new System.EventHandler(this.refreshCachedDataToolStripMenuItem_Click); // // helpToolStripMenuItem @@ -195,17 +196,17 @@ this.grid.AllowUserToAddRows = false; this.grid.AllowUserToDeleteRows = false; this.grid.AllowUserToResizeRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.WhiteSmoke; + this.grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; this.grid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; this.grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.grid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.customer, diff --git a/AyaNovaQBI/MainForm.cs b/AyaNovaQBI/MainForm.cs index 6b821f8..7c40a9f 100644 --- a/AyaNovaQBI/MainForm.cs +++ b/AyaNovaQBI/MainForm.cs @@ -153,5 +153,10 @@ namespace AyaNovaQBI await util.PopulateQBListCache(); await util.PopulateAyaListCache(); } + + private void invoiceDescriptiveTextTemplateToolStripMenuItem_Click(object sender, EventArgs e) + { + + } } }