Ejemplo n.º 1
0
 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));
     }
                                           );
 }
Ejemplo n.º 2
0
 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));
     });
 }
Ejemplo n.º 3
0
 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));
     });
 }