Skip to content

Commit

Permalink
version 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Armin2208 committed Jul 21, 2019
1 parent f125baa commit fb1b7e1
Show file tree
Hide file tree
Showing 15 changed files with 161 additions and 680 deletions.
2 changes: 1 addition & 1 deletion AutoThemeChanger/AboutWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</Grid.ColumnDefinitions>

<!-- Info -->
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Auto Dark Mode Version 2.2" VerticalAlignment="Top" FontWeight="Bold" FontSize="16" Height="21" Width="246" Margin="10,0,0,0"/>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Auto Dark Mode Version 2.3" VerticalAlignment="Top" FontWeight="Bold" FontSize="16" Height="21" Width="246" Margin="10,0,0,0"/>
<TextBlock HorizontalAlignment="Left" Margin="10,25,0,0" TextWrapping="Wrap" Text="{x:Static p:Resources.lblAuthor}" VerticalAlignment="Top" Height="16" Width="251"/>

<!-- Social Media links-->
Expand Down
3 changes: 3 additions & 0 deletions AutoThemeChanger/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<setting name="connectedStandby" serializeAs="String">
<value>False</value>
</setting>
<setting name="FirstRun" serializeAs="String">
<value>True</value>
</setting>
</AutoThemeChanger.Properties.Settings>
</userSettings>
</configuration>
2 changes: 1 addition & 1 deletion AutoThemeChanger/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<!-- Desktop Background -->
<TextBlock Grid.Row="3" Grid.ColumnSpan="5" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="{x:Static p:Resources.dbMainHeader}" VerticalAlignment="Top" FontWeight="Bold" FontSize="16" Height="Auto" Width="Auto"/>
<TextBlock Grid.Row="3" Grid.ColumnSpan="5" HorizontalAlignment="Left" Margin="14,36,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontFamily="Segoe MDL2 Assets" Text="&#xEB9F;" Height="29" Width="32" FontSize="25"/>
<Button Grid.Row="3" Grid.ColumnSpan="5" x:Name="BGWinButton" Content="{x:Static p:Resources.dbTitle}" HorizontalAlignment="Left" Margin="51,36,0,0" VerticalAlignment="Top" Width="Auto" Click="BGWinButton_Click" Height="20"/>
<Button Grid.Row="3" Grid.ColumnSpan="5" x:Name="BGWinButton" Content="{x:Static p:Resources.dbTitle}" HorizontalAlignment="Left" Margin="51,36,0,0" VerticalAlignment="Top" MinWidth="180" Width="Auto" Click="BGWinButton_Click" Height="20"/>
<TextBlock Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left" Margin="55,59,0,0" TextWrapping="Wrap" Text="{x:Static p:Resources.dbCurrently}" VerticalAlignment="Top" FontWeight="Bold" Height="16" Width="Auto"/>
<TextBlock Grid.Row="3" Grid.Column="1" x:Name="DeskBGStatus" HorizontalAlignment="Left" Margin="5,59,0,0" TextWrapping="Wrap" Text="{x:Static p:Resources.disabled}" VerticalAlignment="Top" Height="16" Width="Auto"/>

Expand Down
29 changes: 18 additions & 11 deletions AutoThemeChanger/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@ public MainWindow()
UiHandler();
ThemeChange(this, null);
SourceChord.FluentWPF.SystemTheme.ThemeChanged += ThemeChange;
if (Properties.Settings.Default.FirstRun)
{
SystemTimeFormat();
AddJumpList();
Properties.Settings.Default.FirstRun = false;
}
if (Properties.Settings.Default.AlterTime) AlterTime(true);
}

private void Window_ContentRendered(object sender, EventArgs e)
{
Updater updater = new Updater();
updater.CheckNewVersion();
AddJumpList();
LanguageHelper();
}

Expand All @@ -48,6 +53,16 @@ private void LanguageHelper()
CultureInfo.CurrentUICulture = new CultureInfo(Properties.Settings.Default.Language, true);
}

private void SystemTimeFormat()
{
string sysFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern;
sysFormat = sysFormat.Substring(0, sysFormat.IndexOf(":"));
if (sysFormat.Equals("hh") | sysFormat.Equals("h"))
{
Properties.Settings.Default.AlterTime = true;
}
}

