copy node ID by clicking on node ID menu item

This commit is contained in:
Grant Limberg 2016-11-18 14:52:04 -08:00
parent a8847de910
commit 535b33b46e
2 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,7 @@
<ContextMenu>
<ContextMenu.ItemsSource>
<CompositeCollection>
<MenuItem Header="Node ID: abeb9f9bc5"
<MenuItem Header="Node ID: unknown"
Click="ToolbarItem_NodeIDClicked"
x:Name="nodeIdMenuItem"/>
<Separator/>

View File

@ -44,6 +44,8 @@ namespace WinUI
set { _networkCollection = value; }
}
private string nodeId;
public ToolbarItem()
{
InitializeComponent();
@ -94,6 +96,7 @@ namespace WinUI
{
nodeIdMenuItem.Header = "Node ID: " + status.Address;
nodeIdMenuItem.IsEnabled = true;
nodeId = status.Address;
}));
}
}
@ -111,6 +114,7 @@ namespace WinUI
private void ToolbarItem_NodeIDClicked(object sender, System.Windows.RoutedEventArgs e)
{
// TODO: Copy Node ID to clipboard
Clipboard.SetText(nodeId);
}
private void ToolbarItem_ShowNetworksClicked(object sender, System.Windows.RoutedEventArgs e)