From faed46c81679e43aa450da900e5331d6db83801a Mon Sep 17 00:00:00 2001
From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498>
Date: Sun, 19 Jun 2011 13:40:23 +0000
Subject: [PATCH]
---
.../Cosmos.Debug.VSDebugEngine.csproj | 1 +
.../DebugWindows.cs | 13 ++++++++++
source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml | 4 +--
.../VSIP/Cosmos.VS.Debug/MainWindow.xaml.cs | 25 ++++++++++++++++---
source2/VSIP/Cosmos.VS.Debug/ReadMe.html | 5 ++++
5 files changed, 43 insertions(+), 5 deletions(-)
create mode 100644 source2/Debug/Cosmos.Debug.VSDebugEngine/DebugWindows.cs
diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/Cosmos.Debug.VSDebugEngine.csproj b/source2/Debug/Cosmos.Debug.VSDebugEngine/Cosmos.Debug.VSDebugEngine.csproj
index 88db5ab65..87a93a664 100644
--- a/source2/Debug/Cosmos.Debug.VSDebugEngine/Cosmos.Debug.VSDebugEngine.csproj
+++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/Cosmos.Debug.VSDebugEngine.csproj
@@ -119,6 +119,7 @@
+
diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/DebugWindows.cs b/source2/Debug/Cosmos.Debug.VSDebugEngine/DebugWindows.cs
new file mode 100644
index 000000000..4ce91dd23
--- /dev/null
+++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/DebugWindows.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.IO.Pipes;
+using System.Linq;
+using System.Text;
+
+namespace Cosmos.Debug.VSDebugEngine {
+ public class DebugWindows {
+ public static void Test(string aData) {
+
+ }
+ }
+}
diff --git a/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml b/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml
index 163939232..f5b8cf85d 100644
--- a/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml
+++ b/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml
@@ -3,6 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
-
-
+
+
diff --git a/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml.cs b/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml.cs
index 1e8a34a12..c7c1edbc9 100644
--- a/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml.cs
+++ b/source2/VSIP/Cosmos.VS.Debug/MainWindow.xaml.cs
@@ -1,7 +1,10 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Pipes;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
@@ -11,14 +14,30 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using System.Windows.Threading;
namespace Cosmos.VS.Debug {
- ///
- /// Interaction logic for MainWindow.xaml
- ///
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
}
+
+ public void ThreadStartClient(object obj) {
+ using (var xPipe = new NamedPipeClientStream(".", "CosmosDebug", PipeDirection.In)) {
+ // The connect function will indefinately wait for the pipe to become available
+ // If that is not acceptable specify a maximum waiting time (in ms)
+ xPipe.Connect();
+ using (var xReader = new StreamReader(xPipe)) {
+ string xLine = xReader.ReadLine();
+
+ Dispatcher.Invoke(DispatcherPriority.Normal,
+ (Action)delegate() {
+ listBox1.Items.Add(xLine);
+ }
+ );
+ }
+ }
+ }
+
}
}
diff --git a/source2/VSIP/Cosmos.VS.Debug/ReadMe.html b/source2/VSIP/Cosmos.VS.Debug/ReadMe.html
index 5124f5414..69907ff9b 100644
--- a/source2/VSIP/Cosmos.VS.Debug/ReadMe.html
+++ b/source2/VSIP/Cosmos.VS.Debug/ReadMe.html
@@ -10,6 +10,11 @@
because we deploy even at dev time with a setup.exe, we need to deploy it. VS
Tool Window packages use WPF UserControls though, so for now we use this
separate standalone EXE which uses WPF UserControls.
+
+ This is also easier to debug because it can just be rebuilt without affecting
+ Visual Studio. Maybe in the future the VSIP package can just reference this
+ package to and use the user controls, so for debugging and development of this
+ project, it could be used instead.