예제 #1
0
 public AppRuntimeManager(
     [NotNull] IUserNotifier userNotifier,
     [NotNull] ILogger logger,
     [NotNull] INewsViewModelFactory newsViewModelFactory,
     [NotNull] ITelemetry telemetry,
     [NotNull] IWaVersionInfoProvider waVersionInfoProvider,
     [NotNull] WurmUnlimitedLogsDirChecker wurmUnlimitedLogsDirChecker)
 {
     this.userNotifier                = userNotifier ?? throw new ArgumentNullException(nameof(userNotifier));
     this.logger                      = logger ?? throw new ArgumentNullException(nameof(logger));
     this.newsViewModelFactory        = newsViewModelFactory ?? throw new ArgumentNullException(nameof(newsViewModelFactory));
     this.telemetry                   = telemetry ?? throw new ArgumentNullException(nameof(telemetry));
     this.waVersionInfoProvider       = waVersionInfoProvider ?? throw new ArgumentNullException(nameof(waVersionInfoProvider));
     this.wurmUnlimitedLogsDirChecker = wurmUnlimitedLogsDirChecker ?? throw new ArgumentNullException(nameof(wurmUnlimitedLogsDirChecker));
 }
예제 #2
0
        public MainForm(
            [NotNull] IConsoleArgs consoleArgs,
            [NotNull] CombinedLogsUserControl combinedLogsUserControl,
            [NotNull] MainMenuUserControl mainMenuUserControl,
            [NotNull] IFeaturesManager featuresManager,
            [NotNull] INewsViewModelFactory newsViewModelFactory,
            [NotNull] ITelemetry telemetry)
        {
            if (consoleArgs == null)
            {
                throw new ArgumentNullException(nameof(consoleArgs));
            }
            if (combinedLogsUserControl == null)
            {
                throw new ArgumentNullException(nameof(combinedLogsUserControl));
            }
            if (mainMenuUserControl == null)
            {
                throw new ArgumentNullException(nameof(mainMenuUserControl));
            }
            if (featuresManager == null)
            {
                throw new ArgumentNullException(nameof(featuresManager));
            }
            if (newsViewModelFactory == null)
            {
                throw new ArgumentNullException(nameof(newsViewModelFactory));
            }
            if (telemetry == null)
            {
                throw new ArgumentNullException(nameof(telemetry));
            }
            this.combinedLogsUserControl = combinedLogsUserControl;
            this.mainMenuUserControl     = mainMenuUserControl;
            this.featuresManager         = featuresManager;
            this.telemetry = telemetry;

            InitializeComponent();
        }
예제 #3
0
        public MainMenuUserControl(
            [NotNull] IProcessStarter processStarter,
            [NotNull] IUserNotifier userNotifier,
            [NotNull] IServersEditorViewFactory serversEditorViewFactory,
            [NotNull] IDebuggingWindowFactory debuggingWindowFactory,
            [NotNull] INewsViewModelFactory newsViewModelFactory,
            [NotNull] IWurmAssistantDataDirectory wurmAssistantDataDirectory,
            [NotNull] IWurmAssistantConfig wurmAssistantConfig,
            [NotNull] IEnvironment environment,
            [NotNull] IWurmClientValidatorFactory wurmClientValidatorFactory,
            [NotNull] ILogger logger,
            [NotNull] IOptionsFormFactory optionsFormFactory,
            [NotNull] IDataBackupsViewModelFactory dataBackupsViewModelFactory,
            [NotNull] IWindowManager windowManager)
        {
            if (processStarter == null)
            {
                throw new ArgumentNullException(nameof(processStarter));
            }
            if (userNotifier == null)
            {
                throw new ArgumentNullException(nameof(userNotifier));
            }
            if (serversEditorViewFactory == null)
            {
                throw new ArgumentNullException(nameof(serversEditorViewFactory));
            }
            if (debuggingWindowFactory == null)
            {
                throw new ArgumentNullException(nameof(debuggingWindowFactory));
            }
            if (newsViewModelFactory == null)
            {
                throw new ArgumentNullException(nameof(newsViewModelFactory));
            }
            if (wurmAssistantDataDirectory == null)
            {
                throw new ArgumentNullException(nameof(wurmAssistantDataDirectory));
            }
            if (wurmAssistantConfig == null)
            {
                throw new ArgumentNullException(nameof(wurmAssistantConfig));
            }
            if (environment == null)
            {
                throw new ArgumentNullException(nameof(environment));
            }
            if (wurmClientValidatorFactory == null)
            {
                throw new ArgumentNullException(nameof(wurmClientValidatorFactory));
            }
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (optionsFormFactory == null)
            {
                throw new ArgumentNullException(nameof(optionsFormFactory));
            }
            if (dataBackupsViewModelFactory == null)
            {
                throw new ArgumentNullException(nameof(dataBackupsViewModelFactory));
            }
            if (windowManager == null)
            {
                throw new ArgumentNullException(nameof(windowManager));
            }
            this.processStarter             = processStarter;
            this.userNotifier               = userNotifier;
            this.serversEditorViewFactory   = serversEditorViewFactory;
            this.debuggingWindowFactory     = debuggingWindowFactory;
            this.newsViewModelFactory       = newsViewModelFactory;
            this.wurmAssistantDataDirectory = wurmAssistantDataDirectory;
            this.wurmAssistantConfig        = wurmAssistantConfig;
            this.environment = environment;
            this.wurmClientValidatorFactory = wurmClientValidatorFactory;
            this.logger                      = logger;
            this.optionsFormFactory          = optionsFormFactory;
            this.dataBackupsViewModelFactory = dataBackupsViewModelFactory;
            this.windowManager               = windowManager;

            InitializeComponent();

            debugToolStripMenuItem.Visible = false;
#if DEBUG
            debugToolStripMenuItem.Visible = true;
#endif
        }