From 515dfceb739e590aa605dddd65c2920e36592f83 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Mon, 24 Aug 2020 14:08:07 -0400 Subject: [PATCH] begin account management UI --- LibationLauncher/LibationLauncher.csproj | 2 +- .../Dialogs/AccountsDialog.Designer.cs | 150 ++++++++++++++++++ .../UNTESTED/Dialogs/AccountsDialog.cs | 103 ++++++++++++ .../UNTESTED/Dialogs/AccountsDialog.resx | 135 ++++++++++++++++ .../Dialogs/EditQuickFilters.Designer.cs | 4 +- .../UNTESTED/Dialogs/EditQuickFilters.cs | 17 +- LibationWinForms/UNTESTED/Form1.Designer.cs | 24 ++- LibationWinForms/UNTESTED/Form1.cs | 2 + .../Dialogs/AccountsDialog.Designer.cs | 142 +++++++++++++++++ WinFormsDesigner/Dialogs/AccountsDialog.cs | 13 ++ WinFormsDesigner/Dialogs/AccountsDialog.resx | 135 ++++++++++++++++ WinFormsDesigner/WinFormsDesigner.csproj | 10 ++ 12 files changed, 717 insertions(+), 20 deletions(-) create mode 100644 LibationWinForms/UNTESTED/Dialogs/AccountsDialog.Designer.cs create mode 100644 LibationWinForms/UNTESTED/Dialogs/AccountsDialog.cs create mode 100644 LibationWinForms/UNTESTED/Dialogs/AccountsDialog.resx create mode 100644 WinFormsDesigner/Dialogs/AccountsDialog.Designer.cs create mode 100644 WinFormsDesigner/Dialogs/AccountsDialog.cs create mode 100644 WinFormsDesigner/Dialogs/AccountsDialog.resx diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index fcfcebbd..139b84a5 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -13,7 +13,7 @@ win-x64 - 3.1.12.222 + 3.1.12.229 diff --git a/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.Designer.cs b/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.Designer.cs new file mode 100644 index 00000000..744ef2b8 --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.Designer.cs @@ -0,0 +1,150 @@ +namespace LibationWinForms.Dialogs +{ + partial class AccountsDialog + { + /// + /// 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.cancelBtn = new System.Windows.Forms.Button(); + this.saveBtn = new System.Windows.Forms.Button(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.DeleteAccount = new System.Windows.Forms.DataGridViewButtonColumn(); + this.LibraryScan = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.AccountId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AccountName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Locale = new System.Windows.Forms.DataGridViewComboBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // cancelBtn + // + this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelBtn.Location = new System.Drawing.Point(713, 415); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(75, 23); + this.cancelBtn.TabIndex = 2; + this.cancelBtn.Text = "Cancel"; + this.cancelBtn.UseVisualStyleBackColor = true; + this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); + // + // saveBtn + // + this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.saveBtn.Location = new System.Drawing.Point(612, 415); + this.saveBtn.Name = "saveBtn"; + this.saveBtn.Size = new System.Drawing.Size(75, 23); + this.saveBtn.TabIndex = 1; + this.saveBtn.Text = "Save"; + this.saveBtn.UseVisualStyleBackColor = true; + this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click); + // + // dataGridView1 + // + this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.DeleteAccount, + this.LibraryScan, + this.AccountId, + this.AccountName, + this.Locale}); + this.dataGridView1.Location = new System.Drawing.Point(12, 12); + this.dataGridView1.MultiSelect = false; + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(776, 397); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dataGridView1_CellBeginEdit); + this.dataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEndEdit); + this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView1_CellContentClick); + this.dataGridView1.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridView1_DefaultValuesNeeded); + this.dataGridView1.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView1_RowsAdded); + this.dataGridView1.RowsRemoved += new System.Windows.Forms.DataGridViewRowsRemovedEventHandler(this.dataGridView1_RowsRemoved); + // + // DeleteAccount + // + this.DeleteAccount.HeaderText = "Delete"; + this.DeleteAccount.Name = "DeleteAccount"; + this.DeleteAccount.ReadOnly = true; + this.DeleteAccount.Text = "x"; + this.DeleteAccount.Width = 44; + // + // LibraryScan + // + this.LibraryScan.HeaderText = "Include in library scan?"; + this.LibraryScan.Name = "LibraryScan"; + this.LibraryScan.Width = 83; + // + // AccountId + // + this.AccountId.HeaderText = "Audible email/login"; + this.AccountId.Name = "AccountId"; + this.AccountId.Width = 111; + // + // AccountName + // + this.AccountName.HeaderText = "Account nickname (optional)"; + this.AccountName.Name = "AccountName"; + this.AccountName.Width = 152; + // + // Locale + // + this.Locale.HeaderText = "Locale"; + this.Locale.Name = "Locale"; + this.Locale.Width = 45; + // + // AccountsDialog + // + this.AcceptButton = this.saveBtn; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelBtn; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.dataGridView1); + this.Controls.Add(this.saveBtn); + this.Controls.Add(this.cancelBtn); + this.Name = "AccountsDialog"; + this.Text = "Audible Accounts"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button cancelBtn; + private System.Windows.Forms.Button saveBtn; + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridViewButtonColumn DeleteAccount; + private System.Windows.Forms.DataGridViewCheckBoxColumn LibraryScan; + private System.Windows.Forms.DataGridViewTextBoxColumn AccountId; + private System.Windows.Forms.DataGridViewTextBoxColumn AccountName; + private System.Windows.Forms.DataGridViewComboBoxColumn Locale; + } +} \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.cs b/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.cs new file mode 100644 index 00000000..4851ce95 --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.cs @@ -0,0 +1,103 @@ +using System; +using System.Linq; +using System.Windows.Forms; +using FileManager; + +namespace LibationWinForms.Dialogs +{ + public partial class AccountsDialog : Form + { + const string COL_Original = "Original"; + const string COL_Delete = "Delete"; + const string COL_Filter = "Filter"; + const string COL_MoveUp = "MoveUp"; + const string COL_MoveDown = "MoveDown"; + + public AccountsDialog() + { + InitializeComponent(); + } + + private void cancelBtn_Click(object sender, EventArgs e) => this.Close(); + + #region TEMP + + private void dataGridView1_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e) + { + + + + //e.Row.Cells["Region"].Value = "WA"; + //e.Row.Cells["CustomerID"].Value = NewCustomerId(); + } + + private void saveBtn_Click(object sender, EventArgs e) + { + + } + + private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e) + { + + } + + private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) + { + + //if (e.ColumnIndex == dataGridView1.Columns["ItemID"].Index) //if the ItemID-cell is edited + //{ + // dataGridView1.Rows[e.RowIndex].ReadOnly = true; // set all row as read-only + // dataGridView1.Rows[e.RowIndex].Cells["ItemID"].ReadOnly = false; //except ItemID-cell + //} + } + + private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) + { + + //if (dataGridView1.Rows[e.RowIndex].Cells["ItemID"].Value != null) + //{ + // dataGridView1.Rows[e.RowIndex].ReadOnly = true; // set all row as read-only + // dataGridView1.Rows[e.RowIndex].Cells["ItemID"].ReadOnly = false; //except ItemID-cell + //} + } + + private void dataGridView1_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e) + { + + } + + private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + //var dgv = (DataGridView)sender; + + //var col = dgv.Columns[e.ColumnIndex]; + //if (col is DataGridViewButtonColumn && e.RowIndex >= 0) + //{ + // var row = dgv.Rows[e.RowIndex]; + // switch (col.Name) + // { + // case COL_Delete: + // // if final/edit row: do nothing + // if (e.RowIndex < dgv.RowCount - 1) + // dgv.Rows.Remove(row); + // break; + // case COL_MoveUp: + // // if top: do nothing + // if (e.RowIndex < 1) + // break; + // dgv.Rows.Remove(row); + // dgv.Rows.Insert(e.RowIndex - 1, row); + // break; + // case COL_MoveDown: + // // if final/edit row or bottom filter row: do nothing + // if (e.RowIndex >= dgv.RowCount - 2) + // break; + // dgv.Rows.Remove(row); + // dgv.Rows.Insert(e.RowIndex + 1, row); + // break; + // } + //} + } + #endregion + } +} diff --git a/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.resx b/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.resx new file mode 100644 index 00000000..2581fa05 --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/AccountsDialog.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.Designer.cs b/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.Designer.cs index c8ec1888..66130355 100644 --- a/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.Designer.cs +++ b/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.Designer.cs @@ -49,7 +49,7 @@ this.cancelBtn.TabIndex = 2; this.cancelBtn.Text = "Cancel"; this.cancelBtn.UseVisualStyleBackColor = true; - this.cancelBtn.Click += new System.EventHandler(this.CancelBtn_Click); + this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); // // saveBtn // @@ -60,7 +60,7 @@ this.saveBtn.TabIndex = 1; this.saveBtn.Text = "Save"; this.saveBtn.UseVisualStyleBackColor = true; - this.saveBtn.Click += new System.EventHandler(this.SaveBtn_Click); + this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click); // // dataGridView1 // diff --git a/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.cs b/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.cs index 957132ac..1a81e70d 100644 --- a/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.cs +++ b/LibationWinForms/UNTESTED/Dialogs/EditQuickFilters.cs @@ -1,18 +1,15 @@ 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 FileManager; namespace LibationWinForms.Dialogs { - public partial class EditQuickFilters : Form + public partial class EditQuickFilters : Form { + const string BLACK_UP_POINTING_TRIANGLE = "\u25B2"; + const string BLACK_DOWN_POINTING_TRIANGLE = "\u25BC"; + const string COL_Original = "Original"; const string COL_Delete = "Delete"; const string COL_Filter = "Filter"; @@ -39,10 +36,10 @@ namespace LibationWinForms.Dialogs return; foreach (var filter in filters) - dataGridView1.Rows.Add(filter, "X", filter, "\u25B2", "\u25BC"); + dataGridView1.Rows.Add(filter, "X", filter, BLACK_UP_POINTING_TRIANGLE, BLACK_DOWN_POINTING_TRIANGLE); } - private void SaveBtn_Click(object sender, EventArgs e) + private void saveBtn_Click(object sender, EventArgs e) { var list = dataGridView1.Rows .OfType() @@ -54,7 +51,7 @@ namespace LibationWinForms.Dialogs this.Close(); } - private void CancelBtn_Click(object sender, EventArgs e) => this.Close(); + private void cancelBtn_Click(object sender, EventArgs e) => this.Close(); private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { diff --git a/LibationWinForms/UNTESTED/Form1.Designer.cs b/LibationWinForms/UNTESTED/Form1.Designer.cs index 58fced7c..f0e4a90e 100644 --- a/LibationWinForms/UNTESTED/Form1.Designer.cs +++ b/LibationWinForms/UNTESTED/Form1.Designer.cs @@ -44,6 +44,7 @@ this.editQuickFiltersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.accountsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.basicSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.advancedSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); @@ -169,7 +170,7 @@ // this.editQuickFiltersToolStripMenuItem.Name = "editQuickFiltersToolStripMenuItem"; this.editQuickFiltersToolStripMenuItem.Size = new System.Drawing.Size(256, 22); - this.editQuickFiltersToolStripMenuItem.Text = "&Edit quick filters"; + this.editQuickFiltersToolStripMenuItem.Text = "&Edit quick filters..."; this.editQuickFiltersToolStripMenuItem.Click += new System.EventHandler(this.EditQuickFiltersToolStripMenuItem_Click); // // toolStripSeparator1 @@ -180,24 +181,32 @@ // settingsToolStripMenuItem // this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.accountsToolStripMenuItem, this.basicSettingsToolStripMenuItem, this.advancedSettingsToolStripMenuItem}); this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20); this.settingsToolStripMenuItem.Text = "&Settings"; // + // accountsToolStripMenuItem + // + this.accountsToolStripMenuItem.Name = "accountsToolStripMenuItem"; + this.accountsToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.accountsToolStripMenuItem.Text = "&Accounts..."; + this.accountsToolStripMenuItem.Click += new System.EventHandler(this.accountsToolStripMenuItem_Click); + // // basicSettingsToolStripMenuItem // this.basicSettingsToolStripMenuItem.Name = "basicSettingsToolStripMenuItem"; - this.basicSettingsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); - this.basicSettingsToolStripMenuItem.Text = "&Basic Settings"; + this.basicSettingsToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.basicSettingsToolStripMenuItem.Text = "&Basic Settings..."; this.basicSettingsToolStripMenuItem.Click += new System.EventHandler(this.basicSettingsToolStripMenuItem_Click); // // advancedSettingsToolStripMenuItem // this.advancedSettingsToolStripMenuItem.Name = "advancedSettingsToolStripMenuItem"; - this.advancedSettingsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); - this.advancedSettingsToolStripMenuItem.Text = "&Advanced Settings"; + this.advancedSettingsToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.advancedSettingsToolStripMenuItem.Text = "Ad&vanced Settings..."; this.advancedSettingsToolStripMenuItem.Click += new System.EventHandler(this.advancedSettingsToolStripMenuItem_Click); // // statusStrip1 @@ -222,7 +231,7 @@ // springLbl // this.springLbl.Name = "springLbl"; - this.springLbl.Size = new System.Drawing.Size(232, 17); + this.springLbl.Size = new System.Drawing.Size(233, 17); this.springLbl.Spring = true; // // backupsCountsLbl @@ -234,7 +243,7 @@ // pdfsCountsLbl // this.pdfsCountsLbl.Name = "pdfsCountsLbl"; - this.pdfsCountsLbl.Size = new System.Drawing.Size(219, 17); + this.pdfsCountsLbl.Size = new System.Drawing.Size(218, 17); this.pdfsCountsLbl.Text = "| PDFs: NOT d/l\'ed: {0} Downloaded: {1}"; // // addFilterBtn @@ -297,6 +306,7 @@ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripMenuItem basicSettingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem advancedSettingsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem accountsToolStripMenuItem; } } diff --git a/LibationWinForms/UNTESTED/Form1.cs b/LibationWinForms/UNTESTED/Form1.cs index e98dd58f..324eb18a 100644 --- a/LibationWinForms/UNTESTED/Form1.cs +++ b/LibationWinForms/UNTESTED/Form1.cs @@ -300,6 +300,8 @@ namespace LibationWinForms #endregion #region settings menu + private void accountsToolStripMenuItem_Click(object sender, EventArgs e) => new AccountsDialog().ShowDialog(); + private void basicSettingsToolStripMenuItem_Click(object sender, EventArgs e) => new SettingsDialog().ShowDialog(); private void advancedSettingsToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/WinFormsDesigner/Dialogs/AccountsDialog.Designer.cs b/WinFormsDesigner/Dialogs/AccountsDialog.Designer.cs new file mode 100644 index 00000000..80ed5658 --- /dev/null +++ b/WinFormsDesigner/Dialogs/AccountsDialog.Designer.cs @@ -0,0 +1,142 @@ +namespace WinFormsDesigner.Dialogs +{ + partial class AccountsDialog + { + /// + /// 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.cancelBtn = new System.Windows.Forms.Button(); + this.saveBtn = new System.Windows.Forms.Button(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.DeleteAccount = new System.Windows.Forms.DataGridViewButtonColumn(); + this.LibraryScan = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.AccountId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AccountName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Locale = new System.Windows.Forms.DataGridViewComboBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // cancelBtn + // + this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelBtn.Location = new System.Drawing.Point(713, 415); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(75, 23); + this.cancelBtn.TabIndex = 2; + this.cancelBtn.Text = "Cancel"; + this.cancelBtn.UseVisualStyleBackColor = true; + // + // saveBtn + // + this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.saveBtn.Location = new System.Drawing.Point(612, 415); + this.saveBtn.Name = "saveBtn"; + this.saveBtn.Size = new System.Drawing.Size(75, 23); + this.saveBtn.TabIndex = 1; + this.saveBtn.Text = "Save"; + this.saveBtn.UseVisualStyleBackColor = true; + // + // dataGridView1 + // + this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.DeleteAccount, + this.LibraryScan, + this.AccountId, + this.AccountName, + this.Locale}); + this.dataGridView1.Location = new System.Drawing.Point(12, 12); + this.dataGridView1.MultiSelect = false; + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(776, 397); + this.dataGridView1.TabIndex = 0; + // + // DeleteAccount + // + this.DeleteAccount.HeaderText = "Delete"; + this.DeleteAccount.Name = "DeleteAccount"; + this.DeleteAccount.ReadOnly = true; + this.DeleteAccount.Text = "x"; + this.DeleteAccount.Width = 44; + // + // LibraryScan + // + this.LibraryScan.HeaderText = "Include in library scan?"; + this.LibraryScan.Name = "LibraryScan"; + this.LibraryScan.Width = 83; + // + // AccountId + // + this.AccountId.HeaderText = "Audible email/login"; + this.AccountId.Name = "AccountId"; + this.AccountId.Width = 111; + // + // AccountName + // + this.AccountName.HeaderText = "Account nickname (optional)"; + this.AccountName.Name = "AccountName"; + this.AccountName.Width = 152; + // + // Locale + // + this.Locale.HeaderText = "Locale"; + this.Locale.Name = "Locale"; + this.Locale.Width = 45; + // + // AccountsDialog + // + this.AcceptButton = this.saveBtn; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelBtn; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.dataGridView1); + this.Controls.Add(this.saveBtn); + this.Controls.Add(this.cancelBtn); + this.Name = "AccountsDialog"; + this.Text = "Audible Accounts"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button cancelBtn; + private System.Windows.Forms.Button saveBtn; + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridViewButtonColumn DeleteAccount; + private System.Windows.Forms.DataGridViewCheckBoxColumn LibraryScan; + private System.Windows.Forms.DataGridViewTextBoxColumn AccountId; + private System.Windows.Forms.DataGridViewTextBoxColumn AccountName; + private System.Windows.Forms.DataGridViewComboBoxColumn Locale; + } +} \ No newline at end of file diff --git a/WinFormsDesigner/Dialogs/AccountsDialog.cs b/WinFormsDesigner/Dialogs/AccountsDialog.cs new file mode 100644 index 00000000..db1e2e3d --- /dev/null +++ b/WinFormsDesigner/Dialogs/AccountsDialog.cs @@ -0,0 +1,13 @@ +using System; +using System.Windows.Forms; + +namespace WinFormsDesigner.Dialogs +{ + public partial class AccountsDialog : Form + { + public AccountsDialog() + { + InitializeComponent(); + } + } +} diff --git a/WinFormsDesigner/Dialogs/AccountsDialog.resx b/WinFormsDesigner/Dialogs/AccountsDialog.resx new file mode 100644 index 00000000..2581fa05 --- /dev/null +++ b/WinFormsDesigner/Dialogs/AccountsDialog.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/WinFormsDesigner/WinFormsDesigner.csproj b/WinFormsDesigner/WinFormsDesigner.csproj index d0e4bd8c..8804cddb 100644 --- a/WinFormsDesigner/WinFormsDesigner.csproj +++ b/WinFormsDesigner/WinFormsDesigner.csproj @@ -65,6 +65,12 @@ DecryptForm.cs + + Form + + + AccountsDialog.cs + Form @@ -148,8 +154,12 @@ DecryptForm.cs + + AccountsDialog.cs + EditQuickFilters.cs + Designer EditTagsDialog.cs