Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit f8a6590

Browse files
authored
Merge pull request #77 from Hexer10/#51_Button_Default_Colors
Added default color values button in settings
2 parents 15284ec + f374bb8 commit f8a6590

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

Interop/OptionsControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public void ReCreateCryptoKey()
164164
Program_CryptoKey = buffer;
165165
}
166166

167-
private void NormalizeSHColors()
167+
public void NormalizeSHColors()
168168
{
169169
SH_Comments = new SerializeableColor(0xFF, 0x57, 0xA6, 0x49);
170170
SH_CommentsMarker = new SerializeableColor(0xFF, 0xFF, 0x20, 0x20);

Interop/TranslationProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ private void FillToEnglishDefaults()
317317
language.Add("ErrorSavingConfigs", "Could not save the current configs state");
318318
language.Add("DuplicateConfigNames", "You cannot have 2 configs or more with the same name.");
319319
language.Add("EmptyConfigNames", "You cannot have configs with an empty name.");
320+
language.Add("DefaultValues", "Default values");
320321
}
321322
}
322323
}

UI/Windows/OptionsWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,255,0,5">
104104

105105
<CheckBox Name="HighlightDeprecateds" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,0,0" Content="Highlight Deprecated (&lt;1.7) Syntax" Checked="HighlightDeprecateds_Changed" Unchecked="HighlightDeprecateds_Changed" />
106-
106+
<Button x:Name="DefaultButton" Margin="528,10,30,852" Click="DefaultButton_Click" Content="Default values" FontWeight="Bold"/>
107107
<components:ColorChangeControl x:Name="SH_Comments" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,40,0,0" Height="105" Width="300" ColorChanged="Comments_Changed" />
108108
<components:ColorChangeControl x:Name="SH_CommentMarkers" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="335,40,5,0" Height="105" Width="300" ColorChanged="CommentMarker_Changed" />
109109

UI/Windows/OptionsWindow.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,13 @@ private void Language_Translate()
622622
SyntaxHighBlock.Text = Program.Translations.GetLanguage("SyntaxHigh");
623623
HighlightDeprecateds.Content = Program.Translations.GetLanguage("HighDeprecat");
624624
AutoSaveBlock.Text = Program.Translations.GetLanguage("AutoSaveMin");
625+
DefaultButton.Content = Program.Translations.GetLanguage("DefaultValues");
626+
}
627+
628+
private void DefaultButton_Click(object sender, RoutedEventArgs e)
629+
{
630+
Program.OptionsObject.NormalizeSHColors();
631+
LoadSH();
625632
}
626633
}
627634

0 commit comments

Comments
 (0)