示例#1
0
        public CyEdge(string id, string label, CyNode srcNode, CyNode tgtNode)
            : this()
        {
            this.Id = id;
            this.Label = label;

            this.srcNode = srcNode;
            this.tgtNode = tgtNode;
        }
示例#2
0
        private void btnSend_Click(object sender, EventArgs e)
        {
            try
            {
                var nw = new CyNetwork("Client Network");

                var n1 = new CyNode("n1", "Node 1");
                var n2 = new CyNode("n2", "Node 2");
                nw.Nodes.Add(n1);
                nw.Nodes.Add(n2);

                var e1_2 = new CyEdge("e1", "Edge 1-2", n1, n2);
                nw.Edges.Add(e1_2);

                this.client.Networks.Add(nw);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }