Exemple #1
0
        public void RefreshContent()
        {
            if (Workspace == null)
            {
                return;
            }
            if (Workspace.CurrentGraph == null)
            {
                return;
            }

            if (Workspace.CurrentGraph != DiagramDrawer.DiagramViewModel.DataObject)
            {
                LoadDiagram(Workspace.CurrentGraph);
            }
            else
            {
                if (DiagramViewModel != null)
                {
                    //TODO Micah, please check if it is valid to refresh it here
                    //Doing this on Load does not handle shit like renaming
                    DiagramViewModel.NavigationViewModel.Refresh();
                }

                if (DiagramDrawer != null)
                {
                    DiagramDrawer.Refresh(InvertGraphEditor.PlatformDrawer);
                }
            }
        }
Exemple #2
0
 public void LoadDiagram(IGraphData diagram)
 {
     InvertGraphEditor.DesignerWindow = this;
     if (diagram == null)
     {
         return;
     }
     try
     {
         DiagramDrawer       = new DiagramDrawer(new DiagramViewModel(diagram));
         DiagramDrawer.Dirty = true;
         //DiagramDrawer.Data.ApplyFilter();
         DiagramDrawer.Refresh(InvertGraphEditor.PlatformDrawer);
     }
     catch (Exception ex)
     {
         InvertApplication.LogException(ex);
         InvertApplication.Log("Either a plugin isn't installed or the file could no longer be found. See Exception error");
     }
 }