Esempio n. 1
0
        public MainFormViewModel(MainFormEventsViewModel eventsViewModel)
        {
            this.eventsViewModel = eventsViewModel ?? throw new ArgumentNullException(nameof(eventsViewModel));

            FsExplorerViewModelsList       = new List <FsExplorerViewModel>();
            FsExplorerViewModelsRdnlColcnt = FsExplorerViewModelsList.RdnlC();
        }
Esempio n. 2
0
        public FsExplorerViewModel(
            MainFormEventsViewModel eventsViewModel,
            IFsPathNormalizer fsPathNormalizer,
            ITimeStampHelper timeStampHelper)
        {
            this.EventsViewModel  = eventsViewModel ?? throw new ArgumentNullException(nameof(eventsViewModel));
            this.FsPathNormalizer = fsPathNormalizer ?? throw new ArgumentNullException(nameof(fsPathNormalizer));
            this.TimeStampHelper  = timeStampHelper ?? throw new ArgumentNullException(nameof(timeStampHelper));

            backHistoryStack    = new ConcurrentStack <string>();
            forwardHistoryStack = new ConcurrentStack <string>();

            Uuid = Guid.NewGuid();
        }
Esempio n. 3
0
        public MainForm()
        {
            InitializeComponent();

            if (!ServiceProviderContainer.Instance.Value.IsDesignMode)
            {
                programArgs    = ServiceProviderContainer.Instance.Value.Services.GetRequiredService <IProgramArgs>();
                initialDirPath = programArgs.InitialDirPath;

                viewModel = ServiceProviderContainer.Instance.Value.Services.GetRequiredService <MainFormViewModel>();

                viewModel.OnFsExplorerTabAdded       += ViewModel_OnFsExplorerTabAdded;
                viewModel.OnFsExplorerTabRemoved     += ViewModel_OnFsExplorerTabRemoved;
                viewModel.OnFsExplorerTabPageChanged += ViewModel_OnFsExplorerTabPageChanged;

                eventsViewModel = ServiceProviderContainer.Instance.Value.Services.GetRequiredService <MainFormEventsViewModel>();
                eventsViewModel.UILogMessageAdded += ViewModel_UILogMessageAdded;

                eventsViewModel.StatusStripTextChanged += ViewModel_StatusStripTextChanged;
                eventsViewModel.UpdateStatusStripText(string.Empty);
            }
        }