Skip to content

Commit

Permalink
v1.0.33
Browse files Browse the repository at this point in the history
Hintergrundfunktionen:
+ Änderung: Text "Sprachauswahl" ist keine Frage mehr. Anpassung der Funktion erfolgt später: Die Sprache soll zwar änderbar sein, jedoch erfolgt die Einstellung aus Omni heraus.
+ Änderung: Es werden Standardmäßig nur Aufträge mit dem Status "In Bearbeitung" angezeigt und nicht mehr alle. Dies kann über die Filterfunktion geändert werden.
+ Neue Funktion: Neue Einstellung: "Temporäre Berichtdateien löschen". Löscht alle editierbaren *_.pdf und *.pdf Dateien aus den Berichtverzeichnissen und behält nur die *_final.pdf* Dateien nach Fertigstellung. Ein Abschalten belässt diese Berichtdateien im Pfad.
+ Fehlerbehebung: InfoBar: "geöffneten Bericht wieder schließen" und Fortschrittverhinderung wenn dieser noch geöffnet ist. Dies verhindert ein "Steckenbleiben" wegen einer Zugriffsverweigerung auf die geöffnete PDF Datei.
+ Fehlerbehebung: "Schritt-Icon's" im linken Menüband (Häuschen-Icon und 1,2,3 - Icons) sind nicht mehr zur Navigation vorgesehen. Dies verhindert ein Springen zwischen Schritten wenn der Kartenleser noch beschäftigt ist.
+ Fehlerbehebung: Solange ein Bericht geöffnet ist, kann nicht von Schritt 2 auf Schritt 3 gewechselt werden.
+ Fehlerbehebung: Ein Prüfvorgang kann nicht gestartet werden, wenn der Bericht bereits exitiert und nicht überschrieben werden kann oder werden soll.
  • Loading branch information
c3rebro committed Nov 21, 2023
1 parent 3fca401 commit a517211
Show file tree
Hide file tree
Showing 22 changed files with 819 additions and 227 deletions.
2 changes: 1 addition & 1 deletion CardCheckAssistant/CardCheckAssistant.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ v1.0.20
<Title>CardCheckAssistant</Title>
<Company>Messgeraetetechnik Hansen</Company>
<Authors>Steven Hansen</Authors>
<AssemblyVersion>1.0.32</AssemblyVersion>
<AssemblyVersion>1.0.33</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<AppInstallerUri>https://github.com/c3rebro/CardCheckAssistant/releases/latest/download</AppInstallerUri>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
10 changes: 10 additions & 0 deletions CardCheckAssistant/DataAccessLayer/DefaultSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@ public string? LastUsedProjectPath
}
private string? _lastUsedProjectPath;

/// <summary>
///
/// </summary>
public bool? RemoveTemporaryReportsIsEnabled
{
get => _removeTemporaryReportsIsEnabled;
set => _removeTemporaryReportsIsEnabled = value;
}
private bool? _removeTemporaryReportsIsEnabled;

/// <summary>
///
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions CardCheckAssistant/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Name="Root">
<Grid Name="Root" Width="auto" Height="auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
Expand Down Expand Up @@ -89,7 +89,7 @@
</MenuBarItem>
</MenuBar>
-->
<local:Shell x:Name="RootShell" Margin="0 15 0 0" Grid.Row="2"/>
<local:Shell x:Name="RootShell" Width="auto" Height="auto" Margin="0 15 0 0" Grid.Row="2"/>

</Grid>
</Window>
31 changes: 31 additions & 0 deletions CardCheckAssistant/Models/LSMCardTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,37 @@ public LSMCardTemplate(string templateText, string templateToolTip)
TemplateToolTip = templateToolTip;
}

/// <summary>
///
/// </summary>
/// <param name="templateText"></param>
/// <param name="templateToolTip"></param>
/// <param name="freeBytes"></param>
/// <param name="freeSectors"></param>
public LSMCardTemplate(string templateText, string templateToolTip, int freeBytes, int freeSectors)
{
TemplateText = templateText;
TemplateToolTip = templateToolTip;
SizeInBytes = freeBytes;
SizeInFreeSectorsCount = freeSectors;
}

/// <summary>
///
/// </summary>
public int SizeInBytes
{
get; set;
}

/// <summary>
///
/// </summary>
public int SizeInFreeSectorsCount
{
get; set;
}

