mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-13 04:38:28 +00:00
Network list window opens with click on the menu item
This commit is contained in:
@ -24,7 +24,9 @@ namespace WinUI
|
||||
/// </summary>
|
||||
public partial class ToolbarItem : Window
|
||||
{
|
||||
APIHandler handler = APIHandler.Instance;
|
||||
private APIHandler handler = APIHandler.Instance;
|
||||
|
||||
NetworkList netList = null;
|
||||
|
||||
public ToolbarItem()
|
||||
{
|
||||
@ -40,5 +42,29 @@ namespace WinUI
|
||||
{
|
||||
Console.WriteLine("PreviewTrayContextMenuOpen");
|
||||
}
|
||||
|
||||
private void ToolbarItem_NodeIDClicked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ToolbarItem_ShowNetworksClicked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
if (netList == null)
|
||||
{
|
||||
netList = new WinUI.NetworkList();
|
||||
netList.Closed += ShowNetworksClosed;
|
||||
}
|
||||
|
||||
if (!netList.IsVisible)
|
||||
{
|
||||
netList.Show();
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowNetworksClosed(object sender, System.EventArgs e)
|
||||
{
|
||||
netList = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user