diff --git a/OverlayFormObj/OverlayForm.cs b/OverlayFormObj/OverlayForm.cs index 8fffecd..4961bd7 100644 --- a/OverlayFormObj/OverlayForm.cs +++ b/OverlayFormObj/OverlayForm.cs @@ -327,14 +327,14 @@ namespace OverlayFormObj this.screenHeight = Screen.PrimaryScreen.Bounds.Height; } - + this.SuspendLayout(); marqueeXPos = this.Width; marqueeXPosSecondLine = 7 * this.Width / 8; marqueeXPosThirdLine = this.Width; - + this.ResumeLayout(); marqueeTimer = new System.Windows.Forms.Timer(); - marqueeTimer.Interval = 20; + marqueeTimer.Interval = 40; marqueeTimer.Tick += MarqueeTimer_Tick; marqueeTimer.Start(); diff --git a/PrimaryFormParts/PrimaryForm.Favorite.cs b/PrimaryFormParts/PrimaryForm.Favorite.cs index a68a7f1..c2ff623 100644 --- a/PrimaryFormParts/PrimaryForm.Favorite.cs +++ b/PrimaryFormParts/PrimaryForm.Favorite.cs @@ -24,16 +24,16 @@ namespace DualScreenDemo int[,] coords = new int[,] { - {784, 508, 70, 65}, - {868, 508, 70, 65}, - {952, 508, 70, 65}, - {1036, 508, 70, 65}, - {1120, 508, 70, 65}, - {784, 580, 70, 65}, - {868, 580, 70, 65}, - {952, 580, 70, 65}, - {1036, 580, 70, 65}, - {1120, 580, 70, 65} + {784, 488, 70, 65}, + {868, 488, 70, 65}, + {952, 488, 70, 65}, + {1036, 488, 70, 65}, + {1120, 488, 70, 65}, + {784, 560, 70, 65}, + {868, 560, 70, 65}, + {952, 560, 70, 65}, + {1036, 560, 70, 65}, + {1120, 560, 70, 65} }; int screenW = Screen.PrimaryScreen.Bounds.Width; @@ -86,7 +86,7 @@ namespace DualScreenDemo { Name = "enterFavoriteButton" }; - ResizeAndPositionButton(enterFavoriteButton, 822, 657, 70, 65); + ResizeAndPositionButton(enterFavoriteButton, 822, 637, 70, 65); enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["Enter"])); enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; enterFavoriteButton.FlatStyle = FlatStyle.Flat; @@ -101,7 +101,7 @@ namespace DualScreenDemo { Name = "newFavoriteButton" }; - ResizeAndPositionButton(newFavoriteButton, 906, 657, 70, 65); + ResizeAndPositionButton(newFavoriteButton, 906, 637, 70, 65); newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["New"])); newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; newFavoriteButton.FlatStyle = FlatStyle.Flat; @@ -116,7 +116,7 @@ namespace DualScreenDemo { Name = "refillFavoriteButton" }; - ResizeAndPositionButton(refillFavoriteButton, 989, 657, 70, 65); + ResizeAndPositionButton(refillFavoriteButton, 989, 637, 70, 65); refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["Refill"])); refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; refillFavoriteButton.FlatStyle = FlatStyle.Flat; @@ -131,7 +131,7 @@ namespace DualScreenDemo { Name = "closeFavoriteButton" }; - ResizeAndPositionButton(closeFavoriteButton, 1073, 657, 70, 65); + ResizeAndPositionButton(closeFavoriteButton, 1073, 637, 70, 65); closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["Close"])); closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; closeFavoriteButton.FlatStyle = FlatStyle.Flat; @@ -372,7 +372,7 @@ namespace DualScreenDemo FavoritePictureBox.Image = image; // 設定 PictureBox 的大小與位置(依你的需要調整) - ResizeAndPositionPictureBox(FavoritePictureBox, 773, 380, (int)(image.Width * 0.8f) , (int)(image.Height * 0.8f)); + ResizeAndPositionPictureBox(FavoritePictureBox, 773, 355, (int)(image.Width * 0.8f) , (int)(image.Height * 0.8f)); FavoritePictureBox.Visible = true; } diff --git a/PrimaryFormParts/PrimaryForm.VodScreen.cs b/PrimaryFormParts/PrimaryForm.VodScreen.cs index 8f87b1a..dda006c 100644 --- a/PrimaryFormParts/PrimaryForm.VodScreen.cs +++ b/PrimaryFormParts/PrimaryForm.VodScreen.cs @@ -93,6 +93,8 @@ namespace DualScreenDemo VodScreenCloseButton_Click); + overlayPanel.Size = Screen.PrimaryScreen.Bounds.Size; + this.Controls.Add(vodButton); this.Controls.Add(insertButton); this.Controls.Add(albumButton); diff --git a/PrimaryFormParts/PrimaryForm.cs b/PrimaryFormParts/PrimaryForm.cs index 16a51d2..a02bda5 100644 --- a/PrimaryFormParts/PrimaryForm.cs +++ b/PrimaryFormParts/PrimaryForm.cs @@ -2082,7 +2082,7 @@ namespace DualScreenDemo } - totalPages = (int)Math.Ceiling((double)List.Count / multiPagePanel.itemsPerPage); + totalPages = (int)Math.Ceiling((double)List.Count / itemsPerPage); index = List.FindIndex(song => song.GetState() == PlayState.Playing); int page = 0; if ((index + 1) > multiPagePanel.itemsPerPage) page = Math.Abs((index + 1) / multiPagePanel.itemsPerPage); diff --git a/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.HandwritingSearch.cs b/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.HandwritingSearch.cs index 4c42615..7ad18d0 100644 --- a/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.HandwritingSearch.cs +++ b/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.HandwritingSearch.cs @@ -204,7 +204,7 @@ namespace DualScreenDemo private void ClearButtonHandWritingSingers_Click(object sender, EventArgs e) { - if (this.Controls.Contains(handWritingPanelForSingers) && inkOverlayForSingers != null) + if (pictureBoxHandWritingSingers.Controls.Contains(handWritingPanelForSingers) && inkOverlayForSingers != null) { inkOverlayForSingers.Ink.DeleteStrokes(); handWritingPanelForSingers.Invalidate(); @@ -213,12 +213,12 @@ namespace DualScreenDemo private void CloseButtonForSingers_Click(object sender, EventArgs e) { - this.SuspendLayout(); + pictureBoxHandWritingSingers.SuspendLayout(); SetHandWritingForSingersAndButtonsVisibility(false); handWritingSearchButton.BackgroundImage = handWritingSearchNormalBackground; FindHandwritingSingers(); - this.ResumeLayout(); + pictureBoxHandWritingSingers.ResumeLayout(); } private void FindHandwritingSingers() { diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs index 93c8ea5..b2e7410 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs @@ -210,7 +210,7 @@ namespace DualScreenDemo } private void ClearButtonHandWritingSongs_Click(object sender, EventArgs e) { - if (this.Controls.Contains(handWritingPanelForSongs) && inkOverlayForSongs != null) + if (pictureBoxHandWritingSongs.Controls.Contains(handWritingPanelForSongs) && inkOverlayForSongs != null) { inkOverlayForSongs.Ink.DeleteStrokes(); handWritingPanelForSongs.Invalidate(); @@ -219,11 +219,11 @@ namespace DualScreenDemo private void CloseButtonForSongs_Click(object sender, EventArgs e) { - this.SuspendLayout(); + pictureBoxHandWritingSongs.SuspendLayout(); handWritingSearchSongButton.BackgroundImage = handWritingSearchSongNormalBackground; SetHandWritingForSongsAndButtonsVisibility(false); FindHandwritingSongs(); - this.ResumeLayout(); + pictureBoxHandWritingSongs.ResumeLayout(); } private void FindHandwritingSongs() {