-> let's use wine for comatibility again -> easier to maintain -> easier to build dynamic options with
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
|
using ModpackUpdater.Apps.Manager.LangRes;
|
|
using ModpackUpdater.Apps.Manager.Ui;
|
|
using Pilz.Plugins.Advanced;
|
|
using Telerik.WinControls.UI;
|
|
|
|
namespace ModpackUpdater.Apps.Manager.Features.Tools;
|
|
|
|
internal class CheckAllActionsHealthyFeature : PluginFunction, IPluginFeatureProvider<CheckAllActionsHealthyFeature>
|
|
{
|
|
public static CheckAllActionsHealthyFeature Instance { get; } = new();
|
|
|
|
public CheckAllActionsHealthyFeature() : base(FeatureTypes.Tools, "origin.checkallactionshearlthy", FeatureNamesLangRes.CheckAllActionsHealthy)
|
|
{
|
|
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.heart_with_pulse, Pilz.UI.Symbols.SymbolSize.Small);
|
|
}
|
|
|
|
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
|
|
{
|
|
if (@params is not MainApiParameters p
|
|
|| p.Api.MainWindow is not MainForm mainForm
|
|
|| mainForm.Controls.Find("radGridView_Actions", true).FirstOrDefault() is not RadGridView gridView)
|
|
return null;
|
|
|
|
SharedFunctions.CheckActionHealthy(p.Api, [.. gridView.Rows]);
|
|
|
|
return null;
|
|
}
|
|
}
|