歌曲鍵盤覆蓋問題修正和UI優化
This commit is contained in:
parent
dd71dd83b3
commit
4843851328
@ -44,10 +44,11 @@ namespace DualScreenDemo
|
||||
|
||||
|
||||
//設定不同模式的UI顯示
|
||||
//SetZhuYinSingersAndButtonsVisibility(false);
|
||||
SetEnglishSingersAndButtonsVisibility(false);
|
||||
SetPinYinSingersAndButtonsVisibility(false);
|
||||
SetHandWritingForSingersAndButtonsVisibility(false);
|
||||
SetWordCountSongsAndButtonsVisibility(false); // 隱藏字數搜尋相關控件
|
||||
SetEnglishSongsAndButtonsVisibility(false);
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
SetHandWritingForSongsAndButtonsVisibility(false);
|
||||
SetSongIDSearchAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(true);
|
||||
ResetinputBox();
|
||||
pictureBoxZhuYinSongs.Visible = true;
|
||||
@ -302,7 +303,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
// 隱藏注音輸入的圖片
|
||||
pictureBoxZhuYinSongs.Visible = false;
|
||||
|
||||
zhuyinSearchSongButton.BackgroundImage = zhuyinSearchSongNormalBackground;
|
||||
// 隱藏注音輸入的所有按鈕與介面元素
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace DualScreenDemo
|
||||
englishSearchSongButton.BackgroundImage = englishSearchSongActiveBackground;
|
||||
pinyinSearchSongButton.BackgroundImage = pinyinSearchSongNormalBackground;
|
||||
wordCountSearchSongButton.BackgroundImage = wordCountSearchSongNormalBackground;
|
||||
handWritingSearchButton.BackgroundImage = handWritingSearchSongNormalBackground;;
|
||||
handWritingSearchSongButton.BackgroundImage = handWritingSearchSongNormalBackground;
|
||||
numberSearchSongButton.BackgroundImage = numberSearchSongNormalBackground;
|
||||
|
||||
bool shouldBeVisible = !pictureBoxEnglishSongs.Visible;
|
||||
@ -38,13 +38,14 @@ namespace DualScreenDemo
|
||||
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["EnglishSongs"]);
|
||||
|
||||
ShowImageOnPictureBoxEnglishSongs(Path.Combine(Application.StartupPath, imagePath));
|
||||
|
||||
SetZhuYinSingersAndButtonsVisibility(false);
|
||||
SetEnglishSingersAndButtonsVisibility(false);
|
||||
SetPinYinSingersAndButtonsVisibility(false);
|
||||
SetHandWritingForSingersAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
// 鍵盤UI介面顯示設定
|
||||
SetWordCountSongsAndButtonsVisibility(false);
|
||||
SetEnglishSongsAndButtonsVisibility(true);
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
SetHandWritingForSongsAndButtonsVisibility(false);
|
||||
SetSongIDSearchAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
|
||||
ResetinputBox();
|
||||
pictureBoxEnglishSongs.Visible = true;
|
||||
}
|
||||
@ -226,6 +227,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
|
||||
pictureBoxEnglishSongs.Visible = false;
|
||||
englishSearchSongButton.BackgroundImage = englishSearchSongNormalBackground;
|
||||
SetEnglishSongsAndButtonsVisibility(false);
|
||||
}
|
||||
|
||||
|
@ -40,14 +40,13 @@ namespace DualScreenDemo
|
||||
|
||||
ShowImageOnPictureBoxHandWritingSongs(Path.Combine(Application.StartupPath, handWritingImagePath));
|
||||
|
||||
SetZhuYinSingersAndButtonsVisibility(false);
|
||||
SetEnglishSingersAndButtonsVisibility(false);
|
||||
SetPinYinSingersAndButtonsVisibility(false);
|
||||
SetHandWritingForSingersAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
// 鍵盤UI介面顯示設定
|
||||
SetWordCountSongsAndButtonsVisibility(false);
|
||||
SetEnglishSongsAndButtonsVisibility(false);
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
SetHandWritingForSongsAndButtonsVisibility(true);
|
||||
SetSongIDSearchAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
|
||||
ResetinputBox();
|
||||
this.ResumeLayout();
|
||||
@ -296,7 +295,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
|
||||
this.SuspendLayout();
|
||||
|
||||
handWritingSearchSongButton.BackgroundImage = handWritingSearchSongNormalBackground;
|
||||
SetHandWritingForSongsAndButtonsVisibility(false);
|
||||
|
||||
|
||||
|
@ -63,13 +63,13 @@ namespace DualScreenDemo
|
||||
private void SongIDSearchSongsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// 設定按鈕背景,將「注音搜尋」設為啟動狀態,其餘按鈕恢復為正常狀態
|
||||
zhuyinSearchButton.BackgroundImage = zhuyinSearchActiveBackground;
|
||||
englishSearchButton.BackgroundImage = englishSearchNormalBackground;
|
||||
pinyinSearchButton.BackgroundImage = pinyinSearchNormalBackground;
|
||||
zhuyinSearchSongButton.BackgroundImage = zhuyinSearchSongNormalBackground;
|
||||
englishSearchSongButton.BackgroundImage = englishSearchSongNormalBackground;
|
||||
pinyinSearchSongButton.BackgroundImage = pinyinSearchSongNormalBackground;
|
||||
wordCountSearchSongButton.BackgroundImage = wordCountSearchSongNormalBackground;
|
||||
handWritingSearchSongButton.BackgroundImage = handWritingSearchNormalBackground;
|
||||
|
||||
//SongIDSearchButton.BackgroundImage = SongIDSearchNormalBackground;
|
||||
handWritingSearchSongButton.BackgroundImage = handWritingSearchSongNormalBackground;
|
||||
numberSearchSongButton.BackgroundImage = numberSearchSongActiveBackground;
|
||||
|
||||
|
||||
|
||||
// 載入設定檔,取得圖片路徑資訊
|
||||
@ -81,11 +81,13 @@ namespace DualScreenDemo
|
||||
// 在 PictureBox 中顯示對應的「注音歌手」圖片
|
||||
ShowImageOnPictureBoxSongIDSearch(Path.Combine(Application.StartupPath, imagePath));
|
||||
|
||||
// 設定不同搜尋模式的 UI 控件可見性
|
||||
SetEnglishSingersAndButtonsVisibility(false); // 隱藏英文字母搜尋相關控件
|
||||
SetPinYinSingersAndButtonsVisibility(false); // 隱藏拼音搜尋相關控件
|
||||
SetHandWritingForSingersAndButtonsVisibility(false); // 隱藏手寫搜尋相關控件
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false); // 隱藏其他搜尋模式的圖片框
|
||||
// 鍵盤UI介面顯示設定
|
||||
SetWordCountSongsAndButtonsVisibility(false);
|
||||
SetEnglishSongsAndButtonsVisibility(false);
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
SetHandWritingForSongsAndButtonsVisibility(false);
|
||||
SetSongIDSearchAndButtonsVisibility(true);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
|
||||
ResetinputBox();
|
||||
SetSongIDSearchAndButtonsVisibility(true); // 顯示字數搜尋相關控件
|
||||
@ -536,7 +538,8 @@ namespace DualScreenDemo
|
||||
{
|
||||
// 隱藏 SongID 歌手圖片框
|
||||
pictureBoxSongIDSearch.Visible = false;
|
||||
|
||||
|
||||
numberSearchSongButton.BackgroundImage = numberSearchSongNormalBackground;
|
||||
// 隱藏與 SongID 歌手相關的所有按鈕
|
||||
SetSongIDSearchAndButtonsVisibility(false);
|
||||
}
|
||||
|
@ -40,11 +40,13 @@ namespace DualScreenDemo
|
||||
ShowImageOnPictureBoxPinYinSongs(Path.Combine(Application.StartupPath, pinyinImagePath));
|
||||
|
||||
|
||||
// 設定不同模式的 UI 顯示
|
||||
SetZhuYinSingersAndButtonsVisibility(false);
|
||||
SetEnglishSingersAndButtonsVisibility(false);
|
||||
SetPinYinSingersAndButtonsVisibility(false);
|
||||
// 鍵盤UI介面顯示設定
|
||||
SetWordCountSongsAndButtonsVisibility(false);
|
||||
SetEnglishSongsAndButtonsVisibility(false);
|
||||
SetPinYinSongsAndButtonsVisibility(true);
|
||||
SetHandWritingForSongsAndButtonsVisibility(false);
|
||||
SetSongIDSearchAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
|
||||
ResetinputBox();
|
||||
pictureBoxPinYinSongs.Visible = true;
|
||||
@ -257,6 +259,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
// 隱藏拼音輸入的背景圖片 (可能是 UI 中的輸入框背景)
|
||||
pictureBoxPinYinSongs.Visible = false;
|
||||
pinyinSearchSongButton.BackgroundImage = pinyinSearchSongNormalBackground;
|
||||
// 設定拼音輸入框與所有相關按鈕的可見性為 false
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
|
||||
|
@ -63,11 +63,12 @@ namespace DualScreenDemo
|
||||
private void WordCountSearchSongsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// 設定按鈕背景,將「注音搜尋」設為啟動狀態,其餘按鈕恢復為正常狀態
|
||||
zhuyinSearchButton.BackgroundImage = zhuyinSearchActiveBackground;
|
||||
englishSearchButton.BackgroundImage = englishSearchNormalBackground;
|
||||
pinyinSearchButton.BackgroundImage = pinyinSearchNormalBackground;
|
||||
wordCountSearchButton.BackgroundImage = wordCountSearchNormalBackground;
|
||||
handWritingSearchButton.BackgroundImage = handWritingSearchNormalBackground;
|
||||
zhuyinSearchSongButton.BackgroundImage = zhuyinSearchSongNormalBackground;
|
||||
englishSearchSongButton.BackgroundImage = englishSearchSongNormalBackground;
|
||||
pinyinSearchSongButton.BackgroundImage = pinyinSearchSongNormalBackground;
|
||||
wordCountSearchSongButton.BackgroundImage = wordCountSearchSongActiveBackground;
|
||||
handWritingSearchSongButton.BackgroundImage = handWritingSearchSongNormalBackground;
|
||||
numberSearchSongButton.BackgroundImage = numberSearchSongNormalBackground;
|
||||
|
||||
// 載入設定檔,取得圖片路徑資訊
|
||||
var configData = LoadConfigDataforWordCountSongs();
|
||||
@ -78,12 +79,15 @@ namespace DualScreenDemo
|
||||
// 在 PictureBox 中顯示對應的「注音歌手」圖片
|
||||
ShowImageOnPictureBoxWordCountSongs(Path.Combine(Application.StartupPath, imagePath));
|
||||
|
||||
// 設定不同搜尋模式的 UI 控件可見性
|
||||
SetEnglishSingersAndButtonsVisibility(false); // 隱藏英文字母搜尋相關控件
|
||||
SetPinYinSingersAndButtonsVisibility(false); // 隱藏拼音搜尋相關控件
|
||||
SetHandWritingForSingersAndButtonsVisibility(false); // 隱藏手寫搜尋相關控件
|
||||
// 鍵盤UI介面顯示設定
|
||||
SetWordCountSongsAndButtonsVisibility(true);
|
||||
SetEnglishSongsAndButtonsVisibility(false);
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
SetHandWritingForSongsAndButtonsVisibility(false);
|
||||
SetSongIDSearchAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false); // 隱藏其他搜尋模式的圖片框
|
||||
|
||||
SetWordCountSongsAndButtonsVisibility(true); // 顯示字數搜尋相關控件
|
||||
// 顯示「注音歌手搜尋」的圖片框
|
||||
ResetinputBox();
|
||||
@ -533,7 +537,8 @@ namespace DualScreenDemo
|
||||
{
|
||||
// 隱藏 WordCount 歌手圖片框
|
||||
pictureBoxWordCountSongs.Visible = false;
|
||||
|
||||
// 關閉背景圖式
|
||||
wordCountSearchSongButton.BackgroundImage = wordCountSearchSongNormalBackground;
|
||||
// 隱藏與 WordCount 歌手相關的所有按鈕
|
||||
SetWordCountSongsAndButtonsVisibility(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user