public void Startup(ViewStartupParams p) { publishModel = new PublishModel(p.AuthProvider, p.CustomNodeManager); publishViewModel = new PublishViewModel(publishModel); inviteModel = new InviteModel(p.AuthProvider); inviteModel.MessageLogged += this.OnMessageLogged; inviteViewModel = new InviteViewModel(inviteModel); }
public DynamoView(DynamoViewModel dynamoViewModel) { // The user's choice to enable hardware acceleration is now saved in // the Dynamo preferences. It is set to true by default. // When the view is constructed, we enable or disable hardware acceleration based on that preference. //This preference is not exposed in the UI and can be used to debug hardware issues only // by modifying the preferences xml. RenderOptions.ProcessRenderMode = dynamoViewModel.Model.PreferenceSettings.UseHardwareAcceleration ? RenderMode.Default : RenderMode.SoftwareOnly; this.dynamoViewModel = dynamoViewModel; this.dynamoViewModel.UIDispatcher = Dispatcher; nodeViewCustomizationLibrary = new NodeViewCustomizationLibrary(this.dynamoViewModel.Model.Logger); DataContext = dynamoViewModel; Title = dynamoViewModel.BrandingResourceProvider.GetString(ResourceNames.MainWindow.Title); tabSlidingWindowStart = tabSlidingWindowEnd = 0; _timer = new Stopwatch(); _timer.Start(); InitializeComponent(); ToggleIsUsageReportingApprovedCommand.ToolTip = string.Format( Wpf.Properties.Resources.DynamoViewSettingMenuEnableDataReportingTooltip, dynamoViewModel.BrandingResourceProvider.ProductName); Loaded += DynamoView_Loaded; Unloaded += DynamoView_Unloaded; SizeChanged += DynamoView_SizeChanged; LocationChanged += DynamoView_LocationChanged; // Check that preference bounds are actually within one // of the available monitors. if (CheckVirtualScreenSize()) { Left = dynamoViewModel.Model.PreferenceSettings.WindowX; Top = dynamoViewModel.Model.PreferenceSettings.WindowY; Width = dynamoViewModel.Model.PreferenceSettings.WindowW; Height = dynamoViewModel.Model.PreferenceSettings.WindowH; } else { Left = 0; Top = 0; Width = 1024; Height = 768; } _workspaceResizeTimer.Tick += _resizeTimer_Tick; if (dynamoViewModel.Model.AuthenticationManager.HasAuthProvider) { loginService = new LoginService(this, new System.Windows.Forms.WindowsFormsSynchronizationContext()); dynamoViewModel.Model.AuthenticationManager.AuthProvider.RequestLogin += loginService.ShowLogin; } var viewExtensions = viewExtensionManager.ExtensionLoader.LoadDirectory(dynamoViewModel.Model.PathManager.ViewExtensionsDirectory); viewExtensionManager.MessageLogged += Log; var startupParams = new ViewStartupParams(dynamoViewModel); foreach (var ext in viewExtensions) { try { var logSource = ext as ILogSource; if (logSource != null) logSource.MessageLogged += Log; ext.Startup(startupParams); viewExtensionManager.Add(ext); } catch (Exception exc) { Log(ext.Name + ": " + exc.Message); } } this.dynamoViewModel.RequestPaste += OnRequestPaste; this.dynamoViewModel.RequestReturnFocusToView += OnRequestReturnFocusToView; FocusableGrid.InputBindings.Clear(); }
public void Startup(ViewStartupParams p) { this.startupParams = p; }
public void Startup(ViewStartupParams p) { manipulatorDaemon = ManipulatorDaemon.Create(new NodeManipulatorFactoryLoader()); }
public void Startup(ViewStartupParams p) { viewStartupParams = p; }
public void Startup(ViewStartupParams p) { publishModel = new PublishModel(p.AuthProvider, p.CustomNodeManager); publishViewModel = new PublishViewModel(publishModel); }
/// <summary> /// Action to be invoked when DynamoView begins to start up. This is guaranteed to happen /// after the DynamoModel has been created. /// /// This method is *not* guaranteed to be invoked unless the extension is present /// at startup. /// /// Exceptions thrown from this method will be caught by Dynamo and /// displayed. /// </summary> public virtual void Startup(ViewStartupParams viewStartupParams) { }
public void Startup(ViewStartupParams p) { }
public void Startup(ViewStartupParams p) { // Some start up stuff. }