private void ThemeChange(object sender, EventArgs e)
{
if (SourceChord.FluentWPF.SystemTheme.Theme.Equals(SourceChord.FluentWPF.ApplicationTheme.Dark))
Expand Down Expand Up @@ -164,23 +179,15 @@ private void ApplyButton_Click(object sender, RoutedEventArgs e)
}
else
{
if (darkStart >= 13)
if (darkStart >= 12)
{
darkStart = 12;
darkStart = 11;
darkStartMinutes = 59;
}
if (darkStart == 12)
{
darkStartMinutes = 0;
}
if (lightStart >= 13)
{
lightStart = 12;
}
if (lightStart == 12)
{
lightStartMinutes = 0;
}
}

if (lightStartMinutes > 59)
Expand Down
4 changes: 2 additions & 2 deletions AutoThemeChanger/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]
45 changes: 35 additions & 10 deletions AutoThemeChanger/Properties/Resources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@
<value>Anwenden</value>
</data>
<data name="autoCheckBox" xml:space="preserve">
<value>Automatischen Theme-Wechsel aktivieren</value>
<value>Automatischen Design-Wechsel aktivieren</value>
</data>
<data name="cmbAdjTheme" xml:space="preserve">
<value>An das Theme anpassen</value>
<value>An das Design anpassen</value>
</data>
<data name="cmbAlwDark" xml:space="preserve">
<value>Immer dunkel</value>
Expand All @@ -151,7 +151,7 @@
<value>Dunkel</value>
</data>
<data name="lblDarkTheme" xml:space="preserve">
<value>Dunkles Theme</value>
<value>Dunkles Design</value>
</data>
<data name="lblEdge" xml:space="preserve">
<value>Edge:</value>
Expand All @@ -160,13 +160,13 @@
<value>Hell</value>
</data>
<data name="lblLightTheme" xml:space="preserve">
<value>Helles Theme</value>
<value>Helles Design</value>
</data>
<data name="lblSettings" xml:space="preserve">
<value>Einstellungen</value>
</data>
<data name="lblSwitchTheme" xml:space="preserve">
<value>Aktuelles Theme wechseln</value>
<value>Aktuelles Design wechseln</value>
</data>
<data name="lblSystem" xml:space="preserve">
<value>System:</value>
Expand All @@ -193,7 +193,7 @@
<value>Ein Fehler ist aufgetreten :(</value>
</data>
<data name="msgLocPerm" xml:space="preserve">
<value>Die Anwendung braucht Zugriff auf die Standort-Dienste</value>
<value>Die Anwendung benötigt Zugriff auf die Standort-Dienste</value>
</data>
<data name="msgNoUpd" xml:space="preserve">
<value>Keine Updates verfügbar</value>
Expand All @@ -205,7 +205,7 @@
<value>Updates suchen...</value>
</data>
<data name="msgThemeError" xml:space="preserve">
<value>Achtung: Kann aktuelles Theme nicht einlesen.</value>
<value>Achtung: Das aktuelle Design kann nicht eingelesen werden.</value>
</data>
<data name="msgUpdateAvail" xml:space="preserve">
<value>Ein Update ist verfügbar</value>
Expand All @@ -225,7 +225,7 @@ Aktuell installierte Version: {0}, Neue Version: {1}</value>
<value>Updates suchen</value>
</data>
<data name="updateInfoText" xml:space="preserve">
<value>Programm sucht nach Updates beim Start.</value>
<value>Programm sucht beim Start nach Updates.</value>
</data>
<data name="userFeedback" xml:space="preserve">
<value>Willkommen</value>
Expand All @@ -234,7 +234,7 @@ Aktuell installierte Version: {0}, Neue Version: {1}</value>
<value>Aktiviere das Kontrollfeld, um automatisch das Theme zu wechseln!</value>
</data>
<data name="lblTranslator" xml:space="preserve">
<value>Übersetzung: Lee Bartula</value>
<value>Übersetzer: Armin Osaj</value>
</data>
<data name="lblCity" xml:space="preserve">
<value>Stadt</value>
Expand All @@ -249,7 +249,7 @@ Aktuell installierte Version: {0}, Neue Version: {1}</value>
<value>Sprache:</value>
</data>
<data name="cmbAccentColor" xml:space="preserve">
<value>Akzentfarbe für Taskleiste</value>
<value>Akzentfarbe für die Taskleiste</value>
</data>
<data name="cancel" xml:space="preserve">
<value>Abbrechen</value>
Expand Down Expand Up @@ -332,4 +332,29 @@ Aktuell installierte Version: {0}, Neue Version: {1}</value>
<data name="cbBackgroundUpdate" xml:space="preserve">
<value>Im Hintergrund nach Updates suchen</value>
</data>
<data name="cbConnectedStandby" xml:space="preserve">
<value>Design-Wechsel nach Connected Standby</value>
</data>
<data name="cbConnectedStandbyTooltip" xml:space="preserve">
<value>Mobile Geräte, wie Microsoft Surface-Prdukte, nutzen eine neue Art des Energiesparmodus.
Wenn du diese Option aktivierst, wird Auto Dark Mode sofort nach dem Aufwecken deines Computers das Design wechseln.

Jedoch senkt diese Option auch die Akkulaufzeit! Aktiviere sie deshalb nur, wenn es notwendig ist!</value>
</data>
<data name="errorNumberInput" xml:space="preserve">
<value>Fehler: Deine Eingabe ist nicht zulässig.</value>
</data>
<data name="errorThemeApply" xml:space="preserve">
<value>Wir konnten deine Einstellungen leider nicht anwenden :(

Hier sind ein paar Hilfestellungen die du ausprobieren kannst:
- Deinstalliere Auto Dark Mode, danach installiere es neu.
- Probiere Auto Dark Mode als Administrator auszuführen.
- Falls du den automatischen Wechsel vom Desktop Hintergrundbild aktiviert hast, deaktiviere die Funktion und probiere es erneut.

Falls diese Hilfestellungen nicht geholfen haben, kannst du das GitHub-Issue kommentieren. Hänge am besten noch ein Screenshot dieser Fehlermeldung an. Mit einem Klick auf "Ja" gelangst du zu GitHub.</value>
</data>
<data name="msgBatterySaver" xml:space="preserve">
<value>Ein Fehler von Windows verhindert den Design-Wechsel der Taskleiste im Stromsparmodus. Bitte deaktiviere den Stromsparmodus, falls bei dir Probleme auftreten.</value>
</data>
</root>
42 changes: 41 additions & 1 deletion AutoThemeChanger/Properties/Resources.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About" xml:space="preserve">
<value>A riguardo</value>
<value>Impostazioni</value>
</data>
<data name="applyButton" xml:space="preserve">
<value>Applica</value>
Expand Down Expand Up @@ -317,4 +317,44 @@ Versione in uso: {0}, nuova versione: {1}</value>
<data name="info" xml:space="preserve">
<value>Info</value>
</data>
<data name="cb12HourTime" xml:space="preserve">
<value>Orologio in modalità 12 ore</value>
</data>
<data name="cbBackgroundUpdate" xml:space="preserve">
<value>Cerca aggiornamenti in background</value>
</data>
<data name="cbConnectedStandby" xml:space="preserve">
<value>Cambia dopo ConnectedStandby</value>
</data>
<data name="cbConnectedStandbyTooltip" xml:space="preserve">
<value>"Dispositivi mobile, come i prodotti Microsoft Surface, usano una modalità standby differente.
Attivando questa opzione Auto Dark Mode applica il tema subito dopo aver risvegliato il tuo dispositivo.

Controindicazione: consuma più batteria! Attiva SOLO se necessario!"</value>
</data>
<data name="errorNumberInput" xml:space="preserve">
<value>Errore: il tuo input non è valido</value>
</data>
<data name="errorThemeApply" xml:space="preserve">
<value>"Spiacente, non è stato possibile applicare le tue impostazioni.

Ecco come potresti risolvere:
- Disinstalla e reinstalla Auto Dark Mode.
- Esegui Auto Dark Mode come amministratore.
- Se hai attivato gli sfondi desktop, disattiva l'opzione e riprova.

Se ciò non è sufficiente, puoi commentare su GitHub il problema, caricando uno screenshot dell'errore. Puoi inviare l'errore cliccando il pulsante ""Sì"""</value>
</data>
<data name="msgBatterySaver" xml:space="preserve">
<value>A causa di un bug di Windows la taskbar non cambia tema in modalità risparmio energetico. Disattivalo se ti imbatti in errori.</value>
</data>
<data name="msgClose" xml:space="preserve">
<value>Chiudi</value>
</data>
<data name="msgNo" xml:space="preserve">
<value>No</value>
</data>
<data name="MsgYes" xml:space="preserve">
<value>Sì</value>
</data>
</root>
43 changes: 42 additions & 1 deletion AutoThemeChanger/Properties/Resources.pl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About" xml:space="preserve">
<value>O programie</value>
<value>Ustawienia</value>
</data>
<data name="applyButton" xml:space="preserve">
<value>Zastosuj</value>
Expand Down Expand Up @@ -317,4 +317,45 @@ Obecnie zainstalowana wersja: {0}, nowa wersja: {1}</value>
<data name="info" xml:space="preserve">
<value>Informacja</value>
</data>
<data name="cb12HourTime" xml:space="preserve">
<value>Zegar 12-godzinny</value>
</data>
<data name="cbBackgroundUpdate" xml:space="preserve">
<value>Szukaj aktualizacji w tle</value>
</data>
<data name="cbConnectedStandby" xml:space="preserve">
<value>Zmień po obudzeniu z "Connected Standby"</value>
</data>
<data name="cbConnectedStandbyTooltip" xml:space="preserve">
<value>"Urządzenia mobilne, np. Microsoft Surface używają nowego trybu uśpienia.
Ta opcja włącza automatyczną zmianę motywu po obudzeniu komputera,
jednak powoduje szybsze zużycie baterii."</value>
</data>
<data name="errorNumberInput" xml:space="preserve">
<value>Błąd: Wprowadzono nieprawidłowe dane</value>
</data>
<data name="errorThemeApply" xml:space="preserve">
<value>"Przepraszamy, wystąpił błąd podczas zapisywania ustawień.

Zalecamy spróbować:
- Ponowne zainstalowanie AutoDarkMode'a
- Uruchomienie programu jako administrator
- Wyłączyć i ponownie włączyć zmianę tapety

Jeśli to nie pomoże, prosimy o przesłanie zrzutu ekranu błędu na GitHubie.
Kliknij ""Tak"", aby otworzyć stronę GitHub.
"</value>
</data>
<data name="msgBatterySaver" xml:space="preserve">
<value>Z powodu błędu Windowsa zmiana koloru paska zadań w trybie oszczędzania baterii nie działa poprawnie. W przypadku błędów zalecamy wyłączenie tego trybu.</value>
</data>
<data name="msgClose" xml:space="preserve">
<value>Zamknij</value>
</data>
<data name="msgNo" xml:space="preserve">
<value>Nie</value>
</data>
<data name="MsgYes" xml:space="preserve">
<value>Tak</value>
</data>
</root>
12 changes: 12 additions & 0 deletions AutoThemeChanger/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions AutoThemeChanger/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@
<Setting Name="connectedStandby" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="FirstRun" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
6 changes: 0 additions & 6 deletions AutoThemeChanger/RegEditHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@ public void SwitchThemeBasedOnTime()
if (minute < darkStart[1])
{
ThemeToLight();
//Console.WriteLine("Theme to Light");
}
if (minute >= darkStart[1])
{
ThemeToDark();
//Console.WriteLine("Theme to Dark");
}
}
else
{
ThemeToDark();
//Console.WriteLine("Theme to Dark");
}
}
else if (hour >= lightStart[0] || hour < darkStart[0])
Expand All @@ -42,18 +39,15 @@ public void SwitchThemeBasedOnTime()
if(minute < lightStart[1])
{
ThemeToDark();
//Console.WriteLine("Theme to Dark");
}
if(minute >= lightStart[1])
{
ThemeToLight();
//Console.WriteLine("Theme to Light");
}
}
else
{
ThemeToLight();
//Console.WriteLine("Theme to Light");
}
}
}
Expand Down
Loading

0 comments on commit fb1b7e1

Please sign in to comment.