예제 #1
0
        public void rearrangeGraphFromModel(Model.SBML.Model model, IDrawingInterface drawable)
        {
            if (!finishing)
            {
                if (thread != null)
                {
                    thread.stop();
                    Console.WriteLine("Rearrange thread already running");
                }

                GraphLayoutManager rearranger = new GraphLayoutManager_SpringEmbedder();

                thread = new RearrangeThread(rearranger, model, drawable);

                Thread newThread = new Thread(new ThreadStart(thread.run));

                thread.setThread(newThread);

                newThread.Start();
            }
        }
예제 #2
0
 protected void rearrangeThreadFinished(MacroCommand command)
 {
     if (listener != null)
     {
         listener.rearrangementComplete(command);
     }
     thread = null;
     Console.WriteLine("Rearrange thread finished");
     if (finishing)
     {
         Console.WriteLine("Rearrange thread cleaned up");
         Application.Exit();
     }
 }
예제 #3
0
 public GraphLayoutThreadManager()
 {
     thread = null;
     finishing = false;
 }