mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[TUI] Add current path.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Aaru" type="DotNetProject" factoryName=".NET Project">
|
||||
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru/bin/Debug/net10.0/osx-arm64/aaru" />
|
||||
<option name="PROGRAM_PARAMETERS" value="i info mf2hd.aif" />
|
||||
<option name="WORKING_DIRECTORY" value="/Volumes/AaruTests/Media image formats/AaruFormat/V2" />
|
||||
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru/bin/Debug/net10.0/win-x64/aaru.exe" />
|
||||
<option name="PROGRAM_PARAMETERS" value="m dump /dev/sdb testlib.aif" />
|
||||
<option name="WORKING_DIRECTORY" value="/mnt/datos/" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="ENV_FILE_PATHS" value="" />
|
||||
<option name="REDIRECT_INPUT_PATH" value="" />
|
||||
|
||||
@@ -17,6 +17,8 @@ public sealed partial class MainWindowViewModel : ViewModelBase
|
||||
[ObservableProperty]
|
||||
public string _copyright;
|
||||
[ObservableProperty]
|
||||
public string _currentPath;
|
||||
[ObservableProperty]
|
||||
ObservableCollection<FileModel> _files = [];
|
||||
[ObservableProperty]
|
||||
public string _informationalVersion;
|
||||
@@ -44,6 +46,8 @@ public sealed partial class MainWindowViewModel : ViewModelBase
|
||||
|
||||
public void LoadComplete()
|
||||
{
|
||||
CurrentPath = Directory.GetCurrentDirectory();
|
||||
|
||||
var parentDirectory = new FileModel
|
||||
{
|
||||
Filename = "..",
|
||||
@@ -67,8 +71,7 @@ public sealed partial class MainWindowViewModel : ViewModelBase
|
||||
}))
|
||||
Files.Add(model);
|
||||
|
||||
foreach(string file in
|
||||
Directory.GetFiles(Directory.GetCurrentDirectory(), "*", SearchOption.TopDirectoryOnly))
|
||||
foreach(string file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*", SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
var model = new FileModel
|
||||
{
|
||||
|
||||
@@ -43,21 +43,42 @@
|
||||
<console:LineBrush LineStyle="DoubleLine"
|
||||
Brush="Blue" />
|
||||
</Border.BorderBrush>
|
||||
<Grid RowDefinitions="*"
|
||||
<Grid RowDefinitions="*,Auto"
|
||||
VerticalAlignment="Top">
|
||||
<StackPanel Grid.Row="0"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock Text="Aaru Data Preservation Suite"
|
||||
Foreground="Red"
|
||||
FontWeight="Bold" />
|
||||
<TextBlock Text="{Binding InformationalVersion}"
|
||||
Foreground="Green"
|
||||
FontWeight="Bold" />
|
||||
<TextBlock Text="{Binding Copyright}"
|
||||
Foreground="Blue"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
<Border Grid.Row="0"
|
||||
BorderThickness="1">
|
||||
<Border.BorderBrush>
|
||||
<console:LineBrush LineStyle="DoubleLine"
|
||||
Brush="Blue" />
|
||||
</Border.BorderBrush>
|
||||
<StackPanel VerticalAlignment="Top"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock Text="Aaru Data Preservation Suite"
|
||||
Foreground="Red"
|
||||
FontWeight="Bold" />
|
||||
<TextBlock Text="{Binding InformationalVersion}"
|
||||
Foreground="Green"
|
||||
FontWeight="Bold" />
|
||||
<TextBlock Text="{Binding Copyright}"
|
||||
Foreground="Blue"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1"
|
||||
BorderThickness="1">
|
||||
<Border.BorderBrush>
|
||||
<console:LineBrush LineStyle="DoubleLine"
|
||||
Brush="Blue" />
|
||||
</Border.BorderBrush>
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
<TextBlock Grid.Column="0"
|
||||
Text="Path: "
|
||||
Foreground="SlateBlue" />
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding CurrentPath}"
|
||||
Foreground="Green" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user