Beispiel #1
0
        public EditDialog(IVertex _baseVertex, Point?position)
        {
            baseVertex = _baseVertex;

            InitializeComponent();

            FormVisuliser = new FormVisualiser();

            Wrap.SetContent(FormVisuliser);

            GraphUtil.ReplaceEdge(FormVisuliser.Vertex.Get("BaseEdge:"), "To", baseVertex);

            this.Loaded += new RoutedEventHandler(OnLoad);

            /*this.Title = baseVertex.Value + " edit / new";
             *
             * if (position!=null)
             * {
             *  _mousePosition =(Point) position;
             *  this.Loaded += new RoutedEventHandler(OnLoad);
             * }
             * else
             *  Owner = m0Main.Instance;
             *
             * ShowDialog();*/
        }
Beispiel #2
0
        protected override void OnClick()
        {
            FormVisualiser v = (FormVisualiser)UIWpf.getParentFormVisualiser(this);

            if (v != null)
            {
                Edge.ReplaceEdgeEdges(v.Vertex.Get("BaseEdge:"), BaseEdge);
            }
            else
            {
                IVertex v2 = MinusZero.Instance.CreateTempVertex();
                Edge.AddEdgeEdges(v2, BaseEdge);

                //BaseCommands.Open(v2,null); // want Form Visuliser always
                BaseCommands.OpenFormVisualiser(v2);
            }
        }