Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a details page to the properties dialog #1962

Merged
merged 76 commits into from Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
de4595f
Added details page for Images
winston-de Aug 18, 2020
abd36f2
Added more properties to image details page
winston-de Aug 21, 2020
b479345
Remade details view
winston-de Aug 24, 2020
1281268
Improved readability
winston-de Sep 4, 2020
c3248f0
Merge branch 'Details-Page' into pr/5
winston-de Sep 4, 2020
1056715
Merge pull request #6 from winiston2212/pr/5
winston-de Sep 4, 2020
abe3d56
Added ability to change file properties
winston-de Sep 12, 2020
dabf411
Regorganized the properties to get system, fixed GPS properties, and …
winston-de Sep 18, 2020
f033a8d
Added visibility option
winston-de Sep 18, 2020
f51d2f9
Despaghettied code
winston-de Sep 19, 2020
97a7b45
Added "clear personal properties" functionality
winston-de Sep 19, 2020
1d6bba1
Improved clear personal properties functionality
winston-de Sep 19, 2020
1d2bb3b
Removed uneeded code from ViewModel
winston-de Sep 19, 2020
d12640e
Changed layout and added more core properties
winston-de Sep 19, 2020
c40e6a9
Details tab is now hidden for folders and when multiple items are sel…
winston-de Sep 19, 2020
d197825
Improved open map button code
winston-de Sep 22, 2020
5a73d07
Overview page is now hidden for non-image files
winston-de Sep 22, 2020
7559fbf
Update azure-pipelines.yml
winston-de Sep 22, 2020
0ae7233
Update azure-pipelines.yml
yaira2 Sep 22, 2020
b963384
Code will be parsed from json file
winston-de Sep 22, 2020
46108b5
Merge branch 'Details-Page' of https://github.com/winiston2212/files-…
winston-de Sep 22, 2020
bd0d640
Update builds/azure-pipelines.yml
yaira2 Sep 22, 2020
e628822
Update azure-pipelines.yml
yaira2 Sep 22, 2020
b0884db
Update azure-pipelines-release.yml
yaira2 Sep 22, 2020
e6d3a9c
Moved some code to a try-catch so that it doesn't crash
winston-de Sep 24, 2020
9872091
Merge branch 'Details-Page' of https://github.com/winiston2212/files-…
winston-de Sep 24, 2020
47e9e62
Update Package.appxmanifest
yaira2 Sep 24, 2020
9c56ae0
Merge branch 'master' into Details-Page
yaira2 Sep 24, 2020
80f5129
Update azure-pipelines-release.yml
yaira2 Sep 24, 2020
0506950
Update azure-pipelines.yml
yaira2 Sep 24, 2020
2068ad5
Updated paths
yaira2 Sep 24, 2020
d9f806b
Merge branch 'Details-Page' of https://github.com/winiston2212/files-…
yaira2 Sep 24, 2020
cf39c6a
Updated file path
yaira2 Sep 24, 2020
613807d
Update azure-pipelines-release.yml
yaira2 Sep 24, 2020
38c6232
Update azure-pipelines.yml
yaira2 Sep 24, 2020
f074aac
Update Package.appxmanifest
yaira2 Sep 24, 2020
2acf92e
Update azure-pipelines-release.yml
yaira2 Sep 24, 2020
427735d
Update azure-pipelines.yml
yaira2 Sep 24, 2020
e5e9efc
Update Package.appxmanifest
yaira2 Sep 24, 2020
98140df
Details tab is now hidden for shortcut items
winston-de Sep 24, 2020
d8abf62
Fixed a bug where the 'comment' box was getting the wrong property
winston-de Sep 24, 2020
6f84357
Consolidated SystemFileProperties into a two seperate lists/dictionaries
winston-de Sep 24, 2020
3e87721
Added code to display the devkey and error
winston-de Sep 24, 2020
43df3ca
Merge branch 'Details-Page' of https://github.com/winiston2212/files-…
winston-de Sep 24, 2020
3060c85
Key will now put in single line
winston-de Sep 24, 2020
8f8a192
Update Package.appxmanifest
yaira2 Sep 24, 2020
07712ca
Removed blank key for testing
yaira2 Sep 24, 2020
de043b6
Merge branch 'Details-Page' of https://github.com/winiston2212/files-…
yaira2 Sep 24, 2020
00d3673
Update azure-pipelines.yml
yaira2 Sep 25, 2020
0b27503
Update azure-pipelines-release.yml
yaira2 Sep 25, 2020
24564b1
Update azure-pipelines.yml
yaira2 Sep 25, 2020
4671592
Update azure-pipelines-release.yml
yaira2 Sep 25, 2020
2c6c887
Update azure-pipelines.yml
yaira2 Sep 25, 2020
f0131e7
Update azure-pipelines-release.yml
yaira2 Sep 25, 2020
1b18130
Update azure-pipelines.yml
yaira2 Sep 25, 2020
ca5b1e8
Update azure-pipelines.yml
yaira2 Sep 25, 2020
172bf49
Update azure-pipelines.yml
yaira2 Sep 25, 2020
4a932bc
Update azure-pipelines-release.yml
yaira2 Sep 25, 2020
4d71d35
Replaced the error and dev key display code
winston-de Sep 25, 2020
63e03ae
Merge branch 'Details-Page' of https://github.com/winiston2212/files-…
winston-de Sep 25, 2020
784df81
Better handling of errors for location finder
winston-de Sep 25, 2020
576b2c9
Added audio properties
winston-de Sep 25, 2020
0fb8926
Added music properties
winston-de Sep 26, 2020
a703c14
Added converter for string[] to string
winston-de Sep 26, 2020
457bbf2
Added a Uint32ToString converter
winston-de Sep 26, 2020
c3d27ad
Fixed a bug that prevented properties from saving
winston-de Sep 26, 2020
97a0b79
Added code to simplify adding properies
winston-de Sep 29, 2020
50b0b33
Added Media Properties
winston-de Sep 29, 2020
228f248
Changed files to new Properties List system
winston-de Sep 30, 2020
f3354fa
Added acrylic backdrop to textboxes and cleaned code
winston-de Sep 30, 2020
1599aaf
Updated themes for transparent text boxes
winston-de Sep 30, 2020
34e8c57
Fixed overview item display issue
winston-de Oct 1, 2020
afc22b6
Fixed display issue for overview
winston-de Oct 1, 2020
d597926
Fixed shot display issue and switched to more reliable sync method
winston-de Oct 2, 2020
ff28cd6
Merge branch 'master' into Details-Page
yaira2 Oct 7, 2020
d446108
Removed duplicate contains statement
winston-de Oct 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions Files/Converters/DateTimeOffsetToString.cs
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;

