Exemple #1
0
        public MainWindow()
        {
            this.DataContext = this;

            //TODO: use IoC
            var engine2D = new Engine2D();
            var layout = new GraphLayoutEngine(engine2D);
            this._graphFacade = new ContentAwareGraphFacade(new GraphFacade(layout));

            this._graphFacade.Change += this.OnChange;

            ApplicationCommands.Close.InputGestures.Add(new KeyGesture(Key.F4, ModifierKeys.Alt));
            ApplicationCommands.SaveAs.InputGestures.Add(new KeyGesture(Key.S, ModifierKeys.Control | ModifierKeys.Shift));

            this.InitializeComponent();

            this.UpdateTitle();

            this.Canvas.Engine2D = engine2D;
            this.Canvas.Start();
        }
Exemple #2
0
 // TODO: Decoupling
 public GraphFacade(GraphLayoutEngine engine)
 {
     this._layout = engine;
 }