From a9d39c508f15d7b11f63b32e3f9fef156030cbee Mon Sep 17 00:00:00 2001 From: Sogolumbo <33571916+Sogolumbo@users.noreply.github.com> Date: Sat, 20 Jun 2020 21:32:58 +0200 Subject: [PATCH 1/2] Fix RemoveButton-Location --- .../MusicBookItemUserControl.Designer.cs | 1 + Music_Book_Index_Search/MusicBookItemUserControl.cs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Music_Book_Index_Search/MusicBookItemUserControl.Designer.cs b/Music_Book_Index_Search/MusicBookItemUserControl.Designer.cs index f0edbd9..885f2d8 100644 --- a/Music_Book_Index_Search/MusicBookItemUserControl.Designer.cs +++ b/Music_Book_Index_Search/MusicBookItemUserControl.Designer.cs @@ -85,6 +85,7 @@ private void InitializeComponent() this.Name = "MusicBookItemUserControl"; this.Padding = new System.Windows.Forms.Padding(3); this.Size = new System.Drawing.Size(407, 54); + this.Resize += new System.EventHandler(this.MusicBookItemUserControl_Resize); this.ResumeLayout(false); this.PerformLayout(); diff --git a/Music_Book_Index_Search/MusicBookItemUserControl.cs b/Music_Book_Index_Search/MusicBookItemUserControl.cs index a2754ed..af6f0e1 100644 --- a/Music_Book_Index_Search/MusicBookItemUserControl.cs +++ b/Music_Book_Index_Search/MusicBookItemUserControl.cs @@ -30,6 +30,11 @@ private void MusicBookItemUserControl_FontChanged(object sender, EventArgs e) SetTitleFont(); } + private void SetRemoveButtonLocation() + { + removeButton.Location = new Point(Width - removeButton.Width - 6, (Height - removeButton.Height)/2); + } + public event EventHandler RemoveItem; private Tuple _filepair; @@ -50,6 +55,11 @@ private void removeButton_Click(object sender, EventArgs e) { RemoveItem?.Invoke(this, new RemoveItemEventArgs(_filepair)); } + + private void MusicBookItemUserControl_Resize(object sender, EventArgs e) + { + SetRemoveButtonLocation(); + } } public class RemoveItemEventArgs : EventArgs From dbbea0ddc4096cbfd67c6d23e62d39a3fd0d68ac Mon Sep 17 00:00:00 2001 From: Sogolumbo <33571916+Sogolumbo@users.noreply.github.com> Date: Sat, 20 Jun 2020 21:33:54 +0200 Subject: [PATCH 2/2] Change Text --- Music_Book_Index_Search/OptionsForm.Designer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Music_Book_Index_Search/OptionsForm.Designer.cs b/Music_Book_Index_Search/OptionsForm.Designer.cs index 240dc34..7320093 100644 --- a/Music_Book_Index_Search/OptionsForm.Designer.cs +++ b/Music_Book_Index_Search/OptionsForm.Designer.cs @@ -212,8 +212,8 @@ private void InitializeComponent() this.shortcutLabel.Name = "shortcutLabel"; this.shortcutLabel.Size = new System.Drawing.Size(237, 39); this.shortcutLabel.TabIndex = 13; - this.shortcutLabel.Text = "Shortcuts for the main program: \r\nAlt + F: Add/remove selected song from favorite" + - "s\r\nCtrl + F: Move focus to the search text box."; + this.shortcutLabel.Text = "Shortcuts in the main program: \r\nAlt + F: Add/remove selected song from favorites" + + "\r\nCtrl + F: Move focus to the search text box."; // // OptionsForm //