確認關台按鈕+關閉X按鈕+SVR流程變更
This commit is contained in:
parent
d81c88119d
commit
6a255211e2
@ -336,21 +336,25 @@ namespace DualScreenDemo
|
||||
}
|
||||
private void buttonMiddle_Click(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine("巨");
|
||||
sequenceManager.ProcessClick("巨");
|
||||
}
|
||||
|
||||
private void buttonTopRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine("級");
|
||||
sequenceManager.ProcessClick("級");
|
||||
}
|
||||
|
||||
private void buttonTopLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine("超");
|
||||
sequenceManager.ProcessClick("超");
|
||||
}
|
||||
|
||||
private void buttonThanks_Click(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine("星");
|
||||
sequenceManager.ProcessClick("星");
|
||||
}
|
||||
|
||||
@ -1372,12 +1376,12 @@ namespace DualScreenDemo
|
||||
TraditionalChineseButton_Click
|
||||
);
|
||||
|
||||
|
||||
/* 關閉應用程式按鈕*/
|
||||
exitButton = new Button{};
|
||||
exitButton.Name = "exitButton";
|
||||
/*exitButton.Name = "exitButton";
|
||||
ConfigureButton(exitButton, 1394, 2, 1428 - 1394, 37 - 2,
|
||||
resizedNormalStateImage, resizedMouseOverImage, resizedMouseDownImage,
|
||||
(sender, e) => Application.Exit());
|
||||
(sender, e) => Application.Exit());*/
|
||||
}
|
||||
|
||||
private void InitializeButton(ref Button button, ref Bitmap normalBackground, ref Bitmap activeBackground, string buttonName, int x, int y, int width, int height, string imagePath, EventHandler clickEventHandler)
|
||||
@ -1533,12 +1537,25 @@ namespace DualScreenDemo
|
||||
try
|
||||
{
|
||||
// 1. 檢查是否能連接到 SVR01
|
||||
string serverVideoPath = @"\\SVR01\SuperstarB\video";
|
||||
string localVideoPath = @"C:\video";
|
||||
string serverVideoPath = @"\\SVR01\video";
|
||||
string serverVideoPath2 = @"\\SVR02\video";
|
||||
string selectedServerPath = null;
|
||||
|
||||
if (!Directory.Exists(serverVideoPath))
|
||||
string localVideoPath = @"D:\video";
|
||||
|
||||
if (Directory.Exists(serverVideoPath))
|
||||
{
|
||||
Console.WriteLine("未連接到SVR,使用本地影片");
|
||||
selectedServerPath = serverVideoPath;
|
||||
Console.WriteLine("已連接到 SVR01");
|
||||
}
|
||||
else if (Directory.Exists(serverVideoPath2))
|
||||
{
|
||||
selectedServerPath = serverVideoPath2;
|
||||
Console.WriteLine("已連接到 SVR02");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("未連接到 SVR,使用本地影片");
|
||||
LoadLocalVideoFiles();
|
||||
return;
|
||||
}
|
||||
@ -1550,7 +1567,7 @@ namespace DualScreenDemo
|
||||
}
|
||||
|
||||
// 獲取服務器和本地的所有文件
|
||||
var serverFiles = Directory.GetFiles(serverVideoPath, "*.mpg")
|
||||
var serverFiles = Directory.GetFiles(selectedServerPath, "*.mpg")
|
||||
.Select(f => new FileInfo(f))
|
||||
.ToDictionary(f => f.Name, f => f);
|
||||
|
||||
@ -1606,7 +1623,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
try
|
||||
{
|
||||
string videoDirectory = @"C:\video\";
|
||||
string videoDirectory = @"D:\video\";
|
||||
string[] videoFiles = Directory.GetFiles(videoDirectory, "*.mpg");
|
||||
string pattern = @"^(?<songNumber>\d+)-.*?-(?<songName>[^-]+)-";
|
||||
|
||||
@ -1880,7 +1897,7 @@ namespace DualScreenDemo
|
||||
|
||||
string songInfo = songData.Song ?? "未提供歌曲信息";
|
||||
|
||||
g.DrawString(songInfo, font, textBrush, new PointF(201, 29));
|
||||
g.DrawString(songInfo, font, textBrush, new PointF(73, 8));
|
||||
|
||||
}
|
||||
ResizeAndPositionPictureBox(VodScreenPictureBox, xPosition, yPosition, pictureBoxWidth, pictureBoxHeight);
|
||||
@ -2137,20 +2154,22 @@ namespace DualScreenDemo
|
||||
/// <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 ResetinputBox()
|
||||
{
|
||||
inputBoxZhuYinSingers?.Clear();
|
||||
inputBoxZhuYinSongs?.Clear();
|
||||
inputBoxEnglishSingers?.Clear();
|
||||
inputBoxEnglishSongs?.Clear();
|
||||
inputBoxPinYinSingers?.Clear();
|
||||
inputBoxPinYinSongs?.Clear();
|
||||
inputBoxWordCountSingers?.Clear();
|
||||
inputBoxWordCountSongs?.Clear();
|
||||
inputBoxSongIDSearch?.Clear();
|
||||
handwritingInputBoxForSongs?.Clear();
|
||||
handwritingInputBoxForSingers?.Clear();
|
||||
}
|
||||
|
||||
|
||||
private void MuteUnmuteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@ -2521,11 +2540,12 @@ namespace DualScreenDemo
|
||||
|
||||
if (initialState.Equals("CLOSE", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
/*
|
||||
foreach (Control ctrl in this.Controls)
|
||||
{
|
||||
ctrl.Enabled = false;
|
||||
}
|
||||
|
||||
*/
|
||||
ShowSendOffScreen();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user