Example #1
0
        private void OnSplashMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            Splash splashMessage = sender as Splash;

            splashMessage.FadeSplash();
            if (splashMessage.dontShow.IsChecked == true)
            {
                coreComponent = ClassFactory.CurrCoreComponent;
                coreComponent.DisableSplash();
            }
        }
Example #2
0
        private void OnLoadingComplete()
        {
            // PopulateLibraryFromCurrentGraph
            coreComponent = ClassFactory.CurrCoreComponent;
            LibraryItem rootItem = coreComponent.GetRootLibraryItem();

            if (rootItem != null)
            {
                rootItem.Children.Insert(0, new LibraryItem(NodeType.None, DesignScriptStudio.Graph.Core.Configurations.NoResultMessage));
                libraryView.BindLibraryItemData(rootItem);
            }

            if (null != filesToRecover && (filesToRecover.Count > 0))
            {
                CreateBlankOrRecoveredCanvas(true); // Go into recovery mode.
            }
        }
Example #3
0
        public void SetupTest()
        {
            ICoreComponent coreComponent = ClassFactory.CreateCoreComponent(null);

            coreComponent.Initialize();
        }
Example #4
0
 void ILogicalComponentVisitor.Visit(ICoreComponent coreComponent)
 {
     this.ComponentName = coreComponent.Name;
 }
Example #5
0
 void ILogicalComponentVisitor.Visit(ICoreComponent coreComponent)
 {
     _publishPayloadBuilder.AddCoreComponent(coreComponent.Name, _version);
 }
Example #6
0
 public override void Visit(ICoreComponent coreComponent)
 {
     _coreComponents.Add(coreComponent);
 }
Example #7
0
 public virtual void Visit(ICoreComponent coreComponent)
 {
 }
Example #8
0
 private void OnSplashMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     Splash splashMessage = sender as Splash;
     splashMessage.FadeSplash();
     if (splashMessage.dontShow.IsChecked == true)
     {
         coreComponent = ClassFactory.CurrCoreComponent;
         coreComponent.DisableSplash();
     }
 }
Example #9
0
        private void OnLoadingComplete()
        {
            // PopulateLibraryFromCurrentGraph
            coreComponent = ClassFactory.CurrCoreComponent;
            LibraryItem rootItem = coreComponent.GetRootLibraryItem();

            if (rootItem != null)
            {
                rootItem.Children.Insert(0, new LibraryItem(NodeType.None, DesignScriptStudio.Graph.Core.Configurations.NoResultMessage));
                libraryView.BindLibraryItemData(rootItem);
            }

            if (null != filesToRecover && (filesToRecover.Count > 0))
                CreateBlankOrRecoveredCanvas(true); // Go into recovery mode.
        }
Example #10
0
        private void OnGraphControlLoaded(object sender, RoutedEventArgs e)
        {
            // Kick start library loading on a background thread...
            coreComponent = ClassFactory.CreateCoreComponent(this, geometricPreviewEnabled);
            coreComponent.InitializeAsync(this.OnCoreComponentInitialized);

            // Cursor resources.
            this.cursorSet = new CursorSet(this.MasterGrid);

            // Kick start a check for update version info, if the update manager is idle.
            UpdateManager.Instance.UpdateDownloaded += OnUpdatePackageDownloaded;
            UpdateManager.Instance.CheckForProductUpdate();
            UpdateManager.Instance.ShutdownRequested += OnUpdateManagerShutdownRequested;

            //Library
            libraryView = new LibraryView(this);
            libraryView.SetValue(GraphControl.WidthProperty, 250.0);
            libraryView.SetValue(GraphControl.HeightProperty, 400.0);
            libraryView.SetValue(GraphControl.VerticalAlignmentProperty, VerticalAlignment.Bottom);
            libraryView.SetValue(GraphControl.HorizontalAlignmentProperty, HorizontalAlignment.Left);
            libraryView.SetValue(GraphControl.MarginProperty, new Thickness(5, 0, 0, 0));
            libraryView.SetValue(Panel.ZIndexProperty, 60000);
            MasterGrid.Children.Add(libraryView);

            //Zoom and Pan Bar
            zoomAndPanControl = new ZoomAndPanControl(this);
            zoomAndPanControl.SetValue(GraphControl.VerticalAlignmentProperty, VerticalAlignment.Top);
            zoomAndPanControl.SetValue(GraphControl.HorizontalAlignmentProperty, HorizontalAlignment.Right);
            zoomAndPanControl.SetValue(GraphControl.MarginProperty, new Thickness(0, 5, 5, 0));
            zoomAndPanControl.SetValue(Panel.ZIndexProperty, 60000);
            zoomAndPanControl.Focusable = false;
            MasterGrid.Children.Add(zoomAndPanControl);

            //TabControl
            newCanvasCount = 0;
            tabControl = new GraphTabControl(this);
            tabControl.SetValue(Panel.ZIndexProperty, 60000);
            tabControl.SetValue(GraphControl.MarginProperty, new Thickness(0, -1, 0, 0));
            TabBorder.Child = tabControl;

            // for zoom and pan
            this.canvasScrollViewer.KeyDown += OnScrollViewerKeyDown;
            this.canvasScrollViewer.ScrollChanged += OnScrollViewerScrollChanged;
            this.slider.ValueChanged += OnSliderValueChanged;

            filesToRecover = Utilities.GetFilesToRecover(coreComponent.SessionName);
            if (null == filesToRecover || (filesToRecover.Count == 0))
                CreateBlankOrRecoveredCanvas(false); // Nothing to recover, create default.

            // Either UI or Core can be completely loaded before another. In the event
            // that UI completes its loading first, it sets the "initializationState"
            // to be "InitializationState.UiInitialized". If at this point Core has
            // already finished loading, then the library data can readily be obtained
            // and "Library" tree view populated.
            //
            if (initializationState == InitializationState.None)
                initializationState = InitializationState.UiInitialized;
            else if (initializationState == InitializationState.CoreInitialized)
                OnLoadingComplete();

            if (!coreComponent.StudioSettings.DontShowSplash)
            {
                Splash splashMessage = new Splash(this);
                splashMessage.SetValue(GraphControl.HorizontalAlignmentProperty, HorizontalAlignment.Center);
                splashMessage.SetValue(GraphControl.VerticalAlignmentProperty, VerticalAlignment.Bottom);
                splashMessage.MouseLeftButtonDown += OnSplashMouseLeftButtonDown;
                this.FeedbackMsssagePanel.Children.Add(splashMessage);
            }
        }
