Exemplo n.º 1
0
        public SessionViewModel(ILog log, IKaVECommandGenerator cmdGen)
        {
            _cmdGen             = cmdGen;
            Log                 = log;
            Log.EntriesRemoved += OnEntriesRemoved;
            Log.EntryAppended  += OnEntryAdded;

            _logLoader = CreateBackgroundLogLoader();
        }
Exemplo n.º 2
0
        public FeedbackViewModel(ILogManager logManager, IExporter exporter, IKaVECommandGenerator cmdGen)
        {
            _logManager = logManager;
            _cmdGen     = cmdGen;

            SetupRefresh();
            _logManager.LogCreated += OnLogCreated;

            exporter.ExportStarted         += () => SetBusy(Properties.UploadWizard.Export_BusyMessage);
            exporter.ExportEnded           += SetIdle;
            exporter.ExportProgressChanged +=
                msg => SetBusy(string.Format("{0} ({1}%)", Properties.UploadWizard.Export_BusyMessage, msg));
        }
        public SessionManagerControl(FeedbackViewModel feedbackViewModel,
                                     ActionExecutor actionExec,
                                     ISettingsStore settingsStore,
                                     IKaVECommandGenerator cmdGen)
        {
            DataContext        = feedbackViewModel;
            _feedbackViewModel = feedbackViewModel;
            _actionExec        = actionExec;
            _feedbackViewModel.ConfirmationRequest.Raised += new ConfirmationRequestHandler(this).Handle;

            _settingsStore = settingsStore;
            _cmdGen        = cmdGen;

            InitializeComponent();
        }
Exemplo n.º 4
0
        public SessionManagerWindowRegistrar(Lifetime lifetime,
                                             ToolWindowManager toolWindowManager,
                                             SessionManagerWindowDescriptor descriptor,
                                             ActionExecutor actionExecutor,
                                             ILogManager logManager,
                                             IExporter exporter,
                                             ISettingsStore settingsStore,
                                             IKaVECommandGenerator cmdGen)
        {
            var viewModel = new FeedbackViewModel(logManager, exporter, cmdGen);
            var control   = new SessionManagerControl(viewModel, actionExecutor, settingsStore, cmdGen);

            // objects are kept in fields to prevent garbage collection
            _toolWindowClass = toolWindowManager.Classes[descriptor];
            _toolWindowClass.RegisterEmptyContent(
                lifetime,
                lt =>
            {
                var visibilitySignal = _toolWindowClass.Visible.Change;
                visibilitySignal.Advise(lt, control.OnVisibilityChanged);
                var wrapper = new EitherControl(control);
                return(wrapper.BindToLifetime(lt));
            });
        }
Exemplo n.º 5
0
 public OptionPageActionHandler(IKaVECommandGenerator gen, IActionManager am) : base(am)
 {
     _gen           = gen;
     _actionManager = am;
 }
Exemplo n.º 6
0
 public AboutActionHandler(IActionManager am, IKaVECommandGenerator cmdGen) : base(am)
 {
     _cmdGen = cmdGen;
 }