Esempio n. 1
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);
            }
        }