diff --git a/Zyborg.IAMCreds.WinForm/MainForm.Designer.cs b/Zyborg.IAMCreds.WinForm/MainForm.Designer.cs index e4f6450..e238788 100644 --- a/Zyborg.IAMCreds.WinForm/MainForm.Designer.cs +++ b/Zyborg.IAMCreds.WinForm/MainForm.Designer.cs @@ -56,8 +56,7 @@ private void InitializeComponent() this.createdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.lastUsedColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.serviceNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.deleteLinkColumn = new System.Windows.Forms.DataGridViewLinkColumn(); - this.Column1 = new System.Windows.Forms.DataGridViewButtonColumn(); + this.deleteButtonColumn = new System.Windows.Forms.DataGridViewButtonColumn(); this.mainTabControl.SuspendLayout(); this.accessKeysTabPage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.accessKeysDataGrid)).BeginInit(); @@ -105,8 +104,7 @@ private void InitializeComponent() this.createdColumn, this.lastUsedColumn, this.serviceNameColumn, - this.deleteLinkColumn, - this.Column1}); + this.deleteButtonColumn}); this.accessKeysDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; this.accessKeysDataGrid.Location = new System.Drawing.Point(3, 84); this.accessKeysDataGrid.MultiSelect = false; @@ -383,24 +381,12 @@ private void InitializeComponent() this.serviceNameColumn.Name = "serviceNameColumn"; this.serviceNameColumn.ReadOnly = true; // - // deleteLinkColumn + // deleteButtonColumn // - this.deleteLinkColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; - this.deleteLinkColumn.DataPropertyName = "DeleteLinkLabel"; - this.deleteLinkColumn.HeaderText = ""; - this.deleteLinkColumn.MinimumWidth = 50; - this.deleteLinkColumn.Name = "deleteLinkColumn"; - this.deleteLinkColumn.Text = "Delete"; - this.deleteLinkColumn.UseColumnTextForLinkValue = true; - this.deleteLinkColumn.VisitedLinkColor = System.Drawing.Color.Blue; - this.deleteLinkColumn.Width = 50; - // - // Column1 - // - this.Column1.HeaderText = "Column1"; - this.Column1.Name = "Column1"; - this.Column1.Text = "Delete"; - this.Column1.UseColumnTextForButtonValue = true; + this.deleteButtonColumn.HeaderText = ""; + this.deleteButtonColumn.Name = "deleteButtonColumn"; + this.deleteButtonColumn.Text = "Delete"; + this.deleteButtonColumn.UseColumnTextForButtonValue = true; // // MainForm // @@ -458,8 +444,7 @@ private void InitializeComponent() private System.Windows.Forms.DataGridViewTextBoxColumn createdColumn; private System.Windows.Forms.DataGridViewTextBoxColumn lastUsedColumn; private System.Windows.Forms.DataGridViewTextBoxColumn serviceNameColumn; - private System.Windows.Forms.DataGridViewLinkColumn deleteLinkColumn; - private System.Windows.Forms.DataGridViewButtonColumn Column1; + private System.Windows.Forms.DataGridViewButtonColumn deleteButtonColumn; } } diff --git a/Zyborg.IAMCreds.WinForm/MainForm.cs b/Zyborg.IAMCreds.WinForm/MainForm.cs index dd972f6..e3f90d2 100644 --- a/Zyborg.IAMCreds.WinForm/MainForm.cs +++ b/Zyborg.IAMCreds.WinForm/MainForm.cs @@ -85,11 +85,6 @@ public async Task LoadAccessKeys() x.CreateDate, _accessKeyLasts[y].LastUsedDate, ServiceName = SvcReg(_accessKeyLasts[y]), - - // Weird bug in MONO version of DataGridViewLinkColumn that doesn't respect - // the `UseColumnTextForLinkValue` property to allow static link text - // TODO: Submit a GH issue for mono - DeleteLinkLabel = "Delete", }).ToArray(); accessKeysDataGrid.DataSource = _accessKeyDetails; @@ -200,7 +195,7 @@ private async void accessKeysDataGrid_CellContentClick(object sender, DataGridVi return; } - if (accessKeysDataGrid.Columns[e.ColumnIndex].Name == nameof(deleteLinkColumn)) + if (accessKeysDataGrid.Columns[e.ColumnIndex].Name == nameof(deleteButtonColumn)) { try { diff --git a/Zyborg.IAMCreds.WinForm/MainForm.resx b/Zyborg.IAMCreds.WinForm/MainForm.resx index 1b40b2c..41e9a3d 100644 --- a/Zyborg.IAMCreds.WinForm/MainForm.resx +++ b/Zyborg.IAMCreds.WinForm/MainForm.resx @@ -117,7 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True \ No newline at end of file