public bool HasNetwork(ZeroTierNetwork network) { if (this.network.NetworkId.Equals(network.NetworkId)) return true; return false; }
public bool HasNetwork(ZeroTierNetwork network) { if (this.network.NetworkId.Equals(network.NetworkId)) { return(true); } return(false); }
public NetworkInfoView(APIHandler handler, ZeroTierNetwork network) { InitializeComponent(); this.handler = handler; this.network = network; UpdateNetworkData(); }
private NetworkInfoView ChildWithNetwork(ZeroTierNetwork network) { List <NetworkInfoView> list = wrapPanel.Children.OfType <NetworkInfoView>().ToList(); foreach (NetworkInfoView view in list) { if (view.HasNetwork(network)) { return(view); } } return(null); }
public NetworkInfoView(ZeroTierNetwork network) { InitializeComponent(); this.network = network; UpdateNetworkData(); allowDefault.Checked += AllowDefault_CheckStateChanged; allowDefault.Unchecked += AllowDefault_CheckStateChanged; allowGlobal.Checked += AllowGlobal_CheckStateChanged; allowGlobal.Unchecked += AllowGlobal_CheckStateChanged; allowManaged.Checked += AllowManaged_CheckStateChanged; allowManaged.Unchecked += AllowManaged_CheckStateChanged; }
private void ToolbarItem_NetworkClicked(object sender, System.Windows.RoutedEventArgs e) { if (sender.GetType() == typeof(MenuItem)) { MenuItem item = e.Source as MenuItem; if (item.DataContext != null) { ZeroTierNetwork network = item.DataContext as ZeroTierNetwork; if (item.IsChecked) { APIHandler.Instance.LeaveNetwork(Dispatcher, network.NetworkId); } else { APIHandler.Instance.JoinNetwork(Dispatcher, network.NetworkId, network.AllowManaged, network.AllowGlobal, network.AllowDefault); } } } }
public void SetNetworkInfo(ZeroTierNetwork network) { this.network = network; UpdateNetworkData(); }