diff options
author | Grant Limberg <grant.limberg@zerotier.com> | 2016-11-04 14:50:07 -0700 |
---|---|---|
committer | Grant Limberg <grant.limberg@zerotier.com> | 2016-11-04 14:50:07 -0700 |
commit | 1ab9c431350b1e8cf22f27fe5814f1d4608b24a7 (patch) | |
tree | d75f2e377cddef346f5d9292f0566d6a60105cb1 | |
parent | efcc24a76b493a3045eb24805fc2e1dd2109823c (diff) | |
download | infinitytier-1ab9c431350b1e8cf22f27fe5814f1d4608b24a7.tar.gz infinitytier-1ab9c431350b1e8cf22f27fe5814f1d4608b24a7.zip |
wire up allowDefault, allowManaged, allowGlobal, allowDefault options
-rw-r--r-- | windows/WinUI/APIHandler.cs | 2 | ||||
-rw-r--r-- | windows/WinUI/NetworkInfoView.xaml | 6 | ||||
-rw-r--r-- | windows/WinUI/NetworkInfoView.xaml.cs | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/windows/WinUI/APIHandler.cs b/windows/WinUI/APIHandler.cs index 83a22c66..2a8dea13 100644 --- a/windows/WinUI/APIHandler.cs +++ b/windows/WinUI/APIHandler.cs @@ -107,7 +107,7 @@ namespace WinUI } } - public void JoinNetwork(string nwid, bool allowManaged = false, bool allowGlobal = false, bool allowDefault = false) + public void JoinNetwork(string nwid, bool allowManaged = true, bool allowGlobal = false, bool allowDefault = false) { var request = WebRequest.Create(url + "/network/" + nwid + "?auth=" + authtoken) as HttpWebRequest; if (request == null) diff --git a/windows/WinUI/NetworkInfoView.xaml b/windows/WinUI/NetworkInfoView.xaml index 1ca488b1..aea85490 100644 --- a/windows/WinUI/NetworkInfoView.xaml +++ b/windows/WinUI/NetworkInfoView.xaml @@ -65,9 +65,9 @@ <TextBlock x:Name="bridgingEnabled" FontFamily="Lucida Console" TextWrapping="Wrap" Text="DISABLED" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="7" Background="#FFEEEEEE" Foreground="#FF000000"/> <TextBlock x:Name="deviceName" FontFamily="Lucida Console" TextWrapping="Wrap" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="8" Foreground="#FF000000"><Span><Run Text="ethernet_32771"/></Span></TextBlock> <TextBlock x:Name="managedIps" TextWrapping="Wrap" FontFamily="Lucida Console" HorizontalAlignment="Right" TextAlignment="Right" Grid.Column="2" Grid.Row="9" Foreground="#FF000000"><Span><Run Text="28.2.169.248/7 "/></Span><LineBreak/><Span><Run Text="fd80:56c2:e21c:0000:0199:9383:4a02:a9f8/88"/></Span></TextBlock> - <CheckBox x:Name="allowGlobal" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="10" Checked="AllowGlobal_CheckStateChanged" Unchecked="AllowGlobal_CheckStateChanged"/> - <CheckBox x:Name="allowManaged" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="11" Checked="AllowManaged_CheckStateChanged" Unchecked="AllowManaged_CheckStateChanged"/> - <CheckBox x:Name="allowDefault" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="12" Checked="AllowDefault_CheckStateChanged" Unchecked="AllowDefault_CheckStateChanged"/> + <CheckBox x:Name="allowGlobal" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="10" /> + <CheckBox x:Name="allowManaged" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="11" /> + <CheckBox x:Name="allowDefault" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="12" /> <Separator Grid.Column="0" Grid.Row="13" Grid.ColumnSpan="3"/> diff --git a/windows/WinUI/NetworkInfoView.xaml.cs b/windows/WinUI/NetworkInfoView.xaml.cs index 5c96b985..3ecc31b8 100644 --- a/windows/WinUI/NetworkInfoView.xaml.cs +++ b/windows/WinUI/NetworkInfoView.xaml.cs @@ -58,6 +58,14 @@ namespace WinUI this.allowDefault.IsChecked = network.AllowDefault; this.allowGlobal.IsChecked = network.AllowGlobal; this.allowManaged.IsChecked = network.AllowManaged; + + allowDefault.Checked += AllowDefault_CheckStateChanged; + allowDefault.Unchecked += AllowDefault_CheckStateChanged; + allowGlobal.Checked += AllowGlobal_CheckStateChanged; + allowGlobal.Unchecked += AllowGlobal_CheckStateChanged; + allowManaged.Checked += AllowManaged_CheckStateChanged; + allowManaged.Unchecked += AllowManaged_CheckStateChanged; + } public bool HasNetwork(ZeroTierNetwork network) |