/// <summary>
///
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion CardCheckAssistant/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Identity
Name="CardCheckAssistant"
Publisher="CN=Steven Hansen"
Version="1.0.32.0" />
Version="1.0.33.0" />

<Properties>
<DisplayName>CardCheckAssistant</DisplayName>
Expand Down
11 changes: 9 additions & 2 deletions CardCheckAssistant/Shell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}">
<NavigationView.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Margin="-35 -30 0 0"/>
<TextBlock
Text="{Binding}"
Margin="-35 -30 0 0"
Width="auto"/>
</DataTemplate>
</NavigationView.HeaderTemplate>

<NavigationView.MenuItems>
<NavigationViewItem Content="Start"
IsHitTestVisible="False"
Tag="CardCheckAssistant.Views.HomePage"
ToolTipService.ToolTip="Start">
<NavigationViewItem.Icon>
Expand All @@ -40,6 +44,7 @@

<NavigationViewItem Content="Schritt 1"
Width="auto"
IsHitTestVisible="False"
Tag="CardCheckAssistant.Views.Step1Page"
ToolTipService.ToolTip="Schritt 1">
<NavigationViewItem.Icon>
Expand All @@ -49,6 +54,7 @@
</NavigationViewItem>

<NavigationViewItem Content="Schritt 2"
IsHitTestVisible="False"
Tag="CardCheckAssistant.Views.Step2Page"
ToolTipService.ToolTip="Schritt 2">
<NavigationViewItem.Icon>
Expand All @@ -58,6 +64,7 @@
</NavigationViewItem>

<NavigationViewItem Content="Schritt 3"
IsHitTestVisible="False"
Tag="CardCheckAssistant.Views.Step3Page"
ToolTipService.ToolTip="Schritt 3">
<NavigationViewItem.Icon>
Expand All @@ -79,7 +86,7 @@
</NavigationView.FooterMenuItems>

<Frame x:Name="ContentFrame"
Padding="5" Margin="0 -20 0 -70" >
Margin="0 0 0 0" >
<Frame.ContentTransitions>
<TransitionCollection>
<NavigationThemeTransition>
Expand Down
4 changes: 2 additions & 2 deletions CardCheckAssistant/Shell.xaml.Navigation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public void SetCurrentNavigationViewItem(NavigationViewItem item)
if (Type.GetType(item.Tag.ToString()) != null)
{
ContentFrame.Navigate(Type.GetType(item.Tag.ToString()), item.Content);
NavigationView.Header = item.Content;
NavigationView.SelectedItem = item;
}

NavigationView.Header = item.Content;
}

public NavigationViewItem GetCurrentNavigationViewItem()
Expand Down
122 changes: 122 additions & 0 deletions CardCheckAssistant/ViewModels/AboutPageViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;

using Microsoft.UI.Xaml;

using CardCheckAssistant.Views;

using Log4CSharp;

using System.Windows.Input;

namespace CardCheckAssistant.ViewModels;

/// <summary>
///
/// </summary>
public class AboutPageViewModel : ObservableObject
{
/// <summary>
///
/// </summary>
public AboutPageViewModel()
{
NextStepCanExecute = false;
GoBackCanExecute = true;
}

#region ObservableObjects

/// <summary>
///
/// </summary>
public bool NextStepCanExecute
{
get => _nextStepCanExecute;
set => SetProperty(ref _nextStepCanExecute, value);
}
private bool _nextStepCanExecute;

/// <summary>
///
/// </summary>
public bool GoBackCanExecute
{
get => _goBackCanExecute;
set => SetProperty(ref _goBackCanExecute, value);
}
private bool _goBackCanExecute;

#endregion

#region Commands

/// <summary>
///
/// </summary>
public ICommand PostPageLoadedCommand => new AsyncRelayCommand(PostPageLoadedCommand_Executed);

/// <summary>
///
/// </summary>
public ICommand NavigateNextStepCommand => new RelayCommand(NavigateNextStepCommand_Executed);

/// <summary>
///
/// </summary>
public ICommand NavigateBackCommand => new RelayCommand(NavigateBackCommand_Executed);

#endregion

#region Extension Methods

/// <summary>
///
/// </summary>
/// <returns></returns>
private async Task PostPageLoadedCommand_Executed()
{
try
{

}
catch (Exception e)
{
LogWriter.CreateLogEntry(e);
}
}

#endregion

/// <summary>
///
/// </summary>
/// <returns></returns>
private async void NavigateNextStepCommand_Executed()
{
try
{
var window = (Application.Current as App)?.Window as MainWindow ?? new MainWindow();
var navigation = window.Navigation;
var step2Page = navigation.GetNavigationViewItems(typeof(Step2Page)).First();
navigation.SetCurrentNavigationViewItem(step2Page);
step2Page.IsEnabled = true;
}

catch (Exception e)
{
LogWriter.CreateLogEntry(e);
}
}

/// <summary>
///
/// </summary>
private void NavigateBackCommand_Executed()
{
var window = (Application.Current as App)?.Window as MainWindow ?? new MainWindow();
var navigation = window.Navigation;
var homePage = navigation.GetNavigationViewItems(typeof(HomePage)).First();
navigation.SetCurrentNavigationViewItem(homePage);
}
}
10 changes: 7 additions & 3 deletions CardCheckAssistant/ViewModels/HomePageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public HomePageViewModel()
scanDBTimer.Interval = new TimeSpan(0,0,10);
scanDBTimer.Stop();