namespace Files.Converters
{
class DateTimeOffsetToString : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value != null)
return ((DateTimeOffset)value).ToLocalTime().ToString();
return "";
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
{
try
{
return DateTimeOffset.Parse(value as string);
}
catch (FormatException e)
{
return null;
}
}
}
}
31 changes: 31 additions & 0 deletions Files/Converters/DoubleToString.cs
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;

namespace Files.Converters
{
class DoubleToString : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value != null)
return value.ToString();
return "";
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
{
try
{
return Double.Parse(value as string);
}
catch (FormatException e)
{
return null;
}
}
}
}
31 changes: 31 additions & 0 deletions Files/Converters/StringArrayToString.cs
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;

namespace Files.Converters
{
class StringArrayToString : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
var array = value as string[];

if (array == null || !(array is string[]))
return "";

var str = "";
foreach (var i in array as string[])
str += string.Format("{0}; ", i);

return str;
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
{
return (value as string).Split("; ");
}
}
}
31 changes: 31 additions & 0 deletions Files/Converters/UInt32ToString.cs
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;

namespace Files.Converters
{
class UInt32ToString : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if(value != null)
return value.ToString();
return "";
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
{
try
{
return UInt32.Parse(value as string);
}
catch (FormatException e)
{
return null;
}
}
}
}
20 changes: 20 additions & 0 deletions Files/Files.csproj
Expand Up @@ -158,8 +158,12 @@
<Compile Include="Commands\Paste.cs" />
<Compile Include="Controllers\IJson.cs" />
<Compile Include="Controllers\SidebarPinnedController.cs" />
<Compile Include="Converters\DateTimeOffsetToString.cs" />
<Compile Include="Converters\DoubleToString.cs" />
<Compile Include="Converters\MultiBooleanConverter.cs" />
<Compile Include="Converters\StorageDeleteOptionToBooleanConverter.cs" />
<Compile Include="Converters\StringArrayToString.cs" />
<Compile Include="Converters\UInt32ToString.cs" />
<Compile Include="DataModels\DefaultLanguageModel.cs" />
<Compile Include="DataModels\SidebarPinnedModel.cs" />
<Compile Include="Controllers\TerminalController.cs" />
Expand All @@ -173,6 +177,7 @@
<DependentUpon>RestartDialog.xaml</DependentUpon>
</Compile>
<Compile Include="Filesystem\CloudDriveSyncStatus.cs" />
<Compile Include="Filesystem\PropertiesData.cs" />
<Compile Include="Filesystem\StorageFileHelpers\StorageFileExtensions.cs" />
<Compile Include="Filesystem\StorageFileHelpers\IStorageItemWithPath.cs" />
<Compile Include="Filesystem\StorageFileHelpers\StorageFileWithPath.cs" />
Expand Down Expand Up @@ -234,6 +239,9 @@
<Compile Include="Enums\WallpaperType.cs" />
<Compile Include="Filesystem\DriveItem.cs" />
<Compile Include="Filesystem\Drives.cs" />
<Compile Include="UserControls\PropertyListItem.xaml.cs">
<DependentUpon>PropertyListItem.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\SidebarControl.xaml.cs">
<DependentUpon>SidebarControl.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -279,6 +287,9 @@
<Compile Include="Views\LayoutModes\GridViewBrowser.xaml.cs">
<DependentUpon>GridViewBrowser.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Pages\PropertiesDetails.xaml.cs">
<DependentUpon>PropertiesDetails.xaml</DependentUpon>
</Compile>
<Compile Include="Views\MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -356,6 +367,7 @@
<None Include="Assets\terminal\terminal.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="Resources\BingMapsKey.txt" />
<None Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -502,6 +514,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControls\PropertyListItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControls\SidebarControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -538,6 +554,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Pages\PropertiesDetails.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
12 changes: 11 additions & 1 deletion Files/Filesystem/ListedItem.cs
Expand Up @@ -150,6 +150,16 @@ public DateTimeOffset ItemDateAccessedReal