Example #11
0
        private void OnGraphControlLoaded(object sender, RoutedEventArgs e)
        {
            // Kick start library loading on a background thread...
            coreComponent = ClassFactory.CreateCoreComponent(this, geometricPreviewEnabled);
            coreComponent.InitializeAsync(this.OnCoreComponentInitialized);

            // Cursor resources.
            this.cursorSet = new CursorSet(this.MasterGrid);

            // Kick start a check for update version info, if the update manager is idle.
            UpdateManager.Instance.UpdateDownloaded += OnUpdatePackageDownloaded;
            UpdateManager.Instance.CheckForProductUpdate();
            UpdateManager.Instance.ShutdownRequested += OnUpdateManagerShutdownRequested;

            //Library
            libraryView = new LibraryView(this);
            libraryView.SetValue(GraphControl.WidthProperty, 250.0);
            libraryView.SetValue(GraphControl.HeightProperty, 400.0);
            libraryView.SetValue(GraphControl.VerticalAlignmentProperty, VerticalAlignment.Bottom);
            libraryView.SetValue(GraphControl.HorizontalAlignmentProperty, HorizontalAlignment.Left);
            libraryView.SetValue(GraphControl.MarginProperty, new Thickness(5, 0, 0, 0));
            libraryView.SetValue(Panel.ZIndexProperty, 60000);
            MasterGrid.Children.Add(libraryView);

            //Zoom and Pan Bar
            zoomAndPanControl = new ZoomAndPanControl(this);
            zoomAndPanControl.SetValue(GraphControl.VerticalAlignmentProperty, VerticalAlignment.Top);
            zoomAndPanControl.SetValue(GraphControl.HorizontalAlignmentProperty, HorizontalAlignment.Right);
            zoomAndPanControl.SetValue(GraphControl.MarginProperty, new Thickness(0, 5, 5, 0));
            zoomAndPanControl.SetValue(Panel.ZIndexProperty, 60000);
            zoomAndPanControl.Focusable = false;
            MasterGrid.Children.Add(zoomAndPanControl);

            //TabControl
            newCanvasCount = 0;
            tabControl     = new GraphTabControl(this);
            tabControl.SetValue(Panel.ZIndexProperty, 60000);
            tabControl.SetValue(GraphControl.MarginProperty, new Thickness(0, -1, 0, 0));
            TabBorder.Child = tabControl;

            // for zoom and pan
            this.canvasScrollViewer.KeyDown       += OnScrollViewerKeyDown;
            this.canvasScrollViewer.ScrollChanged += OnScrollViewerScrollChanged;
            this.slider.ValueChanged += OnSliderValueChanged;

            filesToRecover = Utilities.GetFilesToRecover(coreComponent.SessionName);
            if (null == filesToRecover || (filesToRecover.Count == 0))
            {
                CreateBlankOrRecoveredCanvas(false); // Nothing to recover, create default.
            }
            // Either UI or Core can be completely loaded before another. In the event
            // that UI completes its loading first, it sets the "initializationState"
            // to be "InitializationState.UiInitialized". If at this point Core has
            // already finished loading, then the library data can readily be obtained
            // and "Library" tree view populated.
            //
            if (initializationState == InitializationState.None)
            {
                initializationState = InitializationState.UiInitialized;
            }
            else if (initializationState == InitializationState.CoreInitialized)
            {
                OnLoadingComplete();
            }

            if (!coreComponent.StudioSettings.DontShowSplash)
            {
                Splash splashMessage = new Splash(this);
                splashMessage.SetValue(GraphControl.HorizontalAlignmentProperty, HorizontalAlignment.Center);
                splashMessage.SetValue(GraphControl.VerticalAlignmentProperty, VerticalAlignment.Bottom);
                splashMessage.MouseLeftButtonDown += OnSplashMouseLeftButtonDown;
                this.FeedbackMsssagePanel.Children.Add(splashMessage);
            }
        }
Example #12
0
 void ILogicalComponentVisitor.Visit(ICoreComponent coreComponent)
 {
 }