public LayoutAnalyzerViewModel()
        {
            AnalyzedLayouts = new GraphLayoutViewModel
            {
                LayoutAlgorithmType = "FR"
            };
            GraphModels = new ObservableCollection<GraphModel>();

            RegisterCommand(ContinueLayoutCommand,
                             param => AnalyzedLayouts != null,
                             param => ContinueLayout());

            RegisterCommand(RelayoutCommand,
                             param => AnalyzedLayouts != null,
                             param => Relayout());

            RegisterCommand(OpenGraphsCommand,
                             param => true,
                             param => OpenGraphs());

            RegisterCommand(SaveGraphsCommand,
                             param => GraphModels.Count > 0,
                             param => SaveGraphs());

            CreateSampleGraphs();
        }
Beispiel #2
0
        public MainWindow()
        {
            InitializeComponent();

            CKGraphHost host = new CKGraphHost("N:|Clouds|SkyDrive|Dev|C#|Civikey|Certified|Output|Debug");
            _dataContext = new GraphLayoutViewModel(host);
            DataContext = _dataContext;
        }
Beispiel #3
0
        public MainWindow()
        {
            InitializeComponent();

            CKGraphHost host = new CKGraphHost("N:|Clouds|SkyDrive|Dev|C#|Civikey|Certified|Output|Debug");

            _dataContext = new GraphLayoutViewModel(host);
            DataContext  = _dataContext;
        }
        public LayoutAnalyzerViewModel()
        {
            AnalyzedLayouts = new GraphLayoutViewModel
            {
                LayoutAlgorithmType = "EfficientSugiyama"
            };
            GraphModels = new ObservableCollection<GraphModel>();

            RelayoutCommand = new RelayCommand(p => Relayout(), p => AnalyzedLayouts != null, "Relayout");
            OpenGraphsCommand = new RelayCommand(p => OpenGraphs(), title: "Open Graphs");
            SaveGraphsCommand = new RelayCommand(p => SaveGraphs(), p => GraphModels.Count > 0, "Save Graphs");

            CreateSampleGraphs();
        }
 public void RemoveLayout( GraphLayoutViewModel layoutViewModel )
 {
     AnalyzedLayouts.Remove( layoutViewModel );
 }
 public bool CanRemoveLayout( GraphLayoutViewModel glvm )
 {
     return ( glvm != null && AnalyzedLayouts.Contains( glvm ) );
 }
 public void AddLayout()
 {
     var glvm = new GraphLayoutViewModel
                	{
                		LayoutAlgorithmType = string.Empty,
                		IsSelected = true,
                		Graph = ( selectedGraphModel == null ? null : selectedGraphModel.Graph )
                	};
     AnalyzedLayouts.Add( glvm );
 }