public WatchViewModel(IVisualizationManager visualizationManager) { this.visualizationManager = visualizationManager; FindNodeForPathCommand = new DelegateCommand(FindNodeForPath, CanFindNodeForPath); IsNodeExpanded = true; _showRawData = false; }
/// <summary> /// Enables starting Dynamo with a mock IUpdateManager /// </summary> /// <param name="updateManager"></param> /// <param name="watchHandler"></param> /// <param name="preferences"></param> /// <param name="visualizationManager"></param> protected void StartDynamo(IUpdateManager updateManager, ILogger logger, IWatchHandler watchHandler, IPreferences preferences, IVisualizationManager visualizationManager) { //create a new instance of the ViewModel Controller = new DynamoController(Context.NONE, updateManager, logger, watchHandler, preferences); Controller.DynamoViewModel = new DynamoViewModel(Controller, null); DynamoController.IsTestMode = true; Controller.VisualizationManager = new VisualizationManager(); }
public WatchViewModel(IVisualizationManager visualizationManager, string label, string path, bool expanded = false) { this.visualizationManager = visualizationManager; FindNodeForPathCommand = new DelegateCommand(FindNodeForPath, CanFindNodeForPath); _path = path; _label = label; IsNodeExpanded = expanded; }
public void SetupCustomUIElements(dynNodeView nodeUI) { this.ViewModel = nodeUI.ViewModel.DynamoViewModel; VisualizationManager = ViewModel.VisualizationManager; var mi = new MenuItem { Header = "Zoom to Fit" }; mi.Click += mi_Click; nodeUI.MainContextMenu.Items.Add(mi); //add a 3D viewport to the input grid //http://helixtoolkit.codeplex.com/wikipage?title=HelixViewport3D&referringTitle=Documentation //_watchView = new WatchView(); View = new Watch3DView(GUID) { DataContext = this, Width = _watchWidth, Height = _watchHeight }; View.View.Camera.Position = _camPosition; View.View.Camera.LookDirection = _lookDirection; var backgroundRect = new Rectangle { HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Stretch, IsHitTestVisible = false }; var bc = new BrushConverter(); var strokeBrush = (Brush)bc.ConvertFrom("#313131"); backgroundRect.Stroke = strokeBrush; backgroundRect.StrokeThickness = 1; var backgroundBrush = new SolidColorBrush(Color.FromRgb(240, 240, 240)); backgroundRect.Fill = backgroundBrush; nodeUI.PresentationGrid.Children.Add(backgroundRect); nodeUI.PresentationGrid.Children.Add(View); nodeUI.PresentationGrid.Visibility = Visibility.Visible; DataBridge.Instance.RegisterCallback( GUID.ToString(), obj => nodeUI.Dispatcher.Invoke( new Action <object>(RenderData), DispatcherPriority.Render, obj)); }
/// <summary> /// Enables starting Dynamo with a mock IUpdateManager /// </summary> /// <param name="updateManager"></param> /// <param name="watchHandler"></param> /// <param name="preferences"></param> /// <param name="visualizationManager"></param> protected void StartDynamo(IUpdateManager updateManager, IWatchHandler watchHandler, IPreferences preferences, IVisualizationManager visualizationManager) { var corePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); DynamoPathManager.Instance.InitializeCore(corePath); //create a new instance of the ViewModel Controller = new DynamoController(Context.NONE, updateManager, watchHandler, preferences, corePath); Controller.DynamoViewModel = new DynamoViewModel(Controller, null); DynamoController.IsTestMode = true; Controller.VisualizationManager = new VisualizationManager(); }
private void InitializeVizEngine() { //System.Diagnostics.Debugger.Launch(); Cursor.Current = Cursors.WaitCursor; BassAudioEngine bassEngine = BassMusicPlayer.Player; IVizMgr = bassEngine.IVizManager; List <VisualizationInfo> vizPluginsInfo = null; if (IVizMgr != null) { vizPluginsInfo = IVizMgr.VisualizationPluginsInfo; } LoadVisualizationList(vizPluginsInfo); }
public WatchViewModel(IVisualizationManager visualizationManager, string label, string path, bool expanded = false) { this.visualizationManager = visualizationManager; FindNodeForPathCommand = new DelegateCommand(FindNodeForPath, CanFindNodeForPath); _path = path; _label = label; IsNodeExpanded = expanded; }
public WatchViewModel(IVisualizationManager visualizationManager) { this.visualizationManager = visualizationManager; FindNodeForPathCommand = new DelegateCommand(FindNodeForPath, CanFindNodeForPath); IsNodeExpanded = true; _showRawData = false; }
protected DynamoViewModel(DynamoModel dynamoModel, IWatchHandler watchHandler, IVisualizationManager vizManager, string commandFilePath) { // initialize core data structures this.model = dynamoModel; this.model.CommandStarting += OnModelCommandStarting; this.model.CommandCompleted += OnModelCommandCompleted; this.WatchHandler = watchHandler; this.VisualizationManager = vizManager; this.PackageManagerClientViewModel = new PackageManagerClientViewModel(this, model.PackageManagerClient); this.SearchViewModel = new SearchViewModel(this, model.SearchModel); // Start page should not show up during test mode. this.ShowStartPage = !DynamoModel.IsTestMode; //add the initial workspace and register for future //updates to the workspaces collection workspaces.Add(new WorkspaceViewModel(model.HomeSpace, this)); model.Workspaces.CollectionChanged += Workspaces_CollectionChanged; SubscribeModelCleaningUpEvent(); SubscribeModelChangedHandlers(); SubscribeUpdateManagerHandlers(); InitializeAutomationSettings(commandFilePath); InitializeDelegateCommands(); SubscribeLoggerHandlers(); DynamoSelection.Instance.Selection.CollectionChanged += SelectionOnCollectionChanged; InitializeRecentFiles(); UsageReportingManager.Instance.PropertyChanged += CollectInfoManager_PropertyChanged; WatchIsResizable = false; SubscribeDispatcherHandlers(); }
public DefaultWatchHandler(IVisualizationManager manager, IPreferences preferences) { visualizationManager = manager; this.preferences = preferences; }
private void InitializeVizEngine() { //System.Diagnostics.Debugger.Launch(); Cursor.Current = Cursors.WaitCursor; BassAudioEngine bassEngine = BassMusicPlayer.Player; IVizMgr = bassEngine.IVizManager; List<VisualizationInfo> vizPluginsInfo = null; if (IVizMgr != null) { vizPluginsInfo = IVizMgr.VisualizationPluginsInfo; } LoadVisualizationList(vizPluginsInfo); }
/// <summary> /// Enables starting Dynamo with a mock IUpdateManager /// </summary> /// <param name="updateManager"></param> /// <param name="watchHandler"></param> /// <param name="preferences"></param> /// <param name="visualizationManager"></param> protected void StartDynamo(IUpdateManager updateManager, IWatchHandler watchHandler, IPreferences preferences, IVisualizationManager visualizationManager) { var corePath = Path.GetFullPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); //create a new instance of the ViewModel Controller = new DynamoController(Context.NONE, updateManager, watchHandler, preferences, corePath); Controller.DynamoViewModel = new DynamoViewModel(Controller, null); DynamoController.IsTestMode = true; Controller.VisualizationManager = new VisualizationManager(); }
public RevitWatchHandler(IVisualizationManager vizManager, IPreferences prefs) { baseHandler = new DefaultWatchHandler(vizManager, prefs); preferences = prefs; visualizationManager = vizManager; }
public RevitWatchHandler(IVisualizationManager vizManager, IPreferences prefs) { baseHandler = new DefaultWatchHandler(vizManager, prefs); preferences = prefs; visualizationManager = vizManager; }
/// <summary> /// Enables starting Dynamo with a mock IUpdateManager /// </summary> /// <param name="updateManager"></param> /// <param name="watchHandler"></param> /// <param name="preferences"></param> /// <param name="visualizationManager"></param> protected void StartDynamo(IUpdateManager updateManager, IWatchHandler watchHandler, IPreferences preferences, IVisualizationManager visualizationManager) { //create a new instance of the ViewModel Controller = new DynamoController(Context.NONE, updateManager, watchHandler, preferences); Controller.DynamoViewModel = new DynamoViewModel(Controller, null); DynamoController.IsTestMode = true; Controller.VisualizationManager = new VisualizationManager(); }
public DefaultWatchHandler(IVisualizationManager manager, IPreferences preferences) { visualizationManager = manager; this.preferences = preferences; }
public void SetupCustomUIElements(dynNodeView nodeUI) { this.ViewModel = nodeUI.ViewModel.DynamoViewModel; VisualizationManager = ViewModel.VisualizationManager; var mi = new MenuItem { Header = "Zoom to Fit" }; mi.Click += mi_Click; nodeUI.MainContextMenu.Items.Add(mi); //add a 3D viewport to the input grid //http://helixtoolkit.codeplex.com/wikipage?title=HelixViewport3D&referringTitle=Documentation //_watchView = new WatchView(); View = new Watch3DView(GUID) { DataContext = this, Width = _watchWidth, Height = _watchHeight }; View.View.Camera.Position = _camPosition; View.View.Camera.LookDirection = _lookDirection; var backgroundRect = new Rectangle { HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Stretch, IsHitTestVisible = false }; var bc = new BrushConverter(); var strokeBrush = (Brush)bc.ConvertFrom("#313131"); backgroundRect.Stroke = strokeBrush; backgroundRect.StrokeThickness = 1; var backgroundBrush = new SolidColorBrush(Color.FromRgb(240, 240, 240)); backgroundRect.Fill = backgroundBrush; nodeUI.PresentationGrid.Children.Add(backgroundRect); nodeUI.PresentationGrid.Children.Add(View); nodeUI.PresentationGrid.Visibility = Visibility.Visible; DataBridge.Instance.RegisterCallback( GUID.ToString(), obj => nodeUI.Dispatcher.Invoke( new Action<object>(RenderData), DispatcherPriority.Render, obj)); }