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