Creates a simple graph control with some random nodes and connected edges. An event handler allows users to drag nodes around, keeping the edges connected.
Inheritance: UMD.HCIL.Piccolo.PCanvas
 public DlgObj(int idx, float x, float y, BioConversation bc, DialogVis dialogvis)
     : base()
 {
     conv          = bc;
     dv            = dialogvis;
     index         = idx;
     this.Pickable = true;
 }
#pragma warning disable RECS0154 // Parameter is never used
        protected DlgObj(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
#pragma warning restore RECS0154 // Parameter is never used
            : base()
        {
            conv = bc;
            dv = dialogvis;
            index = idx;
            this.Pickable = true;
        }
Example #3
0
#pragma warning disable RECS0154 // Parameter is never used
        protected DlgObj(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
#pragma warning restore RECS0154 // Parameter is never used
            : base()
        {
            conv          = bc;
            dv            = dialogvis;
            index         = idx;
            this.Pickable = true;
        }
Example #4
0
 protected override void OnDrag(object sender, PInputEventArgs e)
 {
     if (!e.Handled)
     {
         base.OnDrag(sender, e);
         foreach (PNode node in e.PickedNode.AllNodes)
         {
             ArrayList edges = (ArrayList)node.Tag;
             if (edges != null)
             {
                 foreach (PPath edge in edges)
                 {
                     DialogVis.UpdateEdge(edge);
                 }
             }
         }
     }
 }
Example #5
0
        public DlgStart(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
            : base(idx, x, y, bc, dialogvis)
        {
            outlinePen = new Pen(Color.Black);
            GetOutputLinks();
            SText title = new SText("Start: " + index, titleBrush);

            title.TextAlignment = StringAlignment.Center;
            title.X             = 5;
            title.Y             = 3;
            title.Pickable      = false;
            box       = PPath.CreateRectangle(0, 0, title.Width + 10, title.Height + 5);
            box.Pen   = outlinePen;
            box.Brush = nodeBrush;
            box.AddChild(title);
            this.AddChild(box);
            this.TranslateBy(x, y);
        }
 public DlgStart(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
     : base(idx, x, y, bc, dialogvis)
 {
     outlinePen = new Pen(Color.Black);
     GetOutputLinks();
     SText title = new SText("Start: " + index, titleBrush);
     title.TextAlignment = StringAlignment.Center;
     title.X = 5;
     title.Y = 3;
     title.Pickable = false;
     box = PPath.CreateRectangle(0, 0, title.Width + 10, title.Height + 5);
     box.Pen = outlinePen;
     box.Brush = nodeBrush;
     box.AddChild(title);
     this.AddChild(box);
     this.TranslateBy(x, y);
 }
        public DlgReply(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
            : base(idx, x, y, bc, dialogvis)
        {

        }
Example #8
0
 public DlgReply(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
     : base(idx, x, y, bc, dialogvis)
 {
 }
 public DlgEntry(int idx, float x, float y, BioConversation bc, DialogVis dialogvis)
     : base(idx, x, y, bc, dialogvis)
 {
 }