コード例 #1
0
 public ModsPageView(IParkitect parkitect, ILogger log, IPresenter parent, IQueueableTaskManager queueableTaskManager,
                     IWebsite website) : base(parkitect, website, log, AssetType.Mod, parent, "Mods")
 {
     _parkitect            = parkitect;
     _queueableTaskManager = queueableTaskManager;
     _website = website;
 }
コード例 #2
0
        public TasksPageView(IQueueableTaskManager taskManager, IPresenter parent)
        {
            if (!(parent is MainView))
            {
                throw new ArgumentException("parent must be MainView", nameof(parent));
            }

            _mainView = (MainView)parent;

            _taskManager = taskManager;

            taskManager.TaskAdded    += TaskManager_TaskAdded;
            taskManager.TaskRemoved  += TaskManager_TaskRemoved;
            taskManager.TaskFinished += TaskManager_TaskFinished;

            _vBox = new VBox();

            _nothingLabel = new Label("All tasks have been completed. Yay!")
            {
                TextAlignment = Alignment.Center,
                Font          = Font.SystemFont.WithStyle(FontStyle.Italic).WithWeight(FontWeight.Light)
            };
            _vBox.PackStart(_nothingLabel, true, true);

            Content = _vBox;
        }
コード例 #3
0
 public ModsPageView(IParkitect parkitect, ILogger log, IPresenter parent, IQueueableTaskManager queueableTaskManager,
     IWebsite website)
     : base(parkitect, website, log, AssetType.Mod, parent, "Mods")
 {
     _parkitect = parkitect;
     _queueableTaskManager = queueableTaskManager;
     _website = website;
 }
コード例 #4
0
ファイル: CheckForUpdatesTask.cs プロジェクト: calintx3/calin
 public CheckForUpdatesTask(IParkitect parkitect, IWebsite website, ILogger log, IQueueableTaskManager queueableTaskManager) : base("Check for updates")
 {
     _parkitect            = parkitect;
     _website              = website;
     _log                  = log;
     _queueableTaskManager = queueableTaskManager;
     StatusDescription     = "Check for updates.";
 }
コード例 #5
0
 public CheckForUpdatesTask(IParkitect parkitect, IWebsite website, ILogger log, IQueueableTaskManager queueableTaskManager) : base("Check for updates")
 {
     _parkitect = parkitect;
     _website = website;
     _log = log;
     _queueableTaskManager = queueableTaskManager;
     StatusDescription = "Check for updates.";
 }
コード例 #6
0
ファイル: InstallAssetTask.cs プロジェクト: calintx3/calin
        public InstallAssetTask(IParkitect parkitect, IWebsite website, IRemoteAssetRepository remoteAssetRepository,
                                IQueueableTaskManager queueableTaskManager) : base("Install asset")
        {
            _parkitect             = parkitect;
            _website               = website;
            _remoteAssetRepository = remoteAssetRepository;
            _queueableTaskManager  = queueableTaskManager;

            StatusDescription = "Install an asset.";
        }
コード例 #7
0
ファイル: App.cs プロジェクト: calintx3/calin
 public App(IPresenterFactory presenterFactory, IParkitect parkitect, IQueueableTaskManager taskManager,
            ILogger log, IUpdateManager updateManager, Migrator migrator)
 {
     _migrator         = migrator;
     _presenterFactory = presenterFactory;
     _parkitect        = parkitect;
     _taskManager      = taskManager;
     _log           = log;
     _updateManager = updateManager;
 }
コード例 #8
0
        public UpdateModTask(IModAsset mod, IParkitect parkitect, IQueueableTaskManager queueableTaskManager, IWebsite website) : base($"Update mod {mod?.Name}")
        {
            if (mod == null) throw new ArgumentNullException(nameof(mod));
            _mod = mod;
            _parkitect = parkitect;
            _queueableTaskManager = queueableTaskManager;
            _website = website;

            StatusDescription = $"Update mod {mod.Name}";
        }
コード例 #9
0
        public InstallAssetTask(IParkitect parkitect, IWebsite website, IRemoteAssetRepository remoteAssetRepository,
            IQueueableTaskManager queueableTaskManager) : base("Install asset")
        {
            _parkitect = parkitect;
            _website = website;
            _remoteAssetRepository = remoteAssetRepository;
            _queueableTaskManager = queueableTaskManager;

            StatusDescription = "Install an asset.";
        }
コード例 #10
0
 public App(IPresenterFactory presenterFactory, IParkitect parkitect, IQueueableTaskManager taskManager,
     ILogger log, IUpdateManager updateManager, Migrator migrator)
 {
     _migrator = migrator;
     _presenterFactory = presenterFactory;
     _parkitect = parkitect;
     _taskManager = taskManager;
     _log = log;
     _updateManager = updateManager;
 }
コード例 #11
0
ファイル: UpdateModTask.cs プロジェクト: calintx3/calin
        public UpdateModTask(IModAsset mod, IParkitect parkitect, IQueueableTaskManager queueableTaskManager, IWebsite website) : base($"Update mod {mod?.Name}")
        {
            if (mod == null)
            {
                throw new ArgumentNullException(nameof(mod));
            }
            _mod                  = mod;
            _parkitect            = parkitect;
            _queueableTaskManager = queueableTaskManager;
            _website              = website;

            StatusDescription = $"Update mod {mod.Name}";
        }
コード例 #12
0
        internal ExplicitQueueableTaskArgsExpression(IQueueableTaskManager queueableTaskManager,
                                                     ExplicitArgsExpression expression)
        {
            if (queueableTaskManager == null)
            {
                throw new ArgumentNullException(nameof(queueableTaskManager));
            }
            if (expression == null)
            {
                throw new ArgumentNullException(nameof(expression));
            }

            _queueableTaskManager = queueableTaskManager;
            _expression           = expression;
        }
コード例 #13
0
        public TasksPageView(IQueueableTaskManager taskManager, IPresenter parent)
        {
            if (!(parent is MainView))
                throw new ArgumentException("parent must be MainView", nameof(parent));

            _mainView = (MainView) parent;

            _taskManager = taskManager;

            taskManager.TaskAdded += TaskManager_TaskAdded;
            taskManager.TaskRemoved += TaskManager_TaskRemoved;
            taskManager.TaskFinished += TaskManager_TaskFinished;

            _vBox = new VBox();

            _nothingLabel = new Label("All tasks have been completed. Yay!")
            {
                TextAlignment = Alignment.Center,
                Font = Font.SystemFont.WithStyle(FontStyle.Italic).WithWeight(FontWeight.Light)
            };
            _vBox.PackStart(_nothingLabel, true, true);

            Content = _vBox;
        }
コード例 #14
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="T:System.Object" /> class.
 /// </summary>
 internal ExplicitQueueableTasksPropertyExpression(IQueueableTaskManager queueableTaskManager)
 {
     _queueableTaskManager = queueableTaskManager;
 }