Skip to content

Commit

Permalink
Octavian17 - build 10-Oct (#39)
Browse files Browse the repository at this point in the history
Add tons of Changes, especially GUI stuff.
  • Loading branch information
tajbender authored Oct 21, 2024
2 parents f7ab805 + f68b98d commit 3b4ea36
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 103 deletions.
21 changes: 0 additions & 21 deletions src/electrifier/Controls/Vanara/ExplorerBrowser.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@
<Border Grid.Column="1"
Width="8"
Background="Transparent" />
<!-- controls:GridSplitter -->
<Border x:Name="ShellGridViewBorder"
Grid.Column="2">
<StackPanel Orientation="Vertical">
Expand Down Expand Up @@ -233,26 +232,6 @@
</AppBar>
</StackPanel>
</Border>
<!-- add `ShellGridViewEast`:
<controls:GridSplitter
x:Name="MidArenaGridSplitter"
Grid.Column="3"
Width="12"
HorizontalAlignment="Left"
ResizeBehavior="BasedOnAlignment"
ResizeDirection="Columns"
Visibility="{x:Bind ArenaGridSplitterVisibility}">
<controls:GridSplitter.RenderTransform>
<TranslateTransform X="-6" />
</controls:GridSplitter.RenderTransform>
</controls:GridSplitter>
<Border Grid.Column="4">
<local:Shell32GridView
x:Name="ShellGridViewEast"
BorderThickness="3"
ItemsSource="{x:Bind CurrentFolderItems}"
Visibility="{x:Bind GridViewVisibility}" />
</Border>-->
</Grid>
<CommandBar Grid.Row="3"
HorizontalAlignment="Left"
Expand Down
17 changes: 4 additions & 13 deletions src/electrifier/Controls/Vanara/ExplorerBrowserItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ private bool TransparentHiddenFiles
set;
}
}
public SoftwareBitmapSource? BitmapSource { get; set; }

/// <summary>Gets the set of Children as an <seealso cref="List{T}"/>.</summary>
/// <summary>Get the current set of <seealso cref="ExplorerBrowserItem"/>s as <seealso cref="List{T}"/>.</summary>
public List<ExplorerBrowserItem>? Children;

/// <summary>Gets the DisplayName.</summary>
/// <summary>Get the DisplayName.</summary>
public string DisplayName
{
get;
Expand Down Expand Up @@ -61,10 +61,7 @@ public bool HasUnrealizedChildren
return false;
}
}
public bool IsExpanded
{
get; set;
}
public bool IsExpanded { get; set; }
public bool IsFolder => ShellItem.IsFolder;
public bool IsLink => ShellItem.IsLink;
public bool IsSelected
Expand All @@ -76,19 +73,13 @@ public ShellItem ShellItem
get;
}

public SoftwareBitmapSource? BitmapSource { get; set; }


public ExplorerBrowserItem(ShellItem? shItem, bool isSeparator = false)
{
ShellItem = new ShellItem(shItem.PIDL);
DisplayName = ShellItem.Name ?? ":error: <DisplayName.get()>";
IsExpanded = false;
// todo: If IsSelected, add overlay of opened folder icon to TreeView optionally
IsSelected = false;

// todo: Use Debug-Levels as property
//Debug.Print($"ExplorerBrowserItem <{GetDebuggerDisplay()}> created.");
}

public event PropertyChangedEventHandler? PropertyChanged;
Expand Down
152 changes: 87 additions & 65 deletions src/electrifier/Views/FileManagerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
<Flyout>
<StackPanel>
<AppBarButton Icon="Folder"
Label="Folder" />
Label="Folder"
IsEnabled="False" />
<AppBarButton Icon="Link"
Label="Shortcut" />
Label="Shortcut"
IsEnabled="False" />
</StackPanel>
</Flyout>
</SplitButton.Flyout>
Expand All @@ -55,35 +57,33 @@
<AppBarButton Icon="Delete"
IsEnabled="False"
Label="Delete" />

<!--<Button Content="Options">
<Button.Flyout>
<MenuFlyout>
<MenuFlyoutItem Text="Reset"/>
<MenuFlyoutSeparator/>
<ToggleMenuFlyoutItem Text="Repeat" IsChecked="True"/>
<ToggleMenuFlyoutItem Text="Shuffle" IsChecked="True"/>
</MenuFlyout>
</Button.Flyout>
</Button>-->

