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
Ejemplo n.º 1
0
 public DlgObj(int idx, float x, float y, BioConversation bc, DialogVis dialogvis)
     : base()
 {
     conv          = bc;
     dv            = dialogvis;
     index         = idx;
     this.Pickable = true;
 }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
                 }
             }
         }
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
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);
 }
Ejemplo n.º 7
0
        public DlgReply(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
            : base(idx, x, y, bc, dialogvis)
        {

        }
Ejemplo n.º 8
0
 public DlgReply(int idx, float x, float y, ME3BioConversation bc, DialogVis dialogvis)
     : base(idx, x, y, bc, dialogvis)
 {
 }
Ejemplo n.º 9
0
 public DlgEntry(int idx, float x, float y, BioConversation bc, DialogVis dialogvis)
     : base(idx, x, y, bc, dialogvis)
 {
 }