整理(mysql,sql日期格式化,C#外部調(diào)用可執(zhí)行文件,Thread的簡(jiǎn)單使用(帶參數(shù)))
1.mysql Convert(value ,type), CONVERT(data_type(length),data_to_be_converted,style)
2. Process p = new Process();
p.StartInfo.FileName = "PlayMonitor.exe";
p.StartInfo.Arguments = str_dir + "\\" + View1.CurrentRow.Cells[2].Value.ToString();//參數(shù)
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = false;
p.Start();
Program.cs
[STAThread]
static void Main(string[]args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain(args));
}
args 就是被調(diào)用的程序接受的參數(shù)在主窗體的構(gòu)造方法進(jìn)行操作
3 Thread parameterThread = new Thread(new ParameterizedThreadStart(this.SetVideo));//執(zhí)行方法
parameterThread.Name = "SaveVideo" //如果是多個(gè)線程 名字必須不一樣否則失效
parameterThread.Start(new object[] { lRealHandle, pLoginID, strName });//參數(shù)
private void SetVideo(object ms)
{
object []parameter=ms as object[];
}

浙公網(wǎng)安備 33010602011771號(hào)