private DateTimeOffset _itemDateAccessedReal;

public bool IsImage()
{
if (FileExtension != null)
{
string lower = FileExtension.ToLower();
return lower.Contains("png") || lower.Contains("jpg") || lower.Contains("gif") || lower.Contains("jpeg");
}
return false;
}

public ListedItem(string folderRelativeId)
{
FolderRelativeId = folderRelativeId;
Expand Down Expand Up @@ -225,4 +235,4 @@ public ShortcutItem(string folderRelativeId) : base(folderRelativeId)
public bool RunAsAdmin { get; set; }
public bool IsUrl { get; set; }
}
}
}
29 changes: 29 additions & 0 deletions Files/Filesystem/PropertiesData.cs
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;

namespace Files.Filesystem
{
public class PropertiesData
{
public string Text { get; set; } = "Test:";
public string Property { get; set; }
public object Data { get; set; }
public Visibility Visibility { get; set; } = Visibility.Visible;

public PropertiesData(string property, string text)
{
Property = property;
Text = text;
}

public PropertiesData(string property, object data)
{
Property = property;
Data = data;
}
}
}
40 changes: 39 additions & 1 deletion Files/ResourceDictionaries/PropertiesStyles.xaml
@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:usercontrols="using:Files.UserControls" xmlns:converters="using:Files.Converters">

<Style x:Key="PropertiesTab" TargetType="StackPanel">
<Setter Property="Padding" Value="14,0,14,14" />
Expand All @@ -12,6 +13,7 @@
<Style x:Key="PropertyName" TargetType="TextBlock">
<Setter Property="Margin" Value="{StaticResource PropertyNameMargin}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Margin" Value="0,7"/>
</Style>

<Style x:Key="PropertyValueGrid" TargetType="Grid">
Expand All @@ -28,6 +30,7 @@
<Setter Property="Margin" Value="{StaticResource PropertyValueMargin}" />
<Setter Property="VerticalAlignment" Value="{StaticResource PropertyValueVerticalAlignment}" />
<Setter Property="IsTextSelectionEnabled" Value="True" />
<Setter Property="Margin" Value="20,0,0,0"/>
</Style>

<Style
Expand All @@ -38,5 +41,40 @@
<Setter Property="VerticalAlignment" Value="{StaticResource PropertyValueVerticalAlignment}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Margin" Value="20,0,0,0"/>
<Setter Property="BorderBrush">
<Setter.Value>
<SolidColorBrush Color="Transparent"/>
</Setter.Value>
</Setter>

<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Transparent"/>
</Setter.Value>
</Setter>
</Style>

<converters:StringArrayToString x:Key="StringArrayToString"/>
<converters:UInt32ToString x:Key="UInt32ToString"/>
<converters:DoubleToString x:Key="DoubleToString"/>
<converters:DateTimeOffsetToString x:Key="DateTimeOffsetToString"/>



<Style TargetType="MenuFlyoutSeparator" x:Key="Separator">
<Setter Property="Grid.Column" Value="0"/>
<Setter Property="Grid.ColumnSpan" Value="2"/>
<Setter Property="Margin" Value="-12, 0"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
</Style>

<Style TargetType="TextBlock" x:Key="SeparatorText">
<Setter Property="Grid.Column" Value="0"/>
<Setter Property="FontSize" Value="22"/>
</Style>

<Style TargetType="usercontrols:PropertyListItem">
<Setter Property="ColumnWidth" Value="110"/>
</Style>
</ResourceDictionary>
1 change: 1 addition & 0 deletions Files/Resources/BingMapsKey.txt
@@ -0,0 +1 @@

33 changes: 33 additions & 0 deletions Files/UserControls/PropertyListItem.xaml
@@ -0,0 +1,33 @@
<UserControl
x:Class="Files.UserControls.PropertyListItem"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Files.UserControls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">

<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///ResourceDictionaries/PropertiesStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{x:Bind ColumnWidth}" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

<TextBlock Grid.Row ="0" Text="{x:Bind Text}" Style="{StaticResource PropertyName}"/>
<TextBox Grid.Row ="0" Text="{x:Bind ValueText, Mode=TwoWay}" IsReadOnly="{x:Bind IsReadOnly, Mode=OneWay}" TextChanged="TextBox_TextChanged" Style="{StaticResource PropertyValueTextBox}" Grid.Column="1"/>

</Grid>
</UserControl>