我有一个被调用的方法,虽然我希望在方法完成后显示消息框(现在在调用方法后直接显示消息框):
if (Check == true)
{
StartConvIpod();
}
else
{
}
MessageBox.Show("Operation Successful!");
Run Code Online (Sandbox Code Playgroud)
StartConvIpod:
private void StartConvIpod()
{
string res = Directory.EnumerateFiles("dump").
OrderBy(x => File.GetCreationTime(x)).Last();
string sub = res.Substring(5);
string sub2 = sub.Substring(0, sub.Length - 4);
Process p = new Process();
p.StartInfo.WorkingDirectory = "dump";
p.StartInfo.FileName = "ffmpeg.exe";
p.StartInfo.Arguments = "-i " + sub + " -f mp4 -vcodec mpeg4 -b 700k -aspect 4:3 -r 23.98 -s 320x240 -acodec ac3 -ar 48000 iPodConversions\\" + sub2 + ".mp4";
p.Start();
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个新字符串,从现有字符串中删除某些字符,例如
string path = "C:\test.txt"
Run Code Online (Sandbox Code Playgroud)
所以字符串"pathminus"将取出"C:\",例如
string pathminus = "test.txt"
Run Code Online (Sandbox Code Playgroud)