SelectedFilter = "All";
SelectedFilter = "InProgress";
SelectedSort = "JobNumber";

ButtonStartCheckContent = ResourceLoaderService.GetResource("buttonContentStartCheck");
Expand All @@ -59,7 +59,7 @@ public HomePageViewModel()

#endif

// Select First "InProgress" Job if any
// Select First "InProgress" Job... if any
if (DataGridItemCollection != null && _dataGridItemCollection.Any())
{
if (DataGridItemCollection.Any(x => x.Status == "InProgress"))
Expand Down Expand Up @@ -502,7 +502,11 @@ private async Task PostPageLoadedCommand_Executed()

if (cardCheckProcessesFromCache != null)
{
DataGridItemCollection = cardCheckProcessesFromCache;
DataGridItemCollection = FilterData(cardCheckProcessesFromCache, SelectedFilter);
}
else
{
return;
}

ModalView.Dialogs.Where(x => x.Name == "connectWaitMsgDlg").Single().Hide();
Expand Down
23 changes: 19 additions & 4 deletions CardCheckAssistant/ViewModels/SettingsPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ public SettingsPageViewModel()
SelectedDBUsername = settings.DefaultSettings.SelectedDBUsername;
CardCheckUseSQLLite = settings.DefaultSettings.CardCheckUseMSSQL;
CreateSubdirectoryIsEnabled = settings.DefaultSettings.CreateSubdirectoryIsEnabled;
RemoveTemporaryReportsIsEnabled = settings.DefaultSettings.RemoveTemporaryReportsIsEnabled;

SelectedDBUserPwd = enc.Decrypt(settings.DefaultSettings.SelectedDBUserPwd);
SelectedDBUserPwd = enc.Decrypt(settings?.DefaultSettings?.SelectedDBUserPwd ?? "NoPWD");
}
catch (Exception ex)
{
Expand Down Expand Up @@ -167,6 +168,20 @@ public string? SelectedRFIDGearPath
}
private string? _selectedRFIDGearPath;

public bool? RemoveTemporaryReportsIsEnabled
{
get => _removeTemporaryReportsIsEnabled;
set
{
SetProperty(ref _removeTemporaryReportsIsEnabled, value);
using SettingsReaderWriter settings = new SettingsReaderWriter();

settings.DefaultSettings.RemoveTemporaryReportsIsEnabled = value;
settings.SaveSettings();
}
}
private bool? _removeTemporaryReportsIsEnabled;

public bool? CreateSubdirectoryIsEnabled
{
get => _createSubdirectoryIsEnabled;
Expand Down Expand Up @@ -337,9 +352,9 @@ private void NavigateBackCommand_Executed()
{
var window = (Application.Current as App)?.Window as MainWindow ?? new MainWindow();
var navigation = window.Navigation;
var step1Page = navigation.GetNavigationViewItems(typeof(Step1Page)).First();
navigation.SetCurrentNavigationViewItem(step1Page);
step1Page.IsEnabled = true;
var homePage = navigation.GetNavigationViewItems(typeof(HomePage)).First();
navigation.SetCurrentNavigationViewItem(homePage);
homePage.IsEnabled = true;
}

private class RijndaelEnc : IDisposable
Expand Down
Loading

0 comments on commit a517211

Please sign in to comment.