Files
Wand-Enhancer-luanslimadev-1/WandEnhancer/View/Popups/PatchVectorsPopup.xaml.cs
T
2026-03-30 21:39:06 +03:00

51 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using WandEnhancer.Models;
using WandEnhancer.View.Controls;
namespace WandEnhancer.View.Popups
{
public partial class PatchVectorsPopup : UserControl
{
private readonly Action<PatchConfig> _onApply;
public PatchVectorsPopup(Action<PatchConfig> onApply)
{
_onApply = onApply;
InitializeComponent();
}
private void OnPatchButtonClick(object sender, RoutedEventArgs e)
{
if (ActivateProBox.IsChecked != true && DisableUpdateBox.IsChecked != true &&
DevToolsHotkeyBox.IsChecked != true)
{
return;
}
var result = new HashSet<EPatchType>();
if (ActivateProBox.IsChecked == true)
{
result.Add(EPatchType.ActivatePro);
}
if (DisableUpdateBox.IsChecked == true)
{
result.Add(EPatchType.DisableUpdates);
}
if (DevToolsHotkeyBox.IsChecked == true)
{
result.Add(EPatchType.DevToolsOnF12);
}
_onApply(new PatchConfig
{
PatchTypes = result,
AutoApplyPatches =/* AutoUpdates.IsChecked == true*/ false
});
}
}
}