New static method to clear the Output window in the Development environment.
This commit is contained in:
parent
5d03ff7368
commit
d3e88c5120
@ -172,5 +172,24 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
/// <summary>
|
||||
/// This will clear the Output window when run in the Development Environment
|
||||
/// Add EnvDTE and EnvDTE80 to references from .NET
|
||||
/// </summary>
|
||||
public static void ClearOutputWindow()
|
||||
{
|
||||
#if (DEBUG)
|
||||
try
|
||||
{
|
||||
EnvDTE80.DTE2 dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.8.0");
|
||||
dte2.ToolWindows.OutputWindow.ActivePane.Clear();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("{0} - {1}\r\n{2}", ex.GetType().Name, ex.Message, ex.StackTrace);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user