diff --git a/ChromeDevExtWarningPatcher/ChromeDevExtWarningPatcher.csproj b/ChromeDevExtWarningPatcher/ChromeDevExtWarningPatcher.csproj index 93d5b6a..1cf21ce 100644 --- a/ChromeDevExtWarningPatcher/ChromeDevExtWarningPatcher.csproj +++ b/ChromeDevExtWarningPatcher/ChromeDevExtWarningPatcher.csproj @@ -82,6 +82,7 @@ + diff --git a/ChromeDevExtWarningPatcher/CustomCheckBox.cs b/ChromeDevExtWarningPatcher/CustomCheckBox.cs new file mode 100644 index 0000000..1d47f83 --- /dev/null +++ b/ChromeDevExtWarningPatcher/CustomCheckBox.cs @@ -0,0 +1,30 @@ +using System; +using System.Windows.Controls; +using System.Windows.Media; + +namespace ChromeDevExtWarningPatcher { + class CustomCheckBox : CheckBox { + public int Group; + + public CustomCheckBox(string text, string tooltip, int group) : base() { + Content = text; + Foreground = BorderBrush = new SolidColorBrush(Color.FromRgb(202, 62, 71)); + Group = group; + + if (tooltip != null) + ToolTip = tooltip; + } + + public CustomCheckBox(GuiPatchGroupData patchGroupData) : this(patchGroupData.Name, patchGroupData.Tooltip, patchGroupData.Group) { + IsChecked = patchGroupData.Default; + } + + public CustomCheckBox(string text) : this(text, null, -1) {} + } + + struct GuiPatchGroupData { + public string Name, Tooltip; + public int Group; + public bool Default; + } +} diff --git a/ChromeDevExtWarningPatcher/PatcherGui.xaml b/ChromeDevExtWarningPatcher/PatcherGui.xaml index 108b456..53f344e 100644 --- a/ChromeDevExtWarningPatcher/PatcherGui.xaml +++ b/ChromeDevExtWarningPatcher/PatcherGui.xaml @@ -38,12 +38,7 @@ - - - - - - +