Skip to content

Commit 509e4ae

Browse files
Small fixes
1 parent d0547e5 commit 509e4ae

File tree

8 files changed

+14
-26
lines changed

8 files changed

+14
-26
lines changed

Visual Studio Projects/ZWaveJS.NET/Debug/Debug.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFramework>net6.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<Configurations>Debug;Release;DEBUG - Local ZWUS Server;Debug - Local Update Server</Configurations>
89
</PropertyGroup>
910

1011
<ItemGroup>

Visual Studio Projects/ZWaveJS.NET/Demo Application/Demo Application.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<Nullable>enable</Nullable>
88
<UseWindowsForms>true</UseWindowsForms>
99
<ImplicitUsings>enable</ImplicitUsings>
10+
<Configurations>Debug;Release</Configurations>
1011
</PropertyGroup>
1112

1213
<ItemGroup>

Visual Studio Projects/ZWaveJS.NET/Demo Application/Main.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Security.Cryptography;
2+
using System.Xml.Linq;
23
using ZWaveJS.NET;
34
namespace Demo_Application
45
{
@@ -159,6 +160,7 @@ private void _Driver_DriverReady()
159160
ZWaveNode[] Nodes = _Driver.Controller.Nodes.AsArray();
160161
foreach (ZWaveNode N in Nodes)
161162
{
163+
N.NodeReady += Node_NodeReady;
162164
ListViewItem LVI = new ListViewItem(string.Format("#{0}", N.id));
163165

164166
LVI.SubItems.Add(N.interviewStage != "Complete" ? "Interview" : N.status.ToString());
@@ -559,10 +561,11 @@ private void button18_Click(object sender, EventArgs e)
559561
{
560562
if (LST_Nodes.SelectedItems.Count > 0)
561563
{
562-
if (MessageBox.Show("This will check if the Node has Failed, and if, so will be removed. Are you sure?","Are You Sure",MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.Yes)
564+
if (MessageBox.Show("This will check if the Node has Failed, and if, so will be removed. Are you sure?", "Are You Sure", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
563565
{
564566

565-
_Driver.Controller.RemoveFailedNode((int)LST_Nodes.SelectedItems[0].Tag).ContinueWith((C) => {
567+
_Driver.Controller.RemoveFailedNode((int)LST_Nodes.SelectedItems[0].Tag).ContinueWith((C) =>
568+
{
566569

567570
if (!C.Result.Success)
568571
{
@@ -571,7 +574,7 @@ private void button18_Click(object sender, EventArgs e)
571574
MessageBox.Show(C.Result.Message, "Could Not Remove Node", MessageBoxButtons.OK, MessageBoxIcon.Error);
572575
}));
573576
}
574-
577+
575578
});
576579
}
577580
}

Visual Studio Projects/ZWaveJS.NET/Demo Application/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ internal static class Program
2525
[STAThread]
2626
static void Main()
2727
{
28-
2928
// To customize application configuration such as set high DPI settings or default font,
3029
// see https://aka.ms/applicationconfiguration.
3130
ApplicationConfiguration.Initialize();

Visual Studio Projects/ZWaveJS.NET/ZWaveJS.NET.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZWaveJS.NET", "ZWaveJS.NET\
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo Application", "Demo Application\Demo Application.csproj", "{737223B0-DD67-4A96-8429-AC16B2C4CF94}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debug", "Debug\Debug.csproj", "{11947CCB-C963-49C2-B0DF-7F12624416FA}"
11-
EndProject
1210
Global
1311
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1412
Debug|Any CPU = Debug|Any CPU
@@ -23,10 +21,6 @@ Global
2321
{737223B0-DD67-4A96-8429-AC16B2C4CF94}.Debug|Any CPU.Build.0 = Debug|Any CPU
2422
{737223B0-DD67-4A96-8429-AC16B2C4CF94}.Release|Any CPU.ActiveCfg = Release|Any CPU
2523
{737223B0-DD67-4A96-8429-AC16B2C4CF94}.Release|Any CPU.Build.0 = Release|Any CPU
26-
{11947CCB-C963-49C2-B0DF-7F12624416FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27-
{11947CCB-C963-49C2-B0DF-7F12624416FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
28-
{11947CCB-C963-49C2-B0DF-7F12624416FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
29-
{11947CCB-C963-49C2-B0DF-7F12624416FA}.Release|Any CPU.Build.0 = Release|Any CPU
3024
EndGlobalSection
3125
GlobalSection(SolutionProperties) = preSolution
3226
HideSolutionNode = FALSE

Visual Studio Projects/ZWaveJS.NET/ZWaveJS.NET/Server.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,10 @@ internal static void Start(string SerialPort, ZWaveOptions Config, int WSPort)
4848
ProcessStartInfo PSI = new ProcessStartInfo();
4949
PSI.RedirectStandardError = true;
5050
PSI.RedirectStandardInput = true;
51-
52-
// If Debugging and FWUS is setup locally, setup an EV to use it (will help with UI development)
53-
if(System.Diagnostics.Debugger.IsAttached)
54-
{
55-
using (TcpClient tcpClient = new TcpClient())
56-
{
57-
try
58-
{
59-
tcpClient.Connect("localhost", 8787);
60-
PSI.EnvironmentVariables.Add("ZWAVEJS_FW_SERVICE_URL", "http://localhost:8787");
61-
}
62-
catch (Exception){}
63-
}
64-
}
51+
52+
#if FWULOCAL
53+
PSI.EnvironmentVariables.Add("ZWAVEJS_FW_SERVICE_URL", "http://localhost:8787");
54+
#endif
6555

6656
PSI.EnvironmentVariables.Add("CONFIG", _Config);
6757
PSI.EnvironmentVariables.Add("SERIAL_PORT", SerialPort);

Visual Studio Projects/ZWaveJS.NET/ZWaveJS.NET/VirtualNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public Task<CMDResult> GetDefinedValueIDs()
8080
CMDResult Res = new CMDResult(JO);
8181
if (Res.Success)
8282
{
83-
Res.SetPayload(JO.SelectToken("result.valueIds").ToObject<ValueID[]>());
83+
Res.SetPayload(JO.SelectToken("result.valueIDs").ToObject<ValueID[]>());
8484
}
8585

8686
Result.SetResult(Res);

Visual Studio Projects/ZWaveJS.NET/ZWaveJS.NET/ZWaveJS.NET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<PackageIcon>Logo.png</PackageIcon>
1515
<PackageIconUrl />
1616
<UserSecretsId>d23bfce5-76f4-45a1-820d-7afd4ac2a291</UserSecretsId>
17+
<Configurations>Debug;Release</Configurations>
1718
</PropertyGroup>
18-
1919
<ItemGroup>
2020
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2121
<PackageReference Include="Semver" Version="2.3.0" />

0 commit comments

Comments
 (0)