Keine Code-Optimierung verwenden
StaticResource "TransparentColor" hinzugefügt
This commit is contained in:
2024-10-14 09:54:06 +02:00
parent 5f2bf8b385
commit e4d3fb2d82
14 changed files with 183 additions and 132 deletions

View File

@@ -60,6 +60,7 @@ public partial class LoginPage : ContentPage {
Preferences.Default.Set("EmployeeId", int.Parse(op.id));
await DisplayAlert("Login erfolgreich", op.name + " " + op.surname, "OK");
await Navigation.PopAsync();
} catch (Exception e) {
await DisplayAlert("Fehler", e.Message, "OK");
}

View File

@@ -17,7 +17,9 @@
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<!--<ToolbarItem Text="Lade Liste" Command="{Binding RefreshListCommand}"/>-->
<ToolbarItem Text="Add" IconImageSource="{StaticResource ToolbarIcon}" Command="{Binding NewEntryCommand}" />
</ContentPage.ToolbarItems>
@@ -51,7 +53,7 @@
<VisualStateGroup Name="CommonStates">
<VisualState Name="Normal">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Transparent}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource TransparentColor}}" />
</VisualState.Setters>
</VisualState>
<VisualState Name="Selected">
@@ -77,7 +79,7 @@
<Label Text="{Binding end}"/>
<Label Text="{Binding GemeindeAktiv.Name}" Margin="10,0,0,0"/>
<Label Text="{Binding ProjektAktiv.Name}" Margin="10,0,0,0"/>
<Label Text="{Binding FreistellungAktiv.Name}" Margin="10,0,0,0"/>
<Label Text="{Binding FreistellungAktiv.Id}" Margin="10,0,0,0"/>
</HorizontalStackLayout>
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding description}" Padding="0,0,0,15"/>

View File

@@ -16,7 +16,9 @@ public partial class StundenPage : ContentPage {
vm.AlertEvent += Vm_AlertEvent;
vm.InfoEvent += Vm_InfoEvent;
}
if (!CheckLogin()) {
NavigateToTargetPage();
}
//// Bildschirmh<6D>he abrufen
//var screenHeight = DeviceDisplay.MainDisplayInfo.Height / DeviceDisplay.MainDisplayInfo.Density;
@@ -37,17 +39,16 @@ public partial class StundenPage : ContentPage {
/// </summary>
protected override void OnAppearing() {
base.OnAppearing();
Title = Preferences.Default.Get("name", "") + " " + Preferences.Default.Get("surname", "");
Title = Preferences.Default.Get("name", "Nicht") + " " + Preferences.Default.Get("surname", "eingeloggt");
}
/// <summary>
/// Das ausgew<65>hlte Datum merken
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
//protected void OnDateSelected(object sender, DateChangedEventArgs e) {
// DateTime selectedDate = e.NewDate;
//}
private bool CheckLogin() {
return Preferences.Default.Get("apiKey", "") != "";
}
private async void NavigateToTargetPage() {
await Navigation.PushAsync(new LoginPage());
}
}