Exemplo n.º 1
0
 public Form1()
 {
     InitializeComponent();
     //3.将相应函数注册到委托事件中
     ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction);
     ReadErrOutput += new DelReadErrOutput(ReadErrOutputAction);
 }
Exemplo n.º 2
0
        public UCExecuteSQL()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction);
            ReadErrOutput += new DelReadErrOutput(ReadErrOutputAction);
            this.textEditorControl1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("TSQL");
            try {
                this.textEditorControl1.LoadFile(GobalParameters.UpdateSqlFilePath);
            } catch (Exception) {
            }

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Exemplo n.º 3
0
        private void Init()
        {
            //3.将相应函数注册到委托事件中
            ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction);
            ReadErrOutput += new DelReadErrOutput(ReadErrOutputAction);
            CmdProcess = new Process();
            CmdProcess.StartInfo.CreateNoWindow = true;         // 不创建新窗口
            CmdProcess.StartInfo.UseShellExecute = false;
            CmdProcess.StartInfo.RedirectStandardInput = true;  // 重定向输入
            CmdProcess.StartInfo.RedirectStandardOutput = true; // 重定向标准输出
            CmdProcess.StartInfo.RedirectStandardError = true;  // 重定向错误输出
            //CmdProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

            CmdProcess.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived);
            CmdProcess.ErrorDataReceived += new DataReceivedEventHandler(p_ErrorDataReceived);

            CmdProcess.EnableRaisingEvents = true;                      // 启用Exited事件
            CmdProcess.Exited += new EventHandler(CmdProcess_Exited);   // 注册进程结束事件
            this.suggestion = new Suggestion(Application.StartupPath + "\\qcmd.ini", "qcmd");
        }
Exemplo n.º 4
0
 private void Init()
 {
     ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction);
     ReadErrOutput += new DelReadErrOutput(ReadErrOutputAction);
     ProcessExit += new DelProcessExit(CmdProcess_Exited);
 }
Exemplo n.º 5
0
        public Object[] DebugArgs;//初始化

        public DebugHost()
        {
            InitializeComponent();
            ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction);//异步执行
        }
Exemplo n.º 6
0
 /// <summary>
 /// 构造器
 /// </summary>
 /// <param name="path">启动的路径根目录</param>
 public DebugForm(string path)
 {
     InitializeComponent();
     this.rootPath = path;
     ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction);
 }
 private void Form1_Load(object sender, EventArgs e)
 {
     //3.将相应函数注册到委托事件中
     ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction);
     ReadErrOutput += new DelReadErrOutput(ReadErrOutputAction);
 }