protected virtual void OnNodeUpdated(NodeStatus nodeStatus) { NodeStatusEventArgs e = new NodeStatusEventArgs(nodeStatus); var handler = NodeStatusChanged; if (handler != null) { NodeStatusChanged(this, e); } }
private void server_NodeStatusChanged(object sender, NodeStatusEventArgs e) { Console.WriteLine("server_NodeStatusChanged"); // TODO(rushfan): Build list of strings for model on this side. Action update = delegate () { // Hack. can't figure out C# databinding. According to stackoverflow, many others can't either. listBoxNodes.Items.Clear(); listBoxNodes.Items.AddRange(server.Nodes.ToArray()); }; if (InvokeRequired) { this.Invoke(update); } else { update(); } }
private void server_NodeStatusChanged(object sender, NodeStatusEventArgs e) { Console.WriteLine("server_NodeStatusChanged"); // TODO(rushfan): Build list of strings for model on this side. Action update = delegate() { // Hack. can't figure out C# databinding. According to stackoverflow, many others can't either. listBoxNodes.Items.Clear(); listBoxNodes.Items.AddRange(server.Nodes.ToArray()); }; if (InvokeRequired) { this.Invoke(update); } else { update(); } }
protected virtual void OnNodeUpdated(NodeStatus nodeStatus) { NodeStatusEventArgs e = new NodeStatusEventArgs(nodeStatus); var handler = NodeStatusChanged; if (handler != null) { NodeStatusChanged(this, e); } }