Network list window opens with click on the menu item
This commit is contained in:
parent
e1f9f7b6dc
commit
7cf3d2caa1
8 changed files with 57 additions and 42 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue