mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-13 22:12:56 +00:00
dont close the network list. just hide it so its reusable
This commit is contained in:
parent
a6ed711492
commit
8ebcd44405
@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:WinUI"
|
||||
mc:Ignorable="d" x:Class="WinUI.NetworkListView"
|
||||
Title="ZeroTier One" Height="500" Width="500" Icon="ZeroTierIcon.ico">
|
||||
Title="ZeroTier One" SizeToContent="Width" Height="500" Width="Auto" Icon="ZeroTierIcon.ico">
|
||||
|
||||
<Window.Resources>
|
||||
<SolidColorBrush x:Key="GreenBrush" Color="#ff91a2a3"/>
|
||||
|
@ -17,6 +17,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace WinUI
|
||||
{
|
||||
@ -41,6 +42,12 @@ namespace WinUI
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
e.Cancel = true;
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void onClosed(object sender, System.EventArgs e)
|
||||
{
|
||||
NetworkMonitor.Instance.UnsubscribeNetworkUpdates(updateNetworks);
|
||||
|
@ -29,7 +29,7 @@ namespace WinUI
|
||||
{
|
||||
private APIHandler handler = APIHandler.Instance;
|
||||
|
||||
private NetworkListView netListView = null;
|
||||
private NetworkListView netListView = new NetworkListView();
|
||||
private JoinNetworkView joinNetView = null;
|
||||
private AboutView aboutView = null;
|
||||
private PreferencesView prefsView = null;
|
||||
@ -122,8 +122,9 @@ namespace WinUI
|
||||
{
|
||||
netListView = new WinUI.NetworkListView();
|
||||
netListView.Closed += ShowNetworksClosed;
|
||||
netListView.Show();
|
||||
}
|
||||
|
||||
netListView.Show();
|
||||
}
|
||||
|
||||
private void ShowNetworksClosed(object sender, System.EventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user