整理(mysql,sql日期格式化,C#外部调用可执行文件,Thread的简单使用(带参数))

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();//参数
      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 就是被调用的程序接受的参数在主窗体的构造方法进行操作

3     Thread parameterThread = new Thread(new ParameterizedThreadStart(this.SetVideo));//执行方法
                    parameterThread.Name = "SaveVideo" //如果是多个线程 名字必须不一样否则失效
                    parameterThread.Start(new object[] { lRealHandle, pLoginID, strName });//参数

        private void SetVideo(object ms)
        {
           object []parameter=ms as object[];

         }

posted @ 2012-11-12 15:07  旋转之刃  阅读(207)  评论(0编辑  收藏  举报