public ActiveTaskWindowRegistrar(Lifetime lifetime, ToolWindowManager toolWindowManager, ActiveTaskWindowDescriptor descriptor, TaskViewModel viewModel) { _toolWindowClass = toolWindowManager.Classes[descriptor]; _toolWindowClass.RegisterEmptyContent(lifetime, lt => { var control = new ActiveTaskWindow(viewModel); var wrapper = new EitherControl(control); return(wrapper.BindToLifetime(lt)); } ); }
public MainNavigationRegistrar(Lifetime lifetime, ToolWindowManager toolWindowManager, MainNavigationDescriptor descriptor, TaskViewModel viewModel, IconsSettingsRepository settingsRepository) { Directory.CreateDirectory(PersistenceConstants.AppFolder); _toolWindowClass = toolWindowManager.Classes[descriptor]; _toolWindowClass.RegisterEmptyContent( lifetime, lt => { var control = new MainNavigationControl(viewModel); var wrapper = new EitherControl(control); return(wrapper.BindToLifetime(lt)); }); }
public SessionManagerWindowRegistrar(Lifetime lifetime, ToolWindowManager toolWindowManager, SessionManagerWindowDescriptor descriptor, ActionExecutor actionExecutor, ILogManager logManager, IExporter exporter, ISettingsStore settingsStore) { // objects are kept in fields to prevent garbage collection _toolWindowClass = toolWindowManager.Classes[descriptor]; _toolWindowClass.RegisterEmptyContent( lifetime, lt => { var visibilitySignal = _toolWindowClass.Visible.Change; var control = new SessionManagerControl( new FeedbackViewModel(logManager, exporter), actionExecutor, settingsStore); visibilitySignal.Advise(lt, control.OnVisibilityChanged); var wrapper = new EitherControl(control); return(wrapper.BindToLifetime(lt)); }); }