本文整理汇总了C#中OutputWindowPane.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# OutputWindowPane.Clear方法的具体用法?C# OutputWindowPane.Clear怎么用?C# OutputWindowPane.Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputWindowPane
的用法示例。
在下文中一共展示了OutputWindowPane.Clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSuiteStarted
public override void TestSuiteStarted()
{
dte.ToolWindows.OutputWindow.Parent.Activate();
dte.ToolWindows.ErrorList.Parent.Activate();
dte.ToolWindows.OutputWindow.Parent.SetFocus();
testPane = GetOutputPane("Test");
testPane.Activate();
testPane.Clear();
SetStatusBarMessage("Testing Started");
}
示例2: WebServer
/// <summary>
/// Constructs the WebServer, starts the web server process.
/// </summary>
/// <param name="outputWindowPane">Existing output pane to send web server output to.</param>
/// <param name="properties">PropertyManager that is set to a valid project/platform.</param>
public WebServer(OutputWindowPane outputWindowPane, PropertyManager properties)
{
if (outputWindowPane == null)
{
throw new ArgumentNullException("outputWindowPane");
}
if (properties == null)
{
throw new ArgumentNullException("properties");
}
webServerOutputPane_ = outputWindowPane;
// Read port from properties, if invalid port then set to default value.
int webServerPort;
if (!int.TryParse(properties.WebServerPort, out webServerPort))
{
webServerPort = DefaultWebServerPort;
}
string webServerExecutable = "python.exe";
string httpd = Path.Combine(properties.SDKRootDirectory, "examples", "httpd.py");
if (!File.Exists(httpd))
httpd = Path.Combine(properties.SDKRootDirectory, "tools", "httpd.py");
string webServerArguments = httpd + " --no_dir_check " + webServerPort;
webServerOutputPane_.Clear();
webServerOutputPane_.OutputString(Strings.WebServerStartMessage + "\n");
webServerOutputPane_.Activate();
// Start the web server process.
try
{
webServer_ = new System.Diagnostics.Process();
webServer_.StartInfo.CreateNoWindow = true;
webServer_.StartInfo.UseShellExecute = false;
webServer_.StartInfo.RedirectStandardOutput = true;
webServer_.StartInfo.RedirectStandardError = true;
webServer_.StartInfo.FileName = webServerExecutable;
webServer_.StartInfo.Arguments = webServerArguments;
webServer_.StartInfo.WorkingDirectory = properties.ProjectDirectory;
webServer_.OutputDataReceived += WebServerMessageReceive;
webServer_.ErrorDataReceived += WebServerMessageReceive;
webServer_.Start();
webServer_.BeginOutputReadLine();
webServer_.BeginErrorReadLine();
}
catch (Exception e)
{
webServerOutputPane_.OutputString(Strings.WebServerStartFail + "\n");
webServerOutputPane_.OutputString("Exception: " + e.Message + "\n");
}
}
示例3: OutputWindowWriter
/// <summary>
/// Initializes a new instance of the <see cref="OutputWindowWriter"/> class.
/// </summary>
/// <param name="applicationObject">The application object.</param>
public OutputWindowWriter(_DTE applicationObject)
{
Window window = applicationObject.Windows.Item(Constants.vsWindowKindOutput);
OutputWindow outputWindow = (OutputWindow)window.Object;
outputWindowPane = outputWindow.OutputWindowPanes
.OfType<OutputWindowPane>()
.Where(p => p.Name == "WSCF.blue")
.FirstOrDefault() ?? outputWindow.OutputWindowPanes.Add("WSCF.blue");
outputWindowPane.Clear();
outputWindowPane.Activate();
}
示例4: runAnalysis
private void runAnalysis(List<ConfiguredFiles> configuredFiles, OutputWindowPane outputPane, bool analysisOnSavedFile)
{
Debug.Assert(outputPane != null);
outputPane.Clear();
foreach (var analyzer in _analyzers)
{
analyzer.analyze(configuredFiles, outputPane, analysisOnSavedFile);
}
}
示例5: ProcessTest
void ProcessTest(OutputWindowPane pane)
{
string paneText;
var success = _threading.BeginInvokeAndWait("Reading pane",()=> ReadTest(pane), out paneText, _unloading);
if (!success) return;
if (paneText == null || paneText.Length <= PluginManager.RESHARPER_TEST.Length) return;
var methodName = paneText.Substring(PluginManager.RESHARPER_TEST.Length);
pane.Clear();
Debug.WriteLine("Running test " + methodName);
var runner = new ResharperTests(pane, _threading, _actionManager, _saManager, _solution);
var result = typeof(ResharperTests).GetMethod(methodName).Invoke(runner, new object[0]);
var msg = string.Format("!ReSharper{0}:{1}\r\n", methodName, result);
_output.Write(msg);
pane.OutputString(msg);
}
示例6: CreateOutputWindow
private void CreateOutputWindow(string winText)
{
ow = _app.ToolWindows.OutputWindow;
ow.Parent.Activate();
try {
owp = ow.OutputWindowPanes.Item(winText);
owp.Clear();
ow.Parent.Activate();
owp.Activate();
}
catch {
owp = ow.OutputWindowPanes.Add(winText);
}
}