public MainFormViewModel(MainFormEventsViewModel eventsViewModel) { this.eventsViewModel = eventsViewModel ?? throw new ArgumentNullException(nameof(eventsViewModel)); FsExplorerViewModelsList = new List <FsExplorerViewModel>(); FsExplorerViewModelsRdnlColcnt = FsExplorerViewModelsList.RdnlC(); }
public FsExplorerViewModel( MainFormEventsViewModel eventsViewModel, IFsPathNormalizer fsPathNormalizer, ITimeStampHelper timeStampHelper) { EventsViewModel = eventsViewModel ?? throw new ArgumentNullException(nameof(eventsViewModel)); FsPathNormalizer = fsPathNormalizer ?? throw new ArgumentNullException(nameof(fsPathNormalizer)); TimeStampHelper = timeStampHelper ?? throw new ArgumentNullException(nameof(timeStampHelper)); backHistoryStack = new ConcurrentStack <string>(); forwardHistoryStack = new ConcurrentStack <string>(); Uuid = Guid.NewGuid(); }
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); } }