test #1
@ -1752,7 +1752,14 @@ public class MultiPagePanel : Panel
|
||||
if (currentPageIndex > 0)
|
||||
{
|
||||
currentPageIndex--;
|
||||
RefreshDisplay();
|
||||
if(currentSongList.Count == 0)
|
||||
{
|
||||
RefreshDisplayBase_Singer();
|
||||
}
|
||||
else
|
||||
{
|
||||
RefreshDisplay();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2971,11 +2978,15 @@ public class MultiPagePanel : Panel
|
||||
playButton.Visible = false;
|
||||
pauseButton.Visible = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右下角關閉按鈕事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ShouYeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
autoRefreshTimer.Stop(); // 停止自动刷新
|
||||
|
||||
/*
|
||||
SetHotSongButtonsVisibility(false);
|
||||
SetNewSongButtonsVisibility(false);
|
||||
SetSingerSearchButtonsVisibility(false);
|
||||
@ -2989,16 +3000,21 @@ public class MultiPagePanel : Panel
|
||||
// SetPictureBoxWordCountAndButtonsVisibility(false);
|
||||
SetPinYinSingersAndButtonsVisibility(false);
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
SetPictureBoxToggleLightAndButtonsVisibility(false);
|
||||
inputBoxZhuYinSingers.Text = "";
|
||||
inputBoxZhuYinSongs.Text = "";
|
||||
inputBoxEnglishSingers.Text = "";
|
||||
inputBoxEnglishSongs.Text = "";
|
||||
inputBoxPinYinSingers.Text = "";
|
||||
inputBoxPinYinSongs.Text = "";
|
||||
// inputBoxWordCount.Text = "";
|
||||
SetPictureBoxToggleLightAndButtonsVisibility(false);*/
|
||||
|
||||
|
||||
FindFirstNonEmptyText(inputBoxZhuYinSingers
|
||||
, inputBoxZhuYinSongs
|
||||
, inputBoxEnglishSingers
|
||||
, inputBoxEnglishSongs
|
||||
, inputBoxPinYinSingers
|
||||
, inputBoxPinYinSongs
|
||||
, inputBoxWordCountSingers
|
||||
, inputBoxWordCountSongs
|
||||
, inputBoxSongIDSearch
|
||||
, handwritingInputBoxForSongs
|
||||
, handwritingInputBoxForSingers);
|
||||
|
||||
foreach (var label in songLabels)
|
||||
{
|
||||
this.Controls.Remove(label);
|
||||
@ -3006,7 +3022,38 @@ public class MultiPagePanel : Panel
|
||||
}
|
||||
songLabels.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢空字串,將第一個不為空的字串,重新刷新
|
||||
/// </summary>
|
||||
/// <param name="controls"></param>
|
||||
private void FindFirstNonEmptyText(params Control[] controls)
|
||||
{
|
||||
foreach (var control in controls)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(control.Text))
|
||||
{
|
||||
var temp = control.Text;
|
||||
ResetinputBox();
|
||||
control.Text = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 重置所有輸入框
|
||||
/// </summary>
|
||||
private void ResetinputBox(){
|
||||
inputBoxZhuYinSingers.Text = "";
|
||||
inputBoxZhuYinSongs.Text = "";
|
||||
inputBoxEnglishSingers.Text = "";
|
||||
inputBoxEnglishSongs.Text = "";
|
||||
inputBoxPinYinSingers.Text = "";
|
||||
inputBoxPinYinSongs.Text = "";
|
||||
inputBoxWordCountSingers.Text = "";
|
||||
inputBoxWordCountSongs.Text = "";
|
||||
inputBoxSongIDSearch.Text = "";
|
||||
handwritingInputBoxForSongs.Text = "";
|
||||
handwritingInputBoxForSingers.Text = "";
|
||||
}
|
||||
|
||||
private void MuteUnmuteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -67,6 +67,8 @@ namespace DualScreenDemo
|
||||
SetZhuYinSingersAndButtonsVisibility(true); // 顯示注音搜尋相關控件
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false); // 隱藏其他搜尋模式的圖片框
|
||||
|
||||
ResetInputBox(); // 重置輸入框
|
||||
|
||||
// 顯示「注音歌手搜尋」的圖片框
|
||||
pictureBoxZhuYinSingers.Visible = true;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ namespace DualScreenDemo
|
||||
SetHandWritingForSingersAndButtonsVisibility(false);
|
||||
SetEnglishSingersAndButtonsVisibility(true);
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false);
|
||||
ResetinputBox();
|
||||
pictureBoxEnglishSingers.Visible = true;
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ namespace DualScreenDemo
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false);
|
||||
SetHandWritingForSingersAndButtonsVisibility(true);
|
||||
|
||||
ResetinputBox();
|
||||
this.ResumeLayout();
|
||||
}
|
||||
|
||||
|
@ -218,6 +218,16 @@ namespace DualScreenDemo
|
||||
|
||||
multiPagePanel.currentPageIndex = 0;
|
||||
multiPagePanel.LoadSongs(currentSongList);
|
||||
/////////////////////////////////////////////////////////////////
|
||||
/*string searchText = inputBoxPinYinSingers.Text;
|
||||
var searchResults = allArtists.Where(artist => artist.Name.Replace(" ", "").StartsWith(searchText)).ToList();
|
||||
|
||||
currentPage = 0;
|
||||
currentArtistList = searchResults;
|
||||
totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage);
|
||||
|
||||
multiPagePanel.currentPageIndex = 0;
|
||||
multiPagePanel.LoadSingers(currentArtistList);*/
|
||||
|
||||
|
||||
};
|
||||
|
@ -86,7 +86,8 @@ namespace DualScreenDemo
|
||||
SetHandWritingForSingersAndButtonsVisibility(false); // 隱藏手寫搜尋相關控件
|
||||
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false); // 隱藏其他搜尋模式的圖片框
|
||||
SetWordCountSingersAndButtonsVisibility(true); // 顯示字數搜尋相關控件
|
||||
SetWordCountSingersAndButtonsVisibility(true); // 顯示字數搜尋相關控件
|
||||
ResetinputBox();
|
||||
// 顯示「注音歌手搜尋」的圖片框
|
||||
pictureBoxWordCountSingers.Visible = true;
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ namespace DualScreenDemo
|
||||
SetPinYinSingersAndButtonsVisibility(false);
|
||||
SetHandWritingForSingersAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(true);
|
||||
ResetinputBox();
|
||||
pictureBoxZhuYinSongs.Visible = true;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -45,6 +45,7 @@ namespace DualScreenDemo
|
||||
SetHandWritingForSingersAndButtonsVisibility(false);
|
||||
SetZhuYinSongsAndButtonsVisibility(false);
|
||||
SetEnglishSongsAndButtonsVisibility(true);
|
||||
ResetinputBox();
|
||||
pictureBoxEnglishSongs.Visible = true;
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,7 @@ namespace DualScreenDemo
|
||||
SetPinYinSongsAndButtonsVisibility(false);
|
||||
SetHandWritingForSongsAndButtonsVisibility(true);
|
||||
|
||||
ResetinputBox();
|
||||
this.ResumeLayout();
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,8 @@ namespace DualScreenDemo
|
||||
SetPinYinSingersAndButtonsVisibility(false); // 隱藏拼音搜尋相關控件
|
||||
SetHandWritingForSingersAndButtonsVisibility(false); // 隱藏手寫搜尋相關控件
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false); // 隱藏其他搜尋模式的圖片框
|
||||
|
||||
|
||||
ResetinputBox();
|
||||
SetSongIDSearchAndButtonsVisibility(true); // 顯示字數搜尋相關控件
|
||||
// 顯示「注音歌手搜尋」的圖片框
|
||||
pictureBoxSongIDSearch.Visible = true;
|
||||
|
@ -45,6 +45,8 @@ namespace DualScreenDemo
|
||||
SetEnglishSingersAndButtonsVisibility(false);
|
||||
SetPinYinSingersAndButtonsVisibility(false);
|
||||
SetPinYinSongsAndButtonsVisibility(true);
|
||||
|
||||
ResetinputBox();
|
||||
pictureBoxPinYinSongs.Visible = true;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -86,6 +86,7 @@ namespace DualScreenDemo
|
||||
//SetPictureBoxArtistSearchAndButtonsVisibility(false); // 隱藏其他搜尋模式的圖片框
|
||||
SetWordCountSongsAndButtonsVisibility(true); // 顯示字數搜尋相關控件
|
||||
// 顯示「注音歌手搜尋」的圖片框
|
||||
ResetinputBox();
|
||||
pictureBoxWordCountSongs.Visible = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user