-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0b9249
commit 96cf497
Showing
17 changed files
with
368 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Windows.Controls; | ||
using System.Windows.Media; | ||
|
||
namespace Greed.Controls.Settings | ||
{ | ||
public class CheckBoxBox : SettingsBox | ||
{ | ||
private readonly CheckBox ChkSetter; | ||
|
||
public CheckBoxBox(string name, int groupIndex, int subIndex, int posIndex, bool isChecked) : base(name, groupIndex, subIndex, posIndex) | ||
{ | ||
ChkSetter = new CheckBox() | ||
{ | ||
IsChecked = isChecked, | ||
Margin = new System.Windows.Thickness(10, 6, 0, 0), | ||
Foreground = new SolidColorBrush(Color.FromRgb(255, 157, 160)), | ||
}; | ||
ChkSetter.Checked += ChkSetter_Checked; | ||
ChkSetter.Unchecked += ChkSetter_Unchecked; | ||
|
||
GrdContent.Children.Add(ChkSetter); | ||
} | ||
|
||
private void ChkSetter_Checked(object sender, System.Windows.RoutedEventArgs e) | ||
{ | ||
Greed.Utils.Settings.SetBool(GroupIndex, ArrayIndex, true); | ||
} | ||
|
||
private void ChkSetter_Unchecked(object sender, System.Windows.RoutedEventArgs e) | ||
{ | ||
Greed.Utils.Settings.SetBool(GroupIndex, ArrayIndex, false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Windows.Controls; | ||
using System.Windows.Media; | ||
|
||
namespace Greed.Controls.Settings | ||
{ | ||
public class SettingsBox : GroupBox | ||
{ | ||
public const int BoxSpacing = 50; | ||
public int GroupIndex; | ||
public int ArrayIndex; | ||
public int PositionIndex; | ||
protected readonly Grid GrdContent; | ||
|
||
public SettingsBox(string name, int groupIndex, int subIndex, int positionIndex) | ||
{ | ||
GroupIndex = groupIndex; | ||
ArrayIndex = subIndex; | ||
PositionIndex = positionIndex; | ||
|
||
Header = name; | ||
Height = 53; | ||
VerticalAlignment = System.Windows.VerticalAlignment.Top; | ||
BorderBrush = new SolidColorBrush(Color.FromRgb(255, 200, 210)); | ||
Margin = new System.Windows.Thickness(0, positionIndex * BoxSpacing, 0, 0); | ||
|
||
GrdContent = new Grid(); | ||
AddChild(GrdContent); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.