public FormVisualiser() { MinusZero mz = MinusZero.Instance; if (mz != null && mz.IsInitialized) { Vertex = mz.CreateTempVertex(); Vertex.Value = "FormVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Form")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); SetVertexDefaultValues(); this.Loaded += new RoutedEventHandler(OnLoad); // DO NOT WANT CONTEXTMENU HERE // this.ContextMenu = new m0ContextMenu(this); // this.Drop += dndDrop; // only drop. no drag start from here // this.AllowDrop = true; } }
} // do not want to expose those as PlatformClass.Vertex public WrapVisualiser() { Scale = 1.0; Margin = 5; this.Background = (Brush)FindResource("0BackgroundBrush"); this.Orientation = Orientation.Horizontal; MinusZero mz = MinusZero.Instance; if (mz != null && mz.IsInitialized) { //Vertex = mz.Root.Get(@"System\Session\Visualisers").AddVertex(null, "WrapVisualiser" + this.GetHashCode()); Vertex = mz.CreateTempVertex(); Vertex.Value = "WrapVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Wrap")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); // DO NOT WANT CONTEXTMENU HERE // this.ContextMenu = new m0ContextMenu(this); } }
public StringVisualiser() { MinusZero mz = MinusZero.Instance; if (mz != null && mz.IsInitialized) { this.AcceptsReturn = true; Vertex = mz.CreateTempVertex(); Vertex.Value="StringVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\String")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); this.Loaded += new RoutedEventHandler(OnLoad); this.PreviewMouseLeftButtonDown += dndPreviewMouseLeftButtonDown; this.PreviewMouseMove += dndPreviewMouseMove; this.Drop += dndDrop; this.AllowDrop = true; this.MouseEnter += dndMouseEnter; } }
public CodeVisualiser() { MinusZero mz = MinusZero.Instance; if (mz != null && mz.IsInitialized) { Vertex = mz.CreateTempVertex(); Vertex.Value = "CodeVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Code")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); SetVertexDefaultValues(); // no dnd here // this.PreviewMouseLeftButtonDown += dndPreviewMouseLeftButtonDown; // this.PreviewMouseMove += dndPreviewMouseMove; //this.Drop+=dndDrop; // this.AllowDrop = true; // this.MouseEnter += dndMouseEnter; this.Loaded += new RoutedEventHandler(OnLoad); this.KeyDown += CodeVisualiser_KeyDown; editSetup(); UpdateEditView(); } }
public GraphVisualiser() { MinusZero mz = MinusZero.Instance; DisplayedVertexesUIElements = new Dictionary <IVertex, SimpleVisualiserWrapper>(); this.Background = (Brush)FindResource("0BackgroundBrush"); this.AllowDrop = true; if (mz != null && mz.IsInitialized) { //Vertex = mz.Root.Get(@"System\Session\Visualisers").AddVertex(null, "GraphVisualiser" + this.GetHashCode()); Vertex = mz.CreateTempVertex(); Vertex.Value = "GraphVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Graph")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); SetVertexDefaultValues(); this.ContextMenu = new m0.UIWpf.Controls.m0ContextMenu(this); this.PreviewMouseLeftButtonDown += dndPreviewMouseLeftButtonDown; this.PreviewMouseMove += dndPreviewMouseMove; this.Drop += dndDrop; this.MouseEnter += dndMouseEnter; } this.Loaded += new RoutedEventHandler(OnLoad); }
public EdgeVisualiser() { MinusZero mz = MinusZero.Instance; if (mz != null && mz.IsInitialized) { Vertex = mz.CreateTempVertex(); Vertex.Value = "EdgeVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Edge")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); this.Background = (Brush)FindResource("0LightGrayBrush"); this.Loaded += new RoutedEventHandler(OnLoad); this.PreviewMouseLeftButtonDown += dndPreviewMouseLeftButtonDown; this.PreviewMouseMove += dndPreviewMouseMove; this.Drop += dndDrop; this.AllowDrop = true; this.MouseEnter += dndMouseEnter; } }
protected virtual void PlatformClassInitialize() { MinusZero mz = MinusZero.Instance; //Vertex = mz.Root.Get(@"System\Session\Visualisers").AddVertex(null, "ListVisualiser" + this.GetHashCode()); Vertex = mz.CreateTempVertex(); Vertex.Value = "ListVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\List")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); }
public ClassVisualiser() { MinusZero mz = MinusZero.Instance; if (mz != null && mz.IsInitialized) { Padding = new Thickness(3); Vertex = mz.CreateTempVertex(); Vertex.Value = "ClassVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Class")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); this.AllowDrop = false; this.Loaded += new RoutedEventHandler(OnLoad); } }
public TreeVisualiser() { MinusZero mz = MinusZero.Instance; this.Foreground = (Brush)FindResource("0ForegroundBrush"); this.Background = (Brush)FindResource("0BackgroundBrush"); this.BorderThickness = new Thickness(0); this.Padding = new Thickness(0); this.AllowDrop = true; // THIS REDUCES PERFORMANCE ON LARGE TREES SO commented out //VirtualizingStackPanel.SetIsVirtualizing(this, true); //VirtualizingStackPanel.SetVirtualizationMode(this, VirtualizationMode.Recycling); if (mz != null && mz.IsInitialized) { //Vertex = mz.Root.Get(@"System\Session\Visualisers").AddVertex(null, "TreeVisualiser" + this.GetHashCode()); Vertex = mz.CreateTempVertex(); Vertex.Value = "TreeVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Tree")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); SetVertexDefaultValues(); this.ContextMenu = new m0ContextMenu(this); this.PreviewMouseLeftButtonDown += dndPreviewMouseLeftButtonDown; this.PreviewMouseMove += dndPreviewMouseMove; this.Drop += dndDrop; this.MouseEnter += dndMouseEnter; } }
public VertexVisualiser() { SetUpGrid(); MinusZero mz = MinusZero.Instance; TextBlock = new TextBlock(); Grid.SetColumn(TextBlock, 0); this.Children.Add(TextBlock); ButtonSetUp(); if (mz != null && mz.IsInitialized) { Vertex = mz.CreateTempVertex(); Vertex.Value = "VertexVisualiser" + this.GetHashCode(); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex, mz.Root.Get(@"System\Meta\Visualiser\Vertex")); ClassVertex.AddIsClassAndAllAttributesAndAssociations(Vertex.Get("BaseEdge:"), mz.Root.Get(@"System\Meta\ZeroTypes\Edge")); TextBlock.Background = (Brush)FindResource("0LightGrayBrush"); TextBlock.Loaded += new RoutedEventHandler(OnLoad); TextBlock.PreviewMouseLeftButtonDown += dndPreviewMouseLeftButtonDown; TextBlock.PreviewMouseMove += dndPreviewMouseMove; TextBlock.Drop += dndDrop; TextBlock.AllowDrop = true; TextBlock.MouseEnter += dndMouseEnter; } }