Exemple #1
0
        private static void CommandsChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            GraphLayoutCommand command = (GraphLayoutCommand)e.NewValue;

            if (command == GraphLayoutCommand.Save)
            {
                PocGraphLayout g = d as PocGraphLayout;
                g.SaveGraphInfo();
                g.Commands = GraphLayoutCommand.None;
            }
        }
Exemple #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.root = ((GraphSharp.Sample.MainWindow)(target));
                return;

            case 2:

            #line 99 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Exit_Executed);

            #line default
            #line hidden
                return;

            case 3:
                this.zoomSlider = ((System.Windows.Controls.Slider)(target));
                return;

            case 4:

            #line 201 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.NotificationTest_Executed);

            #line default
            #line hidden
                return;

            case 5:

            #line 208 "..\..\MainWindow.xaml"
                ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CompoundLayoutTest_Executed);

            #line default
            #line hidden
                return;

            case 6:
                this.graphLayout = ((GraphSharp.Sample.ViewModel.PocGraphLayout)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemple #3
0
        private static void GraphInfoChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PocGraphLayout layout = d as PocGraphLayout;

            layout.AddGraph(e.NewValue as PocGraphInfo);
        }