Skip to content

Commit

Permalink
Finish most basic GUI functionality (expect bugs)
Browse files Browse the repository at this point in the history
  • Loading branch information
romibi committed Jan 12, 2022
1 parent e43228f commit e397eed
Show file tree
Hide file tree
Showing 3 changed files with 668 additions and 539 deletions.
194 changes: 107 additions & 87 deletions ScrapPackedExplorer/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,87 +1,107 @@
<Window x:Name="window" x:Class="ch.romibi.Scrap.Packed.Explorer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ch.romibi.Scrap.Packed.Explorer"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<DockPanel HorizontalAlignment="Left" Height="78" LastChildFill="False" VerticalAlignment="Top">
<Button Name="CreateButton" Width="100" Click="CreateButton_Click" IsEnabled="False">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="50" />
<TextBlock Text="Create"/>
</StackPanel>
</Button>
<Button Name="OpenButton" Width="100" Click="OpenButton_Click">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="50" />
<TextBlock Text="Open"/>
</StackPanel>
</Button>
<Button Name="SaveButton" Width="100" Click="SaveButton_Click" IsEnabled="{Binding Path=PendingChanges, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="50" />
<TextBlock Text="Save"/>
</StackPanel>
</Button>
<!-- Todo: Make proper "Save As" Dropdown -->
<Button Name="SaveDropdownButton" Width="10" IsEnabled="False">
<TextBlock>v</TextBlock>
</Button>
<Separator Width="5"></Separator>
<Button Name="AddButton" Width="100" Click="AddButton_Click" IsEnabled="False">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="50" />
<TextBlock Text="Add"/>
</StackPanel>
</Button>
<Button Name="ExtractToButton" Width="100" Click="ExtractToButton_Click" IsEnabled="{Binding Path=ContentSelected, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="50" />
<TextBlock Text="Extract to"/>
</StackPanel>
</Button>
<Button Name="DeleteButton" Width="100" Click="DeleteButton_Click" IsEnabled="{Binding Path=ContentSelected, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="50" />
<TextBlock Text="Delete"/>
</StackPanel>
</Button>
<Separator Width="5"></Separator>
<Button Name="SearchButton" Width="100" Click="SearchButton_Click" IsEnabled="False">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="50" />
<TextBlock Text="Search"/>
</StackPanel>
</Button>
</DockPanel>
<Grid Margin="0,78,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="0*" MinWidth="100"/>
</Grid.ColumnDefinitions>
<TreeView Name="FileTree" SelectedItemChanged="FileTree_SelectedItemChanged">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate DataType="{x:Type local:TreeEntry}" ItemsSource="{Binding Items}">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<GridSplitter Grid.Column="1" Width="5"/>
<ListView Grid.Column="2" Name="TreeContent" ItemsSource="{Binding Items}" MouseDoubleClick="TreeContent_MouseDoubleClick" SelectionChanged="TreeContent_SelectionChanged">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Name" Width="100"/>
</GridView>
</ListView.View>
</ListView>
<GridSplitter Grid.Column="3" Width="5"/>
<TextBlock Grid.Column="4" Text="Here File information will be displayed" TextWrapping="Wrap"></TextBlock>
</Grid>
</Grid>
</Window>
<Window x:Name="window" x:Class="ch.romibi.Scrap.Packed.Explorer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ch.romibi.Scrap.Packed.Explorer"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<DockPanel HorizontalAlignment="Left" Height="64" LastChildFill="False" VerticalAlignment="Top">
<Button Name="CreateButton" Width="64" Click="CreateButton_Click">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Create"/>
</StackPanel>
</Button>
<Button Name="OpenButton" Width="64" Click="OpenButton_Click">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Open"/>
</StackPanel>
</Button>
<Button Name="SaveButton" Width="64" Click="SaveButton_Click" IsEnabled="{Binding Path=PendingChanges, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Save"/>
</StackPanel>
</Button>
<Button Name="SaveAsButton" Width="64" Click="SaveAsButton_Click" IsEnabled="{Binding Path=ArchiveLoaded, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Save as …"/>
</StackPanel>
</Button>
<!-- Todo: Make proper "Save As" Dropdown -->
<!-- <Button Name="SaveDropdownButton" Width="10" IsEnabled="False">
<TextBlock>v</TextBlock>
</Button> -->
<Separator Width="5"></Separator>
<Button Name="AddButton" Width="64" Click="AddButton_Click" IsEnabled="{Binding Path=ArchiveLoaded, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Add File"/>
</StackPanel>
</Button>
<Button Name="AddFolderButton" Width="64" Click="AddFolderButton_Click" IsEnabled="{Binding Path=ArchiveLoaded, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Add Folder"/>
</StackPanel>
</Button>
<Button Name="ExtractToButton" Width="64" Click="ExtractToButton_Click" IsEnabled="{Binding Path=ContentSelected, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Extract to"/>
</StackPanel>
</Button>
<Button Name="DeleteButton" Width="64" Click="DeleteButton_Click" IsEnabled="{Binding Path=ContentSelected, RelativeSource={RelativeSource AncestorType=Window}}">
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Delete"/>
</StackPanel>
</Button>
<Separator Width="5"></Separator>
<Button Name="SearchButton" Width="64" Click="SearchButton_Click" IsEnabled="False">
<!-- IsEnabled="{Binding Path=ArchiveLoaded, RelativeSource={RelativeSource AncestorType=Window}}" -->
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Search"/>
</StackPanel>
</Button>
<Button Name="OptionsButton" Width="64" Click="OptionsButton_Click" IsEnabled="False">
<!-- IsEnabled="{Binding Path=ArchiveLoaded, RelativeSource={RelativeSource AncestorType=Window}}" -->
<StackPanel>
<Image Source="/Icons/MissingIcon.png" Height="42" />
<TextBlock Text="Options"/>
</StackPanel>
</Button>
</DockPanel>
<Grid Margin="0,64,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="0*" MinWidth="100"/>
</Grid.ColumnDefinitions>
<TreeView Name="FileTree" SelectedItemChanged="FileTree_SelectedItemChanged">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate DataType="{x:Type local:TreeEntry}" ItemsSource="{Binding Items}">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<GridSplitter Grid.Column="1" Width="5"/>
<ListView Grid.Column="2" Name="TreeContent" ItemsSource="{Binding Items}" MouseDoubleClick="TreeContent_MouseDoubleClick" SelectionChanged="TreeContent_SelectionChanged">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Name" Width="100"/>
</GridView>
</ListView.View>
</ListView>
<GridSplitter Grid.Column="3" Width="5"/>
<TextBlock Grid.Column="4" Text="Here File information will be displayed" TextWrapping="Wrap"></TextBlock>
</Grid>
</Grid>
</Window>
Loading

0 comments on commit e397eed

Please sign in to comment.