예제 #1
0
 public void show()
 {
     NLabel.Show();
     NBox.Show();
     MLabel.Show();
     MBox.Show();
     sceneImage.Show();
 }
예제 #2
0
 public void hide()
 {
     NLabel.Hide();
     NBox.Hide();
     MLabel.Hide();
     MBox.Hide();
     sceneImage.Hide();
 }
예제 #3
0
 void Box_VertexMoved(NBox component, NPoint selectedPoint)
 {
     using (new MethodTracer())
     {
         boxVisitor.BoxComponent = component;
         boxVisitor.PathResolver.BuildGraph();
         this.components.ForEach(x =>
         {
             x.Accept(boxVisitor);
         });
     }
 }
예제 #4
0
 public override void Visit(NBox component)
 {
     IsHit = false;
     if (component.Contains(point))
     {
         for (int i = 0; i < component.ConnectPoints.Length; i++)
         {
             if (component.ConnectPoints[i].Equals(point))
             {
                 return;
             }
         }
         IsHit = true;
     }
 }
예제 #5
0
        public override void Visit(NBox component)
        {
            component.IsCloseEnough = false;

            for (int i = 0; i < component.ConnectPoints.Length; i++)
            {
                double d = NMathHelper.Distance(SelectedPoint, component.ConnectPoints[i]);
                if (d <= NConfig.CONNECT_DISTANCE)
                {
                    component.IsCloseEnough = true;
                    if (Connect)
                    {
                        if (Connector.Model.StartPoint == SelectedPoint)
                        {
                            Connector.StartBox            = component;
                            Connector.Model.StartBoxIndex = i;
                            Connector.Model.StartBoxID    = component.Model.ID;
                        }
                        else
                        {
                            Connector.EndBox            = component;
                            Connector.Model.EndBoxIndex = i;
                            Connector.Model.EndBoxID    = component.Model.ID;
                        }
                        SelectedPoint.Set(component.ConnectPoints[i]);


                        PathResolver.Connector  = Connector;
                        PathResolver.StartPoint = Connector.Model.StartPoint;
                        PathResolver.EndPoint   = Connector.Model.EndPoint;

                        PathResolver.RebuildGraph();
                        PathResolver.Resolve();

                        return;
                    }
                }
            }
        }
예제 #6
0
 public override void Visit(NBox component)
 {
     component.RecomputeConnectPoints();
     component.VertexMoved += new Action <NBox, NPoint>(Box_VertexMoved);
 }
예제 #7
0
 public NBoxView(NBox element) : base(element)
 {
     this.element = element;
 }
예제 #8
0
 public override void Visit(NBox component)
 {
 }
예제 #9
0
 public void Visit(NBox component)
 {
     component.View = PostProcessView(new NBoxView(component));
 }
예제 #10
0
 public abstract void Visit(NBox component);
예제 #11
0
 public override void Visit(NBox component)
 {
     connector.EndBox = component;
 }