Beispiel #1
0
            public ServiceFamily(YodiiGraphVertex rootVertex, YodiiLayout parent)
            {
                SubPlugins  = new Dictionary <IPluginInfo, YodiiGraphVertex>();
                SubServices = new Dictionary <IServiceInfo, ServiceFamily>();

                Debug.Assert(rootVertex.IsService);

                _parent = parent;

                RootVertex     = rootVertex;
                RootVertexSize = _parent.VertexSizes[RootVertex];
                RootService    = rootVertex.LabServiceInfo.ServiceInfo;

                if (RootService.Generalization != null)
                {
                    var generalizationFamily = parent.FindOrCreateServiceFamily(RootService.Generalization);
                    ParentServiceFamily = generalizationFamily;
                    ParentServiceFamily.RegisterSubService(this);
                }
            }
Beispiel #2
0
        /// <summary>
        /// Creates the main window.
        /// </summary>
        public MainWindow()
        {
            _vm = new MainWindowViewModel(false);
            this.DataContext = _vm;

            _vm.NewNotification       += _vm_NewNotification;
            _vm.CloseBackstageRequest += _vm_CloseBackstageRequest;
            _vm.VertexPositionRequest += _vm_VertexPositionRequest;
            _vm.AutoPositionRequest   += _vm_AutoPositionRequest;

            _vm.Graph.GraphUpdateRequested += Graph_GraphUpdateRequested;

            InitializeComponent();

            GraphArea.GenerateGraphFinished += GraphArea_GenerateGraphFinished;
            GraphArea.RelayoutFinished      += GraphArea_RelayoutFinished;

            ZoomBox.IsAnimationDisabled      = false;
            ZoomBox.MaxZoomDelta             = 2;
            GraphArea.UseNativeObjectArrange = false;
            //GraphArea.SideExpansionSize = new Size( 100, 100 );


            _graphLayout = new YodiiLayout();
            GraphArea.LayoutAlgorithm                = _graphLayout;
            GraphArea.DefaultEdgeRoutingAlgorithm    = EdgeRoutingAlgorithmTypeEnum.SimpleER;
            GraphArea.DefaultOverlapRemovalAlgorithm = GraphX.OverlapRemovalAlgorithmTypeEnum.FSA;
            GraphArea.EdgeCurvingEnabled             = true;

            this.Loaded  += MainWindow_Loaded;
            this.Closing += MainWindow_Closing;

            _vm.Graph.VertexAdded   += Graph_VertexAdded;
            _vm.Graph.VertexRemoved += Graph_VertexRemoved;
            _vm.Graph.EdgeAdded     += Graph_EdgeAdded;
            _vm.Graph.EdgeRemoved   += Graph_EdgeRemoved;
        }