Skip to content

Commit efd9cc2

Browse files
Remove tabs
1 parent 193ecbc commit efd9cc2

File tree

2 files changed

+78
-88
lines changed

2 files changed

+78
-88
lines changed

FileHider/FileHider.csproj

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<Nullable>enable</Nullable>
5+
<LangVersion>latest</LangVersion>
6+
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<AvaloniaResource Include="Assets\**" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
15+
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
16+
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.0" />
17+
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />
18+
19+
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
20+
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
21+
</ItemGroup>
22+
23+
<ItemGroup>
24+
<ProjectReference Include="..\FileHider.Lib\FileHider.Lib.csproj" />
25+
</ItemGroup>
26+
</Project>

FileHider/Views/MainView.axaml

Lines changed: 52 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,12 @@
1212
<vm:MainViewModel />
1313
</Design.DataContext>
1414
<UserControl.Styles>
15-
<Style Selector="TabControl WrapPanel">
16-
<Setter Property="MaxHeight" Value="32"/>
17-
<Setter Property="Margin" Value="0, 0, 0, 5"/>
18-
</Style>
19-
<Style Selector="TabControl > TextBlock">
20-
<Setter Property="FontSize" Value="12"/>
21-
</Style>
22-
<Style Selector="Label">
23-
<Setter Property="VerticalAlignment" Value="Center"/>
24-
</Style>
15+
2516
</UserControl.Styles>
2617

