public static IVertex OpenVisualiserSelectedBase(IVertex baseVertex, IVertex inputVertex) { IPlatformClass pc = (IPlatformClass)PlatformClass.CreatePlatformObject(inputVertex.Get("VisualiserClass:")); GraphUtil.ReplaceEdge(pc.Vertex.Get("BaseEdge:"), "Meta", baseVertex.Get("Meta:")); GraphUtil.ReplaceEdge(pc.Vertex.Get("BaseEdge:"), "To", baseVertex.Get("To:")); IVertex synchronisedVisualiser = inputVertex.Get("SynchronisedVisualiser:"); BaseSelectedSynchronisedHelper helper = new BaseSelectedSynchronisedHelper(pc.Vertex, synchronisedVisualiser); PlatformClass.RegisterVertexChangeListeners(synchronisedVisualiser, new VertexChange(helper.SynchronisedVisualiserChange), new string[] { "BaseEdge", "SelectedEdges" }); IVertex firstSelectedVertex = synchronisedVisualiser.Get(@"SelectedEdges:\"); if (firstSelectedVertex != null) { GraphUtil.ReplaceEdge(pc.Vertex, "BaseEdge", firstSelectedVertex); } MinusZero.Instance.DefaultShow.ShowContent(pc); return(null); }
public QueryDialog(IVertex baseVertex) { InitializeComponent(); MinusZero z = MinusZero.Instance; this.baseVertex = baseVertex; GraphUtil.ReplaceEdge(this.Queries.Vertex.Get("BaseEdge:"), "To", z.Root.Get(@"User\CurrentUser:\Queries:")); PlatformClass.RegisterVertexChangeListeners(Queries.Vertex, QueriesVertexChange, new string[] { "BaseEdge", "SelectedEdges" }); this.Loaded += new RoutedEventHandler(OnLoad); }
public DiagramItemBase() { Anchors = new List <FrameworkElement>(); if (Vertex != null) { PlatformClass.RegisterVertexChangeListeners(Vertex, new VertexChange(VertexChange), new string[] { "BaseEdge", "SelectedEdges", "ForegroundColor", "BackgroundColor" }); } this.SizeChanged += DiagramItemBase_SizeChanged; this.MouseEnter += DiagramItemBase_MouseEnter; this.MouseLeave += DiagramItemBase_MouseLeave; }
public SimpleTreeVisualiser() { MinusZero mz = MinusZero.Instance; this.BorderThickness = new Thickness(0); VirtualizingStackPanel.SetIsVirtualizing(this, true); VirtualizingStackPanel.SetVirtualizationMode(this, VirtualizationMode.Recycling); if (mz != null && mz.IsInitialized) { Vertex = mz.Root.Get(@"System\Session\Visualisers").AddVertex(null, "SimpleTreeVisualiser" + this.GetHashCode()); ClassVertex.AddClassAttributes(Vertex, mz.Root.Get(@"System\Meta\Visualiser\SimpleListVisualiser")); PlatformClass.RegisterVertexChangeListeners(Vertex, new VertexChange(VertexChange)); } }
public SimpleVisualiserWrapper(FrameworkElement e, IVertex _baseVertex, GraphVisualiser _ParentVisualiser) { baseVertex = _baseVertex; ParentVisualiser = _ParentVisualiser; this.Child = e; this.BorderBrush = (Brush)FindResource("0LightGrayBrush"); this.Background = (Brush)FindResource("0BackgroundBrush"); this.BorderThickness = new Thickness(1); this.Padding = new Thickness(1); if (baseVertex != null) { PlatformClass.RegisterVertexChangeListeners(baseVertex, new VertexChange(VertexChange), new string[] { "BaseEdge", "SelectedEdges" }); } }
public SimpleListVisualiser() { this.AutoGenerateColumns = false; this.BorderThickness = new System.Windows.Thickness(0); this.HeadersVisibility = DataGridHeadersVisibility.Column; this.GridLinesVisibility = DataGridGridLinesVisibility.None; AddColumns(); this.SelectedValuePath = "To"; MinusZero mz = MinusZero.Instance; if (mz != null && mz.IsInitialized) { Vertex = mz.Root.Get(@"System\Session\Visualisers").AddVertex(null, "SimpleListVisualiser" + this.GetHashCode()); ClassVertex.AddClassAttributes(Vertex, mz.Root.Get(@"System\Meta\Visualiser\SimpleListVisualiser")); PlatformClass.RegisterVertexChangeListeners(Vertex, new VertexChange(VertexChange)); } }
public virtual void VertexSetedUp() { PlatformClass.RegisterVertexChangeListeners(Vertex, new VertexChange(VertexChange), new string[] { "BaseEdge", "SelectedEdges", "ForegroundColor", "BackgroundColor" }); VisualiserUpdate(); } // to be called after Vertex is setted up
public void PaintGraph() { if (ActualHeight != 0) { //MinusZero.Instance.Log(1, "PaintGraph", ""); // turn off Vertex.Change listener PlatformClass.RemoveVertexChangeListeners(this.Vertex, new VertexChange(VertexChange)); // IsPaiting = true; if (GeneralUtil.CompareStrings(Vertex.Get("FastMode:"), "True")) { FastMode = true; } else { FastMode = false; } if (GeneralUtil.CompareStrings(Vertex.Get("MetaLabels:"), "True")) { MetaLabels = true; } else { MetaLabels = false; } if (GeneralUtil.CompareStrings(Vertex.Get("ShowInEdges:"), "True")) { ShowInEdges = true; } else { ShowInEdges = false; } this.Children.Clear(); foreach (UIElement e in DisplayedVertexesUIElements.Values) { if (e is IDisposable) { ((IDisposable)e).Dispose(); } } DisplayedVertexesUIElements.Clear(); //GraphUtil.RemoveAllEdges(Vertex.Get("DisplayedEdges:")); Width = GraphUtil.GetIntegerValue(Vertex.Get("NumberOfCircles:")) * GraphUtil.GetIntegerValue(Vertex.Get("VisualiserCircleSize:")) * 2; Height = Width; AddCircle(0, null); SelectWrappersForSelectedVertexes(); IsFirstPainted = true; IsPaiting = false; // turn on Vertex.Change listener PlatformClass.RegisterVertexChangeListeners(this.Vertex, new VertexChange(VertexChange), new string[] { "BaseEdge", "SelectedEdges" }); // } }
private void VertexChangeListenOn() { ((EasyVertex)Vertex).CanFireChangeEvent = true; PlatformClass.RegisterVertexChangeListeners(this.Vertex, new VertexChange(VertexChange), new string[] { "BaseEdge", "SelectedEdges" }); }