Skip to content

Commit 03cd658

Browse files
committed
Add code to delay public connection till window pops up. Not exactly what I wanted, but a good compromise. Close #34
1 parent a8bdba4 commit 03cd658

24 files changed

Lines changed: 47 additions & 34 deletions

Kinect2JSON/Kinect2JSON.v12.suo

0 Bytes
Binary file not shown.

Kinect2JSON/Kinect2JSON/Kinect2JSON.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<WarningLevel>4</WarningLevel>
1616
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1717
<IsWebBootstrapper>false</IsWebBootstrapper>
18-
<PublishUrl>C:\Users\Isaac\Documents\Server Releases\v1.0\</PublishUrl>
18+
<PublishUrl>C:\Users\Isaac\Documents\Server Releases\v1.1.1\</PublishUrl>
1919
<Install>true</Install>
2020
<InstallFrom>Disk</InstallFrom>
2121
<UpdateEnabled>false</UpdateEnabled>

Kinect2JSON/Kinect2JSON/MainWindow.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
* Authors: Isaac Zylstra and Victor Norman @ Calvin College, Grand Rapids, MI.
33
* Contact: [email protected]
44
-->
5-
<Window x:Class="Kinect2JSON.MainWindow"
5+
<Window x:Class="Kinect2JSON.MainWindow"
66
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
77
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
88
Title="MainWindow"
99
Height="518" Width="1230"
10-
Closing="MainWindow_Closing">
10+
Closing="MainWindow_Closing"
11+
Activated="MainWindow_Activated">
1112
<Window.Resources>
1213
<SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e" />
1314
<SolidColorBrush x:Key="KinectPurpleBrush" Color="#ff52318f" />

Kinect2JSON/Kinect2JSON/MainWindow.xaml.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ public string KinectStatusText
148148
}
149149
}
150150

151+
//Boolean stating whether the server has started
152+
public bool publicStarted = false;
151153
//The code that updates the status text based on whether the public connection has started.
152154
//Changed in InitializePublicConnection
153155
private string publicConnectionStatusText = "hello!";
@@ -175,7 +177,7 @@ public MainWindow()
175177
SetupColorDisplay();
176178
SetupBodyJointsDisplay();
177179
InitializeLocalConnection();
178-
InitializePublicConnection();
180+
//InitializePublicConnection();
179181

180182
InitializeComponent();
181183
}
@@ -216,7 +218,6 @@ public static void InitializeLocalConnection()
216218
* */
217219
public void InitializePublicConnection()
218220
{
219-
220221
//server on the public ip
221222
var server1 = new WebSocketServer("ws://" + GetPublicIP() + ":8181");
222223

@@ -239,7 +240,6 @@ public void InitializePublicConnection()
239240

240241
};
241242
});
242-
243243
PublicConnectionStatusText = "Public Connection Started";
244244
}
245245

@@ -697,13 +697,13 @@ public static string GetPublicIP()
697697
/// </summary>
698698
/// <param name="sender">object sending the event</param>
699699
/// <param name="e">event arguments</param>
700-
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
700+
private void MainWindow_Activated(object sender, EventArgs e)
701701
{
702-
if (this.multiSourceFrameReader != null)
702+
if (!publicStarted)
703703
{
704-
this.multiSourceFrameReader.MultiSourceFrameArrived += this.Reader_MultiSourceFrameArrived;
704+
InitializePublicConnection();
705+
publicStarted = true;
705706
}
706-
//InitializePublicConnection();
707707
}
708708

709709
/// <summary>

Kinect2JSON/Kinect2JSON/bin/Debug/Kinect2JSON.application

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
1515
</dsig:Transforms>
1616
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
17-
<dsig:DigestValue>iiz6imWifvVwQqijso7jGaCJy1WWcTGeJap8Dpucc44=</dsig:DigestValue>
17+
<dsig:DigestValue>9q/zF6BZFc0m9G+afFE6KcDCNEi+1QNDmai5tW433yU=</dsig:DigestValue>
1818
</hash>
1919
</dependentAssembly>
2020
</dependency>
512 Bytes
Binary file not shown.

Kinect2JSON/Kinect2JSON/bin/Debug/Kinect2JSON.exe.manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
</dependentAssembly>
5555
</dependency>
5656
<dependency>
57-
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Kinect2JSON.exe" size="52736">
57+
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Kinect2JSON.exe" size="53248">
5858
<assemblyIdentity name="Kinect2JSON" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
5959
<hash>
6060
<dsig:Transforms>
6161
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
6262
</dsig:Transforms>
6363
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
64-
<dsig:DigestValue>rT9s6ZJNpiBiLsSSLe0aLF+msRS3JnGwefoUJmYn/XM=</dsig:DigestValue>
64+
<dsig:DigestValue>5+oNFPX5CItz4Wy2Hoiq7KZw1msOySAQo2n4iArS+6Q=</dsig:DigestValue>
6565
</hash>
6666
</dependentAssembly>
6767
</dependency>
0 Bytes
Binary file not shown.

Kinect2JSON/Kinect2JSON/bin/Debug/Kinect2JSON.vshost.application

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
1515
</dsig:Transforms>
1616
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
17-
<dsig:DigestValue>iiz6imWifvVwQqijso7jGaCJy1WWcTGeJap8Dpucc44=</dsig:DigestValue>
17+
<dsig:DigestValue>T7vkiuZjBnkVZSEgsLSnJIXHR8Ak3Jv8IX0ek9Aw8SY=</dsig:DigestValue>
1818
</hash>
1919
</dependentAssembly>
2020
</dependency>

Kinect2JSON/Kinect2JSON/bin/Debug/Kinect2JSON.vshost.exe.manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
</dependentAssembly>
5555
</dependency>
5656
<dependency>
57-
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Kinect2JSON.exe" size="52736">
57+
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Kinect2JSON.exe" size="53248">
5858
<assemblyIdentity name="Kinect2JSON" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
5959
<hash>
6060
<dsig:Transforms>
6161
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
6262
</dsig:Transforms>
6363
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
64-
<dsig:DigestValue>rT9s6ZJNpiBiLsSSLe0aLF+msRS3JnGwefoUJmYn/XM=</dsig:DigestValue>
64+
<dsig:DigestValue>tyRw5jaOB/6htJHEjt9TmC09oDXuzrrsz/QCi91zzRQ=</dsig:DigestValue>
6565
</hash>
6666
</dependentAssembly>
6767
</dependency>

0 commit comments

Comments
 (0)