<AppBarSeparator />
<AppBarElementContainer>
<SplitButton x:Name="SortSplitButton"
Content="Sort">
<SplitButton.Flyout>
<Flyout>
<StackPanel>
<Button Content="Name" />
<Button Content="Date Modified" />
<Button Content="Type" />
<Button Content="~" />
<Button Content="More" />
<Button Content="~" />
<Button Content="Ascending" />
<Button Content="Descending" />
<Button Content="~" />
<Button Content="Group by" />
<Button Content="Name"
IsEnabled="False" />
<Button Content="Date Modified"
IsEnabled="False" />
<Button Content="Type"
IsEnabled="False" />
<Button Content="~"
IsEnabled="False" />
<Button Content="More"
IsEnabled="False" />
<Button Content="~"
IsEnabled="False" />
<Button Content="Ascending"
IsEnabled="False" />
<Button Content="Descending"
IsEnabled="False" />
<Button Content="~"
IsEnabled="False" />
<Button Content="Group by"
IsEnabled="False" />
</StackPanel>
</Flyout>
</SplitButton.Flyout>
Expand All @@ -101,31 +101,37 @@
<SplitButton.Flyout>
<Flyout>
<StackPanel>
<Button Content="Tiles" />
<Button Content="Content" />
<Button Content="~" />
<Button Content="Details pane" />
<Button Content="Preview pane" />
<Button Content="~" />
<Button Content="Show" />
<Button Content="~" />
<Button Content="Two Pages" />
<Button Content="Tiles"
IsEnabled="False" />
<Button Content="Content"
IsEnabled="False" />
<Button Content="~"
IsEnabled="False" />
<Button Content="Details pane"
IsEnabled="False" />
<Button Content="Preview pane"
IsEnabled="False" />
<Button Content="~"
IsEnabled="False" />
<Button Content="Show"
IsEnabled="False" />
<Button Content="~"
IsEnabled="False" />
<Button Content="Two Pages"
IsEnabled="False" />
<!-- Glyph: E89A, TwoPage -->
<AppBarButton Icon="TwoPage"
Label="Double pane mode" />
Label="Double pane mode"
IsEnabled="False" />
<AppBarButton Icon="Refresh"
Label="Refresh" />
Label="Refresh"
IsEnabled="False" />
<AppBarButton Icon="Orientation"
Label="Orientation" />
Label="Orientation"
IsEnabled="False" />
</StackPanel>
</Flyout>
</SplitButton.Flyout>
<SplitButton.Resources>
<TeachingTip x:Name="ViewSplitButtonTeachingTip"
Title="TODO: Sort and Group options."
Subtitle="Use the dropdown button option to save your item and create another."
Target="{x:Bind SortSplitButton}" />
</SplitButton.Resources>
</SplitButton>
</AppBarElementContainer>
<AppBarElementContainer>
Expand All @@ -134,10 +140,14 @@
<SplitButton.Flyout>
<Flyout>
<StackPanel>
<Button Content="All File Types" />
<Button Content="~" />
<Button Content="Files" />
<Button Content="Folders" />
<Button Content="All File Types"
IsEnabled="False" />
<Button Content="~"
IsEnabled="False" />
<Button Content="Files"
IsEnabled="False" />
<Button Content="Folders"
IsEnabled="False" />
</StackPanel>
</Flyout>
</SplitButton.Flyout>
Expand All @@ -150,48 +160,60 @@
</SplitButton>
</AppBarElementContainer>
<AppBarSeparator />
<AppBarElementContainer>
<SplitButton x:Name="TagsSplitButton"
Content="Tags">
<SplitButton.Flyout>
<Flyout>
<StackPanel>
<Button Content="Low Priority"
IsEnabled="False" />
<Button Content="Medium Priority"
IsEnabled="False" />
<Button Content="High Priority"
IsEnabled="False" />
</StackPanel>
</Flyout>
</SplitButton.Flyout>
</SplitButton>
</AppBarElementContainer>
<CommandBar.SecondaryCommands>
<AppBarButton Icon="Undo"
Label="Undo" />
Label="Undo"
IsEnabled="False" />
<AppBarSeparator />
<AppBarButton Icon="Pin"
Label="Pin to Quick access" />
Label="Pin to Quick access"
IsEnabled="False" />
<AppBarSeparator />
<AppBarButton Icon="SelectAll"
Label="Select all" />
Label="Select all"
IsEnabled="False" />
<!-- TODO: The Icon="ViewAll" is the one, that Windows Explorer uses for `Select none` -->
<AppBarButton Icon="ClearSelection"
Label="Select none" />
Label="Select none"
IsEnabled="False" />
<AppBarButton Icon="Shuffle"
Label="Invert selection" />
Label="Invert selection"
IsEnabled="False" />
<AppBarSeparator />
<AppBarButton Icon="Repair"
Label="Properties" />
Label="Properties"
IsEnabled="False" />
<AppBarButton Icon="Setting"
Label="Options" />
Label="Options"
IsEnabled="False" />
</CommandBar.SecondaryCommands>
</CommandBar>
<Grid x:Name="SplitViewGrid"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border x:Name="PrimaryExplorerBrowserBorder">
<vanara:ExplorerBrowser x:Name="PrimaryExplorerBrowserControl"
BottomAppBarVisibility="Collapsed"
BottomCommandBarVisibility="Visible"
GridViewVisibility="Visible"
TopCommandBarVisibility="Collapsed" />
</Border>
<Border Grid.Column="1"
x:Name="SecondaryExplorerBrowserBorder">
<vanara:ExplorerBrowser x:Name="SecondaryExplorerBrowserControl"
BottomAppBarVisibility="Collapsed"
BottomCommandBarVisibility="Visible"
GridViewVisibility="Visible"
TopCommandBarVisibility="Collapsed" />
</Border>
</Grid>
</Grid>
</Page>
4 changes: 2 additions & 2 deletions src/electrifier/Views/ShellPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<StackPanel Orientation="Horizontal">
<Button>
<Image x:Name="AppTitleBarBackButtonImageCenter"
VerticalAlignment="Top"
VerticalAlignment="Center"
MaxHeight="23"
Source="ms-appx:///Assets/Themes/Aero Blackcomb/Back Button 48px.png" />
</Button>
Expand All @@ -59,7 +59,7 @@
</Button>
<TextBox x:Name="CenterStackPanelTextBlock"
Text="Search..."
VerticalAlignment="Center" />
VerticalAlignment="Stretch" />
</StackPanel>
</Border>
</StackPanel>
Expand Down
4 changes: 2 additions & 2 deletions src/electrifier/electrifier.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<None Remove="Assets\Square44x44Logo.scale-200_altform-unplated.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Assets\Square44x44Logo.scale-200_unplated.png" />
<EmbeddedResource Include="Assets\Square44x44Logo_unplated.png" />
</ItemGroup>

<ItemGroup>
Expand All @@ -51,7 +51,7 @@
<PackageReference Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.1.240916" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.1.240916" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.1.240916" />
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0-eap1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240923002" />
Expand Down

0 comments on commit 3b4ea36

Please sign in to comment.