確認關台按鈕+關閉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)
|
private void buttonMiddle_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("巨");
|
||||||
sequenceManager.ProcessClick("巨");
|
sequenceManager.ProcessClick("巨");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonTopRight_Click(object sender, EventArgs e)
|
private void buttonTopRight_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("級");
|
||||||
sequenceManager.ProcessClick("級");
|
sequenceManager.ProcessClick("級");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonTopLeft_Click(object sender, EventArgs e)
|
private void buttonTopLeft_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("超");
|
||||||
sequenceManager.ProcessClick("超");
|
sequenceManager.ProcessClick("超");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonThanks_Click(object sender, EventArgs e)
|
private void buttonThanks_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("星");
|
||||||
sequenceManager.ProcessClick("星");
|
sequenceManager.ProcessClick("星");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1372,12 +1376,12 @@ namespace DualScreenDemo
|
|||||||
TraditionalChineseButton_Click
|
TraditionalChineseButton_Click
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* 關閉應用程式按鈕*/
|
||||||
exitButton = new Button{};
|
exitButton = new Button{};
|
||||||
exitButton.Name = "exitButton";
|
/*exitButton.Name = "exitButton";
|
||||||
ConfigureButton(exitButton, 1394, 2, 1428 - 1394, 37 - 2,
|
ConfigureButton(exitButton, 1394, 2, 1428 - 1394, 37 - 2,
|
||||||
resizedNormalStateImage, resizedMouseOverImage, resizedMouseDownImage,
|
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)
|
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
|
try
|
||||||
{
|
{
|
||||||
// 1. 檢查是否能連接到 SVR01
|
// 1. 檢查是否能連接到 SVR01
|
||||||
string serverVideoPath = @"\\SVR01\SuperstarB\video";
|
string serverVideoPath = @"\\SVR01\video";
|
||||||
string localVideoPath = @"C:\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();
|
LoadLocalVideoFiles();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1550,7 +1567,7 @@ namespace DualScreenDemo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 獲取服務器和本地的所有文件
|
// 獲取服務器和本地的所有文件
|
||||||
var serverFiles = Directory.GetFiles(serverVideoPath, "*.mpg")
|
var serverFiles = Directory.GetFiles(selectedServerPath, "*.mpg")
|
||||||
.Select(f => new FileInfo(f))
|
.Select(f => new FileInfo(f))
|
||||||
.ToDictionary(f => f.Name, f => f);
|
.ToDictionary(f => f.Name, f => f);
|
||||||
|
|
||||||
@ -1606,7 +1623,7 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string videoDirectory = @"C:\video\";
|
string videoDirectory = @"D:\video\";
|
||||||
string[] videoFiles = Directory.GetFiles(videoDirectory, "*.mpg");
|
string[] videoFiles = Directory.GetFiles(videoDirectory, "*.mpg");
|
||||||
string pattern = @"^(?<songNumber>\d+)-.*?-(?<songName>[^-]+)-";
|
string pattern = @"^(?<songNumber>\d+)-.*?-(?<songName>[^-]+)-";
|
||||||
|
|
||||||
@ -1880,7 +1897,7 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
string songInfo = songData.Song ?? "未提供歌曲信息";
|
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);
|
ResizeAndPositionPictureBox(VodScreenPictureBox, xPosition, yPosition, pictureBoxWidth, pictureBoxHeight);
|
||||||
@ -2137,19 +2154,21 @@ namespace DualScreenDemo
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重置所有輸入框
|
/// 重置所有輸入框
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void ResetinputBox(){
|
private void ResetinputBox()
|
||||||
inputBoxZhuYinSingers.Text = "";
|
{
|
||||||
inputBoxZhuYinSongs.Text = "";
|
inputBoxZhuYinSingers?.Clear();
|
||||||
inputBoxEnglishSingers.Text = "";
|
inputBoxZhuYinSongs?.Clear();
|
||||||
inputBoxEnglishSongs.Text = "";
|
inputBoxEnglishSingers?.Clear();
|
||||||
inputBoxPinYinSingers.Text = "";
|
inputBoxEnglishSongs?.Clear();
|
||||||
inputBoxPinYinSongs.Text = "";
|
inputBoxPinYinSingers?.Clear();
|
||||||
inputBoxWordCountSingers.Text = "";
|
inputBoxPinYinSongs?.Clear();
|
||||||
inputBoxWordCountSongs.Text = "";
|
inputBoxWordCountSingers?.Clear();
|
||||||
inputBoxSongIDSearch.Text = "";
|
inputBoxWordCountSongs?.Clear();
|
||||||
handwritingInputBoxForSongs.Text = "";
|
inputBoxSongIDSearch?.Clear();
|
||||||
handwritingInputBoxForSingers.Text = "";
|
handwritingInputBoxForSongs?.Clear();
|
||||||
|
handwritingInputBoxForSingers?.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void MuteUnmuteButton_Click(object sender, EventArgs e)
|
private void MuteUnmuteButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -2521,11 +2540,12 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
if (initialState.Equals("CLOSE", StringComparison.OrdinalIgnoreCase))
|
if (initialState.Equals("CLOSE", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
foreach (Control ctrl in this.Controls)
|
foreach (Control ctrl in this.Controls)
|
||||||
{
|
{
|
||||||
ctrl.Enabled = false;
|
ctrl.Enabled = false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
ShowSendOffScreen();
|
ShowSendOffScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user