diff --git a/Source/LibationAvalonia/ViewModels/GridEntry.cs b/Source/LibationAvalonia/ViewModels/GridEntry.cs index bea4fadb..e91f5b57 100644 --- a/Source/LibationAvalonia/ViewModels/GridEntry.cs +++ b/Source/LibationAvalonia/ViewModels/GridEntry.cs @@ -52,7 +52,9 @@ namespace LibationAvalonia.ViewModels get => _myRating; set { - if (_myRating != value && updateReviewTask?.IsCompleted is not false) + if (_myRating != value + && value.OverallRating != 0 + && updateReviewTask?.IsCompleted is not false) { updateReviewTask = UpdateRating(value); } @@ -81,7 +83,7 @@ namespace LibationAvalonia.ViewModels if (await api.ReviewAsync(Book.AudibleProductId, (int)rating.OverallRating, (int)rating.PerformanceRating, (int)rating.StoryRating)) { _myRating = rating; - LibraryBook.Book.UpdateUserDefinedItem(null, null, null, rating); + LibraryBook.Book.UpdateUserDefinedItem(Book.UserDefinedItem.Tags, Book.UserDefinedItem.BookStatus, Book.UserDefinedItem.PdfStatus, rating); } this.RaisePropertyChanged(nameof(MyRating)); diff --git a/Source/LibationWinForms/GridView/GridEntry.cs b/Source/LibationWinForms/GridView/GridEntry.cs index c779d597..0a0d3c13 100644 --- a/Source/LibationWinForms/GridView/GridEntry.cs +++ b/Source/LibationWinForms/GridView/GridEntry.cs @@ -67,7 +67,7 @@ namespace LibationWinForms.GridView set { if (_myRating != value - && (value.OverallRating + value.PerformanceRating + value.StoryRating) > 0 + && value.OverallRating != 0 && updateReviewTask?.IsCompleted is not false) { updateReviewTask = UpdateRating(value); @@ -88,7 +88,7 @@ namespace LibationWinForms.GridView if (await api.ReviewAsync(Book.AudibleProductId, (int)rating.OverallRating, (int)rating.PerformanceRating, (int)rating.StoryRating)) { _myRating = rating; - LibraryBook.Book.UpdateUserDefinedItem(null, null, null, rating); + LibraryBook.Book.UpdateUserDefinedItem(Book.UserDefinedItem.Tags, Book.UserDefinedItem.BookStatus, Book.UserDefinedItem.PdfStatus, rating); } this.NotifyPropertyChanged(nameof(MyRating)); diff --git a/Source/LibationWinForms/GridView/MyRatingCellEditor.Designer.cs b/Source/LibationWinForms/GridView/MyRatingCellEditor.Designer.cs index 943847fc..60f1eb17 100644 --- a/Source/LibationWinForms/GridView/MyRatingCellEditor.Designer.cs +++ b/Source/LibationWinForms/GridView/MyRatingCellEditor.Designer.cs @@ -31,24 +31,24 @@ this.lblOverall = new System.Windows.Forms.Label(); this.lblPerform = new System.Windows.Forms.Label(); this.lblStory = new System.Windows.Forms.Label(); - this.starOverall1 = new System.Windows.Forms.Label(); - this.starOverall2 = new System.Windows.Forms.Label(); - this.starOverall3 = new System.Windows.Forms.Label(); - this.starOverall4 = new System.Windows.Forms.Label(); - this.starOverall5 = new System.Windows.Forms.Label(); this.panelOverall = new System.Windows.Forms.Panel(); + this.noBorderLabel1 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel2 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel3 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel4 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel5 = new LibationWinForms.GridView.NoBorderLabel(); this.panelPerform = new System.Windows.Forms.Panel(); - this.starPerform1 = new System.Windows.Forms.Label(); - this.starPerform2 = new System.Windows.Forms.Label(); - this.starPerform3 = new System.Windows.Forms.Label(); - this.starPerform4 = new System.Windows.Forms.Label(); - this.starPerform5 = new System.Windows.Forms.Label(); + this.noBorderLabel6 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel7 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel8 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel9 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel10 = new LibationWinForms.GridView.NoBorderLabel(); this.panelStory = new System.Windows.Forms.Panel(); - this.starStory1 = new System.Windows.Forms.Label(); - this.starStory2 = new System.Windows.Forms.Label(); - this.starStory3 = new System.Windows.Forms.Label(); - this.starStory4 = new System.Windows.Forms.Label(); - this.starStory5 = new System.Windows.Forms.Label(); + this.noBorderLabel11 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel12 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel13 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel14 = new LibationWinForms.GridView.NoBorderLabel(); + this.noBorderLabel15 = new LibationWinForms.GridView.NoBorderLabel(); this.panelOverall.SuspendLayout(); this.panelPerform.SuspendLayout(); this.panelStory.SuspendLayout(); @@ -58,7 +58,7 @@ // this.lblOverall.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblOverall.AutoSize = true; - this.lblOverall.Location = new System.Drawing.Point(0, 0); + this.lblOverall.Location = new System.Drawing.Point(0, 1); this.lblOverall.Margin = new System.Windows.Forms.Padding(0); this.lblOverall.Name = "lblOverall"; this.lblOverall.Size = new System.Drawing.Size(47, 15); @@ -70,7 +70,7 @@ this.lblPerform.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPerform.AutoSize = true; this.lblPerform.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.lblPerform.Location = new System.Drawing.Point(0, 15); + this.lblPerform.Location = new System.Drawing.Point(0, 16); this.lblPerform.Margin = new System.Windows.Forms.Padding(0); this.lblPerform.Name = "lblPerform"; this.lblPerform.Size = new System.Drawing.Size(53, 15); @@ -81,274 +81,259 @@ // this.lblStory.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblStory.AutoSize = true; - this.lblStory.Location = new System.Drawing.Point(0, 30); + this.lblStory.Location = new System.Drawing.Point(0, 31); this.lblStory.Margin = new System.Windows.Forms.Padding(0); this.lblStory.Name = "lblStory"; this.lblStory.Size = new System.Drawing.Size(37, 15); this.lblStory.TabIndex = 10; this.lblStory.Text = "Story:"; // - // starOverall1 - // - this.starOverall1.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starOverall1.Location = new System.Drawing.Point(0, 0); - this.starOverall1.Margin = new System.Windows.Forms.Padding(0); - this.starOverall1.Name = "starOverall1"; - this.starOverall1.Size = new System.Drawing.Size(9, 10); - this.starOverall1.TabIndex = 0; - this.starOverall1.Text = "☆"; - this.starOverall1.UseCompatibleTextRendering = true; - this.starOverall1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starOverall1.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starOverall1.MouseLeave += new System.EventHandler(this.Star_MouseLeave); - // - // starOverall2 - // - this.starOverall2.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starOverall2.Location = new System.Drawing.Point(9, 0); - this.starOverall2.Margin = new System.Windows.Forms.Padding(0); - this.starOverall2.Name = "starOverall2"; - this.starOverall2.Size = new System.Drawing.Size(9, 10); - this.starOverall2.TabIndex = 1; - this.starOverall2.Text = "☆"; - this.starOverall2.UseCompatibleTextRendering = true; - this.starOverall2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starOverall2.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starOverall2.MouseLeave += new System.EventHandler(this.Star_MouseLeave); - // - // starOverall3 - // - this.starOverall3.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starOverall3.Location = new System.Drawing.Point(18, 0); - this.starOverall3.Margin = new System.Windows.Forms.Padding(0); - this.starOverall3.Name = "starOverall3"; - this.starOverall3.Size = new System.Drawing.Size(9, 10); - this.starOverall3.TabIndex = 3; - this.starOverall3.Text = "☆"; - this.starOverall3.UseCompatibleTextRendering = true; - this.starOverall3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starOverall3.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starOverall3.MouseLeave += new System.EventHandler(this.Star_MouseLeave); - // - // starOverall4 - // - this.starOverall4.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starOverall4.Location = new System.Drawing.Point(27, 0); - this.starOverall4.Margin = new System.Windows.Forms.Padding(0); - this.starOverall4.Name = "starOverall4"; - this.starOverall4.Size = new System.Drawing.Size(9, 10); - this.starOverall4.TabIndex = 2; - this.starOverall4.Text = "☆"; - this.starOverall4.UseCompatibleTextRendering = true; - this.starOverall4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starOverall4.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starOverall4.MouseLeave += new System.EventHandler(this.Star_MouseLeave); - // - // starOverall5 - // - this.starOverall5.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starOverall5.Location = new System.Drawing.Point(36, 0); - this.starOverall5.Margin = new System.Windows.Forms.Padding(0); - this.starOverall5.Name = "starOverall5"; - this.starOverall5.Size = new System.Drawing.Size(9, 10); - this.starOverall5.TabIndex = 4; - this.starOverall5.Text = "☆"; - this.starOverall5.UseCompatibleTextRendering = true; - this.starOverall5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starOverall5.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starOverall5.MouseLeave += new System.EventHandler(this.Star_MouseLeave); - // // panelOverall // this.panelOverall.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.panelOverall.Controls.Add(this.starOverall1); - this.panelOverall.Controls.Add(this.starOverall2); - this.panelOverall.Controls.Add(this.starOverall3); - this.panelOverall.Controls.Add(this.starOverall4); - this.panelOverall.Controls.Add(this.starOverall5); - this.panelOverall.Location = new System.Drawing.Point(55, 3); + this.panelOverall.Controls.Add(this.noBorderLabel1); + this.panelOverall.Controls.Add(this.noBorderLabel2); + this.panelOverall.Controls.Add(this.noBorderLabel3); + this.panelOverall.Controls.Add(this.noBorderLabel4); + this.panelOverall.Controls.Add(this.noBorderLabel5); + this.panelOverall.Location = new System.Drawing.Point(52, 4); this.panelOverall.Name = "panelOverall"; - this.panelOverall.Size = new System.Drawing.Size(45, 10); + this.panelOverall.Size = new System.Drawing.Size(50, 11); this.panelOverall.TabIndex = 5; // + // noBorderLabel1 + // + this.noBorderLabel1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel1.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel1.Location = new System.Drawing.Point(0, 0); + this.noBorderLabel1.Name = "noBorderLabel1"; + this.noBorderLabel1.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel1.TabIndex = 0; + this.noBorderLabel1.Text = "☆"; + this.noBorderLabel1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel1.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel1.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + // + // noBorderLabel2 + // + this.noBorderLabel2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel2.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel2.Location = new System.Drawing.Point(10, 0); + this.noBorderLabel2.Name = "noBorderLabel2"; + this.noBorderLabel2.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel2.TabIndex = 0; + this.noBorderLabel2.Text = "☆"; + this.noBorderLabel2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel2.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel2.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + // + // noBorderLabel3 + // + this.noBorderLabel3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel3.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel3.Location = new System.Drawing.Point(20, 0); + this.noBorderLabel3.Name = "noBorderLabel3"; + this.noBorderLabel3.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel3.TabIndex = 0; + this.noBorderLabel3.Text = "☆"; + this.noBorderLabel3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel3.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel3.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + // + // noBorderLabel4 + // + this.noBorderLabel4.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel4.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel4.Location = new System.Drawing.Point(30, 0); + this.noBorderLabel4.Name = "noBorderLabel4"; + this.noBorderLabel4.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel4.TabIndex = 0; + this.noBorderLabel4.Text = "☆"; + this.noBorderLabel4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel4.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel4.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + // + // noBorderLabel5 + // + this.noBorderLabel5.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel5.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel5.Location = new System.Drawing.Point(40, 0); + this.noBorderLabel5.Name = "noBorderLabel5"; + this.noBorderLabel5.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel5.TabIndex = 0; + this.noBorderLabel5.Text = "☆"; + this.noBorderLabel5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel5.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel5.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + // // panelPerform // this.panelPerform.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.panelPerform.Controls.Add(this.starPerform1); - this.panelPerform.Controls.Add(this.starPerform2); - this.panelPerform.Controls.Add(this.starPerform3); - this.panelPerform.Controls.Add(this.starPerform4); - this.panelPerform.Controls.Add(this.starPerform5); - this.panelPerform.Location = new System.Drawing.Point(55, 18); + this.panelPerform.Controls.Add(this.noBorderLabel6); + this.panelPerform.Controls.Add(this.noBorderLabel7); + this.panelPerform.Controls.Add(this.noBorderLabel8); + this.panelPerform.Controls.Add(this.noBorderLabel9); + this.panelPerform.Controls.Add(this.noBorderLabel10); + this.panelPerform.Location = new System.Drawing.Point(52, 19); this.panelPerform.Name = "panelPerform"; - this.panelPerform.Size = new System.Drawing.Size(45, 10); - this.panelPerform.TabIndex = 7; + this.panelPerform.Size = new System.Drawing.Size(50, 11); + this.panelPerform.TabIndex = 6; // - // starPerform1 + // noBorderLabel6 // - this.starPerform1.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starPerform1.Location = new System.Drawing.Point(0, 0); - this.starPerform1.Margin = new System.Windows.Forms.Padding(0); - this.starPerform1.Name = "starPerform1"; - this.starPerform1.Size = new System.Drawing.Size(9, 10); - this.starPerform1.TabIndex = 0; - this.starPerform1.Text = "☆"; - this.starPerform1.UseCompatibleTextRendering = true; - this.starPerform1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starPerform1.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starPerform1.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel6.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel6.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel6.Location = new System.Drawing.Point(0, 0); + this.noBorderLabel6.Name = "noBorderLabel6"; + this.noBorderLabel6.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel6.TabIndex = 0; + this.noBorderLabel6.Text = "☆"; + this.noBorderLabel6.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel6.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel6.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starPerform2 + // noBorderLabel7 // - this.starPerform2.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starPerform2.Location = new System.Drawing.Point(9, 0); - this.starPerform2.Margin = new System.Windows.Forms.Padding(0); - this.starPerform2.Name = "starPerform2"; - this.starPerform2.Size = new System.Drawing.Size(9, 10); - this.starPerform2.TabIndex = 1; - this.starPerform2.Text = "☆"; - this.starPerform2.UseCompatibleTextRendering = true; - this.starPerform2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starPerform2.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starPerform2.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel7.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel7.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel7.Location = new System.Drawing.Point(10, 0); + this.noBorderLabel7.Name = "noBorderLabel7"; + this.noBorderLabel7.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel7.TabIndex = 0; + this.noBorderLabel7.Text = "☆"; + this.noBorderLabel7.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel7.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel7.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starPerform3 + // noBorderLabel8 // - this.starPerform3.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starPerform3.Location = new System.Drawing.Point(18, 0); - this.starPerform3.Margin = new System.Windows.Forms.Padding(0); - this.starPerform3.Name = "starPerform3"; - this.starPerform3.Size = new System.Drawing.Size(9, 10); - this.starPerform3.TabIndex = 3; - this.starPerform3.Text = "☆"; - this.starPerform3.UseCompatibleTextRendering = true; - this.starPerform3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starPerform3.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starPerform3.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel8.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel8.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel8.Location = new System.Drawing.Point(20, 0); + this.noBorderLabel8.Name = "noBorderLabel8"; + this.noBorderLabel8.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel8.TabIndex = 0; + this.noBorderLabel8.Text = "☆"; + this.noBorderLabel8.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel8.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel8.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starPerform4 + // noBorderLabel9 // - this.starPerform4.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starPerform4.Location = new System.Drawing.Point(27, 0); - this.starPerform4.Margin = new System.Windows.Forms.Padding(0); - this.starPerform4.Name = "starPerform4"; - this.starPerform4.Size = new System.Drawing.Size(9, 10); - this.starPerform4.TabIndex = 2; - this.starPerform4.Text = "☆"; - this.starPerform4.UseCompatibleTextRendering = true; - this.starPerform4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starPerform4.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starPerform4.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel9.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel9.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel9.Location = new System.Drawing.Point(30, 0); + this.noBorderLabel9.Name = "noBorderLabel9"; + this.noBorderLabel9.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel9.TabIndex = 0; + this.noBorderLabel9.Text = "☆"; + this.noBorderLabel9.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel9.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel9.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starPerform5 + // noBorderLabel10 // - this.starPerform5.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starPerform5.Location = new System.Drawing.Point(36, 0); - this.starPerform5.Margin = new System.Windows.Forms.Padding(0); - this.starPerform5.Name = "starPerform5"; - this.starPerform5.Size = new System.Drawing.Size(9, 10); - this.starPerform5.TabIndex = 4; - this.starPerform5.Text = "☆"; - this.starPerform5.UseCompatibleTextRendering = true; - this.starPerform5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starPerform5.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starPerform5.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel10.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel10.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel10.Location = new System.Drawing.Point(40, 0); + this.noBorderLabel10.Name = "noBorderLabel10"; + this.noBorderLabel10.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel10.TabIndex = 0; + this.noBorderLabel10.Text = "☆"; + this.noBorderLabel10.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel10.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel10.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // // panelStory // this.panelStory.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.panelStory.Controls.Add(this.starStory1); - this.panelStory.Controls.Add(this.starStory2); - this.panelStory.Controls.Add(this.starStory3); - this.panelStory.Controls.Add(this.starStory4); - this.panelStory.Controls.Add(this.starStory5); - this.panelStory.Location = new System.Drawing.Point(55, 33); + this.panelStory.Controls.Add(this.noBorderLabel11); + this.panelStory.Controls.Add(this.noBorderLabel12); + this.panelStory.Controls.Add(this.noBorderLabel13); + this.panelStory.Controls.Add(this.noBorderLabel14); + this.panelStory.Controls.Add(this.noBorderLabel15); + this.panelStory.Location = new System.Drawing.Point(52, 34); this.panelStory.Name = "panelStory"; - this.panelStory.Size = new System.Drawing.Size(45, 10); - this.panelStory.TabIndex = 9; + this.panelStory.Size = new System.Drawing.Size(50, 11); + this.panelStory.TabIndex = 6; // - // starStory1 + // noBorderLabel11 // - this.starStory1.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starStory1.Location = new System.Drawing.Point(0, 0); - this.starStory1.Margin = new System.Windows.Forms.Padding(0); - this.starStory1.Name = "starStory1"; - this.starStory1.Size = new System.Drawing.Size(9, 10); - this.starStory1.TabIndex = 0; - this.starStory1.Text = "☆"; - this.starStory1.UseCompatibleTextRendering = true; - this.starStory1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starStory1.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starStory1.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel11.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel11.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel11.Location = new System.Drawing.Point(0, 0); + this.noBorderLabel11.Name = "noBorderLabel11"; + this.noBorderLabel11.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel11.TabIndex = 0; + this.noBorderLabel11.Text = "☆"; + this.noBorderLabel11.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel11.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel11.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starStory2 + // noBorderLabel12 // - this.starStory2.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starStory2.Location = new System.Drawing.Point(9, 0); - this.starStory2.Margin = new System.Windows.Forms.Padding(0); - this.starStory2.Name = "starStory2"; - this.starStory2.Size = new System.Drawing.Size(9, 10); - this.starStory2.TabIndex = 1; - this.starStory2.Text = "☆"; - this.starStory2.UseCompatibleTextRendering = true; - this.starStory2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starStory2.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starStory2.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel12.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel12.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel12.Location = new System.Drawing.Point(10, 0); + this.noBorderLabel12.Name = "noBorderLabel12"; + this.noBorderLabel12.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel12.TabIndex = 0; + this.noBorderLabel12.Text = "☆"; + this.noBorderLabel12.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel12.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel12.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starStory3 + // noBorderLabel13 // - this.starStory3.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starStory3.Location = new System.Drawing.Point(18, 0); - this.starStory3.Margin = new System.Windows.Forms.Padding(0); - this.starStory3.Name = "starStory3"; - this.starStory3.Size = new System.Drawing.Size(9, 10); - this.starStory3.TabIndex = 3; - this.starStory3.Text = "☆"; - this.starStory3.UseCompatibleTextRendering = true; - this.starStory3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starStory3.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starStory3.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel13.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel13.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel13.Location = new System.Drawing.Point(20, 0); + this.noBorderLabel13.Name = "noBorderLabel13"; + this.noBorderLabel13.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel13.TabIndex = 0; + this.noBorderLabel13.Text = "☆"; + this.noBorderLabel13.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel13.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel13.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starStory4 + // noBorderLabel14 // - this.starStory4.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starStory4.Location = new System.Drawing.Point(27, 0); - this.starStory4.Margin = new System.Windows.Forms.Padding(0); - this.starStory4.Name = "starStory4"; - this.starStory4.Size = new System.Drawing.Size(9, 10); - this.starStory4.TabIndex = 2; - this.starStory4.Text = "☆"; - this.starStory4.UseCompatibleTextRendering = true; - this.starStory4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starStory4.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starStory4.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel14.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel14.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel14.Location = new System.Drawing.Point(30, 0); + this.noBorderLabel14.Name = "noBorderLabel14"; + this.noBorderLabel14.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel14.TabIndex = 0; + this.noBorderLabel14.Text = "☆"; + this.noBorderLabel14.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel14.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel14.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // - // starStory5 + // noBorderLabel15 // - this.starStory5.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.starStory5.Location = new System.Drawing.Point(36, 0); - this.starStory5.Margin = new System.Windows.Forms.Padding(0); - this.starStory5.Name = "starStory5"; - this.starStory5.Size = new System.Drawing.Size(9, 10); - this.starStory5.TabIndex = 4; - this.starStory5.Text = "☆"; - this.starStory5.UseCompatibleTextRendering = true; - this.starStory5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); - this.starStory5.MouseEnter += new System.EventHandler(this.Star_MouseEnter); - this.starStory5.MouseLeave += new System.EventHandler(this.Star_MouseLeave); + this.noBorderLabel15.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.noBorderLabel15.LabelOffset = new System.Drawing.Point(-3, -3); + this.noBorderLabel15.Location = new System.Drawing.Point(40, 0); + this.noBorderLabel15.Name = "noBorderLabel15"; + this.noBorderLabel15.Size = new System.Drawing.Size(10, 11); + this.noBorderLabel15.TabIndex = 0; + this.noBorderLabel15.Text = "☆"; + this.noBorderLabel15.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Star_MouseClick); + this.noBorderLabel15.MouseEnter += new System.EventHandler(this.Star_MouseEnter); + this.noBorderLabel15.MouseLeave += new System.EventHandler(this.Star_MouseLeave); // // MyRatingCellEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.lblStory); this.Controls.Add(this.panelStory); - this.Controls.Add(this.lblPerform); this.Controls.Add(this.panelPerform); + this.Controls.Add(this.lblStory); + this.Controls.Add(this.lblPerform); this.Controls.Add(this.lblOverall); this.Controls.Add(this.panelOverall); this.Name = "MyRatingCellEditor"; - this.Size = new System.Drawing.Size(108, 45); + this.Size = new System.Drawing.Size(110, 46); this.panelOverall.ResumeLayout(false); this.panelPerform.ResumeLayout(false); this.panelStory.ResumeLayout(false); @@ -358,27 +343,26 @@ } #endregion - - private System.Windows.Forms.Label starOverall1; - private System.Windows.Forms.Label starOverall2; - private System.Windows.Forms.Label starOverall3; - private System.Windows.Forms.Label starOverall4; - private System.Windows.Forms.Label starOverall5; private System.Windows.Forms.Panel panelOverall; private System.Windows.Forms.Label lblOverall; private System.Windows.Forms.Label lblPerform; - private System.Windows.Forms.Panel panelPerform; - private System.Windows.Forms.Label starPerform1; - private System.Windows.Forms.Label starPerform2; - private System.Windows.Forms.Label starPerform3; - private System.Windows.Forms.Label starPerform4; - private System.Windows.Forms.Label starPerform5; private System.Windows.Forms.Label lblStory; + private NoBorderLabel noBorderLabel1; + private NoBorderLabel noBorderLabel5; + private NoBorderLabel noBorderLabel4; + private NoBorderLabel noBorderLabel3; + private NoBorderLabel noBorderLabel2; + private System.Windows.Forms.Panel panelPerform; + private NoBorderLabel noBorderLabel6; + private NoBorderLabel noBorderLabel7; + private NoBorderLabel noBorderLabel8; + private NoBorderLabel noBorderLabel9; + private NoBorderLabel noBorderLabel10; private System.Windows.Forms.Panel panelStory; - private System.Windows.Forms.Label starStory1; - private System.Windows.Forms.Label starStory2; - private System.Windows.Forms.Label starStory3; - private System.Windows.Forms.Label starStory4; - private System.Windows.Forms.Label starStory5; + private NoBorderLabel noBorderLabel11; + private NoBorderLabel noBorderLabel12; + private NoBorderLabel noBorderLabel13; + private NoBorderLabel noBorderLabel14; + private NoBorderLabel noBorderLabel15; } } diff --git a/Source/LibationWinForms/GridView/MyRatingCellEditor.cs b/Source/LibationWinForms/GridView/MyRatingCellEditor.cs index 6230b0eb..d6803126 100644 --- a/Source/LibationWinForms/GridView/MyRatingCellEditor.cs +++ b/Source/LibationWinForms/GridView/MyRatingCellEditor.cs @@ -1,5 +1,7 @@ using DataLayer; using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.Drawing; using System.Linq; using System.Windows.Forms; @@ -18,31 +20,30 @@ namespace LibationWinForms.GridView { _rating = value; int rating = 0; - foreach (Label star in panelOverall.Controls) + foreach (NoBorderLabel star in panelOverall.Controls) star.Tag = star.Text = _rating.OverallRating > rating++ ? SOLID_STAR : HOLLOW_STAR; rating = 0; - foreach (Label star in panelPerform.Controls) + foreach (NoBorderLabel star in panelPerform.Controls) star.Tag = star.Text = _rating.PerformanceRating > rating++ ? SOLID_STAR : HOLLOW_STAR; rating = 0; - foreach (Label star in panelStory.Controls) + foreach (NoBorderLabel star in panelStory.Controls) star.Tag = star.Text = _rating.StoryRating > rating++ ? SOLID_STAR : HOLLOW_STAR; } } public MyRatingCellEditor() { InitializeComponent(); - this.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; } private void Star_MouseEnter(object sender, EventArgs e) { - var thisTbox = sender as Label; + var thisTbox = sender as NoBorderLabel; var panel = thisTbox.Parent as Panel; var star = SOLID_STAR; - foreach (Label child in panel.Controls) + foreach (NoBorderLabel child in panel.Controls) { child.Text = star; if (child == thisTbox) star = HOLLOW_STAR; @@ -51,7 +52,7 @@ namespace LibationWinForms.GridView private void Star_MouseLeave(object sender, EventArgs e) { - var thisTbox = sender as Label; + var thisTbox = sender as NoBorderLabel; var panel = thisTbox.Parent as Panel; //Artifically shrink rectangle to guarantee mouse is outside when exiting from the left (negative X) @@ -60,7 +61,7 @@ namespace LibationWinForms.GridView if (!rect.Contains(clientPt.X - 2, clientPt.Y)) { //Restore defaults - foreach (Label child in panel.Controls) + foreach (NoBorderLabel child in panel.Controls) child.Text = (string)child.Tag; } } @@ -71,7 +72,7 @@ namespace LibationWinForms.GridView var perform = Rating.PerformanceRating; var story = Rating.StoryRating; - var thisTbox = sender as Label; + var thisTbox = sender as NoBorderLabel; var panel = thisTbox.Parent as Panel; int newRatingValue = 0; @@ -119,22 +120,38 @@ namespace LibationWinForms.GridView BackColor = dataGridViewCellStyle.BackColor; } - public bool EditingControlWantsInputKey(Keys keyData, bool dataGridViewWantsInputKey) - { - switch (keyData & Keys.KeyCode) - { - case Keys.Enter: - case Keys.Escape: - return true; - default: - return !dataGridViewWantsInputKey; - } - } - + public bool EditingControlWantsInputKey(Keys keyData, bool dataGridViewWantsInputKey) => false; public object GetEditingControlFormattedValue(DataGridViewDataErrorContexts context) => EditingControlFormattedValue; - public void PrepareEditingControlForEdit(bool selectAll) { } #endregion } + + public class NoBorderLabel : Panel + { + private string _text; + [Description("Label text"), Category("Data")] + [Browsable(true)] + [EditorBrowsable(EditorBrowsableState.Always)] + [AllowNull] + public override string Text + { + get => _text; + set + { + _text = value; + Invalidate(); + } + } + + [Description("X and Y offset for text drawing position. May be negative."), Category("Layout")] + [Browsable(true)] + [EditorBrowsable(EditorBrowsableState.Always)] + public Point LabelOffset { get; set; } + protected override void OnPaint(PaintEventArgs e) + { + TextRenderer.DrawText(e, Text, this.Font, LabelOffset, this.ForeColor); + base.OnPaint(e); + } + } } diff --git a/Source/LibationWinForms/GridView/MyRatingCellEditor.resx b/Source/LibationWinForms/GridView/MyRatingCellEditor.resx index f298a7be..fac40846 100644 --- a/Source/LibationWinForms/GridView/MyRatingCellEditor.resx +++ b/Source/LibationWinForms/GridView/MyRatingCellEditor.resx @@ -57,4 +57,70 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + \ No newline at end of file diff --git a/Source/LibationWinForms/GridView/ProductsGrid.Designer.cs b/Source/LibationWinForms/GridView/ProductsGrid.Designer.cs index 13a40e7f..15d3bd2d 100644 --- a/Source/LibationWinForms/GridView/ProductsGrid.Designer.cs +++ b/Source/LibationWinForms/GridView/ProductsGrid.Designer.cs @@ -31,8 +31,6 @@ this.components = new System.ComponentModel.Container(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.gridEntryDataGridView = new System.Windows.Forms.DataGridView(); - this.showHideColumnsContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); - this.syncBindingSource = new LibationWinForms.GridView.SyncBindingSource(this.components); this.removeGVColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.liberateGVColumn = new LibationWinForms.GridView.LiberateDataGridViewImageButtonColumn(); this.coverGVColumn = new System.Windows.Forms.DataGridViewImageColumn(); @@ -48,6 +46,8 @@ this.myRatingGVColumn = new LibationWinForms.GridView.MyRatingGridViewColumn(); this.miscGVColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tagAndDetailsGVColumn = new LibationWinForms.GridView.EditTagsDataGridViewImageButtonColumn(); + this.showHideColumnsContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); + this.syncBindingSource = new LibationWinForms.GridView.SyncBindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.syncBindingSource)).BeginInit(); this.SuspendLayout(); @@ -87,6 +87,7 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.gridEntryDataGridView.DefaultCellStyle = dataGridViewCellStyle1; this.gridEntryDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridEntryDataGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; this.gridEntryDataGridView.Location = new System.Drawing.Point(0, 0); this.gridEntryDataGridView.Name = "gridEntryDataGridView"; this.gridEntryDataGridView.RowHeadersVisible = false; @@ -97,15 +98,6 @@ this.gridEntryDataGridView.CellContextMenuStripNeeded += new System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventHandler(this.gridEntryDataGridView_CellContextMenuStripNeeded); this.gridEntryDataGridView.CellToolTipTextNeeded += new System.Windows.Forms.DataGridViewCellToolTipTextNeededEventHandler(this.gridEntryDataGridView_CellToolTipTextNeeded); // - // showHideColumnsContextMenuStrip - // - this.showHideColumnsContextMenuStrip.Name = "contextMenuStrip1"; - this.showHideColumnsContextMenuStrip.Size = new System.Drawing.Size(61, 4); - // - // syncBindingSource - // - this.syncBindingSource.DataSource = typeof(LibationWinForms.GridView.GridEntry); - // // removeGVColumn // this.removeGVColumn.DataPropertyName = "Remove"; @@ -233,6 +225,15 @@ this.tagAndDetailsGVColumn.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.tagAndDetailsGVColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; // + // showHideColumnsContextMenuStrip + // + this.showHideColumnsContextMenuStrip.Name = "contextMenuStrip1"; + this.showHideColumnsContextMenuStrip.Size = new System.Drawing.Size(61, 4); + // + // syncBindingSource + // + this.syncBindingSource.DataSource = typeof(LibationWinForms.GridView.GridEntry); + // // ProductsGrid // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); diff --git a/Source/LibationWinForms/GridView/ProductsGrid.cs b/Source/LibationWinForms/GridView/ProductsGrid.cs index 33a4d88d..0ac93377 100644 --- a/Source/LibationWinForms/GridView/ProductsGrid.cs +++ b/Source/LibationWinForms/GridView/ProductsGrid.cs @@ -40,8 +40,6 @@ namespace LibationWinForms.GridView EnableDoubleBuffering(); gridEntryDataGridView.Scroll += (_, s) => Scroll?.Invoke(this, s); removeGVColumn.Frozen = false; - - gridEntryDataGridView.EditMode = DataGridViewEditMode.EditOnEnter; } private void EnableDoubleBuffering()