Ejemplo n.º 1
0
 public static void addSource(Ellipse renderObj, Label textCtrl)
 {
     if (allVertices.Exists(x => x.Id == SourceId))
     {
         logBox.AppendText("Illegal try to add source vertex.\n");
     }
     else
     {
         Vertice source = new Vertice(SourceId, "source" , renderObj, textCtrl);
         source.designateAsSource();
         allVertices.Add(source);
         logBox.AppendText("Adding source vertex.\n");
     }
     
 }
Ejemplo n.º 2
0
        public static void addVertice(Ellipse renderObj, Label textCtrl)
        {
            Vertice vert = new Vertice(verticeIdCnt, "v" + verticeIdCnt, renderObj, textCtrl);
            allVertices.Add(vert);
            logBox.AppendText("Adding vertex " + verticeIdCnt + ".\n");
            verticeIdCnt++;

        }
Ejemplo n.º 3
0
 public static void addSink(Ellipse renderObj, Label textCtrl)
 {
     if (allVertices.Exists(x => x.Id == SinkId))
     {
         logBox.AppendText("Illegal try to add sink vertex.\n");
     }
     else
     {
         Vertice sink = new Vertice(SinkId, "sink", renderObj, textCtrl);
         sink.designateAsSink();
         allVertices.Add(sink);
         logBox.AppendText("Adding sink vertex.\n");
     }
 }