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