本文整理汇总了C#中System.Diagnostics.DataReceivedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DataReceivedEventArgs类的具体用法?C# DataReceivedEventArgs怎么用?C# DataReceivedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataReceivedEventArgs类属于System.Diagnostics命名空间,在下文中一共展示了DataReceivedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: adb_OutputDataReceived
void adb_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (this.InvokeRequired)
this.Invoke(new Action<object, DataReceivedEventArgs>(adb_OutputDataReceived), sender, e);
else
textAdb.AppendText(filterData(e.Data));
}
示例2: Convert__OutputDataReceived
void Convert__OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (!String.IsNullOrEmpty(e.Data))
{
_sbOutput.AppendLine(e.Data);
}
}
示例3: OutputReceivedDataEventHandler
public static void OutputReceivedDataEventHandler(Object Sender, DataReceivedEventArgs Line)
{
if ((Line != null) && (Line.Data != null))
{
Log.TraceInformation(Line.Data);
}
}
示例4: OnVlcErrorDataReceived
/// <summary>
/// Handles the ErrorDataReceived event of the vlc process.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Diagnostics.DataReceivedEventArgs" /> instance containing the event data.</param>
private void OnVlcErrorDataReceived(object sender, DataReceivedEventArgs e)
{
if (e == null)
return;
Trace.TraceError(e.Data);
}
示例5: OnErrorDataReceived
private static void OnErrorDataReceived(object sender, DataReceivedEventArgs e)
{
if (e == null || String.IsNullOrWhiteSpace(e.Data))
return;
IISLogger.Error(e.Data);
}
示例6: AppendErrorData
private void AppendErrorData(object sender, DataReceivedEventArgs e)
{
if (e.Data == null)
errorWaitHandle.Set();
else
errorOuput.AppendLine(e.Data);
}
示例7: process_OutputDataReceived
private void process_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (e.Data != null)
{
this.logOutputBuffer.AppendLine(e.Data);
}
}
示例8: FaacProcess_OutputDataReceived
private void FaacProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (e.Data != null && e.Data.Length > 0)
{
Regex R = new Regex(@"\(\s*(\d+)%\)");
Match M = R.Match(e.Data);
if (M.Success)
{
int NewProgress = Convert.ToInt32(M.Groups[1].Value);
if (NewProgress != Progress && !_cancelling)
{
Progress = NewProgress;
// raise the progress changed event
ExternalProcessProgressChangedEventArgs eArgs = new ExternalProcessProgressChangedEventArgs(
Progress, 1, 1, "Encoding", null, null);
async.Post(delegate(object ea)
{ OnTaskProgressChanged((ExternalProcessProgressChangedEventArgs)ea); },
eArgs);
}
//Console.CursorLeft = 0;
//Console.Write(e.Data);
}
else
{
//Console.WriteLine(e.Data);
}
}
}
示例9: cmd_ErrorDataReceived
private void cmd_ErrorDataReceived(object sender, DataReceivedEventArgs e)
{
if (e.Data != null)
{
//MessageBox.Show(e.Data, "错误");
}
}
示例10: ProcessOnErrorDataReceived
private void ProcessOnErrorDataReceived(object sender, DataReceivedEventArgs e)
{
if (!string.IsNullOrEmpty(e.Data))
{
output.Add(e.Data);
}
}
示例11: Error
private void Error(object sender,DataReceivedEventArgs e)
{
if (e.Data == null)
Process.ErrorDataReceived -= Error;
else
Core.Log(this, e.Data);
}
示例12: OutputDataReceived
/// <summary>
/// The output data received.
/// </summary>
/// <param name="sender">
/// The sender.
/// </param>
/// <param name="e">
/// The e.
/// </param>
private void OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (e != null && e.Data != null)
{
this.Result = e.Data;
}
}
示例13: printData
public static void printData(object sender, DataReceivedEventArgs e)
{
// Critical section
int pId = ((Process)sender).Id;
if (!colors.ContainsKey(pId))
{
lock (lockObject)
{
if (!colors.ContainsKey(pId))
{
colors.Add(pId, getColor());
}
}
}
Console.ForegroundColor = colors[pId];
if (String.IsNullOrEmpty(e.Data))
{
Console.WriteLine("Process " + (int)colors[pId] + " exited.");
}
else
{
Console.WriteLine((int)colors[pId] + " " + e.Data);
}
Console.ResetColor();
}
示例14: proc_DataReceived
public void proc_DataReceived(object sender, DataReceivedEventArgs e)
{
if (!String.IsNullOrEmpty(e.Data))
{
this.Srv_Output.Invoke(new UpdateOutputCallback(this.updateoutput), new object[] { e.Data });
}
}
示例15: OutputDataReceived
void OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (!string.IsNullOrEmpty(e.Data))
{
Host.UI.WriteLine(e.Data);
}
}