2718
<Grid Margin="5">
2819
<Grid.RowDefinitions>
20+
<RowDefinition Height="Auto"/>
2921
<RowDefinition Height="Auto"/>
3022
<RowDefinition Height="10"/>
3123
<RowDefinition Height="*"/>
@@ -38,7 +30,7 @@
3830
<ColumnDefinition Width="Auto"/>
3931
<ColumnDefinition Width="Auto"/>
4032
</Grid.ColumnDefinitions>
41-
<Label Grid.Column="0"
33+
<Label Grid.Column="0"
4234
Margin="2, 2, 5, 2">Input file: </Label>
4335
<TextBox Grid.Column="1"
4436
Height="24"
@@ -52,86 +44,58 @@
5244
Command="{Binding HideFilesCommand}"
5345
Margin="5, 0">Hide Files</Button>
5446
</Grid>
55-
<ProgressBar Grid.Row="1"
47+
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0, 5">
48+
<Label Grid.Column="0"
49+
Margin="0, 0, 5, 0">Compression Level: </Label>
50+
<ComboBox Grid.Column="1"
51+
Name="CompressionLevelComboBox"
52+
ItemsSource="{Binding CompressionLevels}"
53+
SelectedItem="{Binding SelectedCompressionLevel}"/>
54+
</StackPanel>
55+
<ProgressBar Grid.Row="2"
5656
Margin="5"
5757
Value="{Binding PercentDone}"
5858
IsVisible="{Binding IsRunning}"/>
59-
<TabControl Grid.Row="2">
60-
<TabItem Name="FilesList" Header="File View">
61-
<Grid>
62-
<Grid.RowDefinitions>
63-
<RowDefinition Height="48"/>
64-
<RowDefinition Height="Auto"/>
65-
</Grid.RowDefinitions>
66-
<Grid Grid.Row="0">
67-
<Grid.ColumnDefinitions>
68-
<ColumnDefinition/>
69-
<ColumnDefinition/>
70-
</Grid.ColumnDefinitions>
71-
<StackPanel Grid.Column="0"
72-
Orientation="Horizontal"
73-
Margin="0, 5">
74-
<Button Command="{Binding AddFilesCommand}"
75-
Margin="5, 0">Add files</Button>
76-
<Button Command="{Binding AddDirCommand}"
77-
Margin="5, 0">Add folder</Button>
78-
<Button Command="{Binding RemoveCommand}"
79-
Margin="5, 0">Remove</Button>
80-
<Button Command="{Binding RemoveAllCommand}"
81-
Margin="5, 0">Remove All</Button>
82-
<Button Command="{Binding BackCommand}"
83-
Margin="5, 0">Back</Button>
84-
</StackPanel>
85-
<StackPanel Grid.Column="1"
86-
Orientation="Horizontal"
87-
FlowDirection="RightToLeft">
88-
</StackPanel>
89-
</Grid>
90-
<ListBox Grid.Row="1"
91-
Name="FilesListBox"
92-
ItemsSource="{Binding Files.CurrentDirectory.Children}"
93-
SelectedItem="{Binding SelectedItem}"
94-
DoubleTapped="FilesList_DoubleTap">
95-
<ListBox.ItemTemplate>
96-
<DataTemplate>
97-
<TextBlock Text="{Binding Name}"/>
98-
</DataTemplate>
99-
</ListBox.ItemTemplate>
100-
</ListBox>
101-
</Grid>
102-
</TabItem>
103-
<TabItem Name="Options" Header="Options">
104-
<StackPanel Margin="5, 15, 5, 5" HorizontalAlignment="Center" VerticalAlignment="Center">
105-
<!--To-do: implement password protection-->
106-
<!--<Grid>
107-
<Grid.ColumnDefinitions>
108-
<ColumnDefinition Width="48"/>
109-
<ColumnDefinition Width="120"/>
110-
<ColumnDefinition/>
111-
</Grid.ColumnDefinitions>
112-
<CheckBox Grid.Column="0"
113-
Name="IsEnabledCheckBox"
114-
IsChecked="{Binding Options.IsPasswordProtected}"/>
115-
<Label Grid.Column="1">Password: </Label>
116-
<TextBox Grid.Column="2"
117-
Text="{Binding Options.Password}"
118-
IsEnabled="{Binding Options.IsPasswordProtected}"/>
119-
</Grid>-->
120-
<Grid>
121-
<Grid.ColumnDefinitions>
122-
<ColumnDefinition/>
123-
<ColumnDefinition/>
124-
</Grid.ColumnDefinitions>
125-
<Label Grid.Column="0"
126-
Margin="0, 0, 5, 0">Compression Level: </Label>
127-
<ComboBox Grid.Column="1"
128-
Name="CompressionLevelComboBox"
129-
ItemsSource="{Binding CompressionLevels}"
130-
SelectedItem="{Binding SelectedCompressionLevel}"/>
131-
</Grid>
59+
<Grid Grid.Row="2">
60+
<Grid.RowDefinitions>
61+
<RowDefinition Height="48"/>
62+
<RowDefinition Height="Auto"/>
63+
</Grid.RowDefinitions>
64+
<Grid Grid.Row="0">
65+
<Grid.ColumnDefinitions>
66+
<ColumnDefinition/>
67+
<ColumnDefinition/>
68+
</Grid.ColumnDefinitions>
69+
<StackPanel Grid.Column="0"
70+
Orientation="Horizontal"
71+
Margin="0, 5">
72+
<Button Command="{Binding AddFilesCommand}"
73+
Margin="5, 0">Add files</Button>
74+
<Button Command="{Binding AddDirCommand}"
75+
Margin="5, 0">Add folder</Button>
76+
<Button Command="{Binding RemoveCommand}"
77+
Margin="5, 0">Remove</Button>
78+
<Button Command="{Binding RemoveAllCommand}"
79+
Margin="5, 0">Remove All</Button>
80+
<Button Command="{Binding BackCommand}"
81+
Margin="5, 0">Back</Button>
13282
</StackPanel>
133-
</TabItem>
134-
</TabControl>
135-
83+
<StackPanel Grid.Column="1"
84+
Orientation="Horizontal"
85+
FlowDirection="RightToLeft">
86+
</StackPanel>
87+
</Grid>
88+
<ListBox Grid.Row="1"
89+
Name="FilesListBox"
90+
ItemsSource="{Binding Files.CurrentDirectory.Children}"
91+
SelectedItem="{Binding SelectedItem}"
92+
DoubleTapped="FilesList_DoubleTap">
93+
<ListBox.ItemTemplate>
94+
<DataTemplate>
95+
<TextBlock Text="{Binding Name}"/>
96+
</DataTemplate>
97+
</ListBox.ItemTemplate>
98+
</ListBox>
99+
</Grid>
136100
</Grid>
137101
</UserControl>

0 commit comments

Comments
 (0)