Use Icons from Avalonia.IconPacks (#38)
* Add icons, update the image * Further GUI enhancements * Update README.md * Add build.csproj to the .sln file
This commit is contained in:
Родитель
ba9780b55d
Коммит
6213f661b5
|
@ -6,7 +6,7 @@ Camelotia is a sample cross-platform application built with reactive extensions,
|
|||
|
||||
### Compiling Avalonia app
|
||||
|
||||
<img src="images/UiAvalonia.png" width="450">
|
||||
<img src="images/UiAvalonia.png" width="550">
|
||||
|
||||
In order to compile .NET Standard libraries, run tests and run the <a href="http://github.com/avaloniaui">Avalonia</a> application on Windows, Linux or MacOS operating system make sure to have latest [.NET Core SDK](https://dot.net/) installed. Launch the `Camelotia.Avalonia.sln` file to browse or to edit source files. Camelotia uses [Nuke Build](https://github.com/nuke-build/nuke) to build and test the solution. Execute the following commands to run the build scripts on Linux or MacOS:
|
||||
|
||||
|
@ -28,19 +28,19 @@ cd ./Camelotia && powershell -ExecutionPolicy Unrestricted ./build.ps1 --interac
|
|||
|
||||
### Compiling Universal Windows Platform app
|
||||
|
||||
<img src="images/UiWindows.png" width="450">
|
||||
<img src="images/UiWindows.png" width="550">
|
||||
|
||||
<a href="https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide">Universal Windows Platform</a> Camelotia app is compatible with Windows 10-based devices, such as PCs, Xbox One and HoloLens. The app can be compiled only on latest Windows 10. Make sure to have latest [Microsoft Visual Studio](https://visualstudio.microsoft.com/) installed. Make sure the "Universal Application Development" section is checked in [Visual Studio Installer](https://visualstudio.microsoft.com/ru/vs/). Launch the `Camelotia.Uwp.sln` solution file.
|
||||
|
||||
### Compiling Windows Presentation Foundation app
|
||||
|
||||
<img src="images/UiPresentation.png" width="450">
|
||||
<img src="images/UiPresentation.png" width="550">
|
||||
|
||||
The app was ported to WPF to make the cloud file manager controls reusable across most popular .NET implementations, so one could easily embed parts of Camelotia into their own applications by simply copying and pasting the source files. The app is also compatible with Windows versions lower than 10, such as Windows 7 or 8. To compile the WPF app, ensure the "Desktop Development" section is checked in [Visual Studio Installer](https://visualstudio.microsoft.com/ru/vs/). Then, open the `Camelotia.Wpf.sln` file in Visual Studio 2019.
|
||||
|
||||
### Compiling Xamarin Forms app
|
||||
|
||||
<img src="images/UiAndroid.png" width="450">
|
||||
<img src="images/UiAndroid.png" width="550">
|
||||
|
||||
To compile the <a href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/">Xamarin.Forms</a> Android application, install the appropriate Android SDK v8.1. This can be achieved by using [Visual Studio Installer](https://visualstudio.microsoft.com/ru/vs/) and selecting "Mobile Development" section there. Launch the `Camelotia.Xamarin.sln` solution file.
|
||||
|
||||
|
|
Двоичные данные
images/UiAvalonia.png
Двоичные данные
images/UiAvalonia.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 176 KiB После Ширина: | Высота: | Размер: 233 KiB |
|
@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Camelotia.Presentation.Aval
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Camelotia.Tests", "Camelotia.Tests\Camelotia.Tests.csproj", "{AE41666B-41D1-4044-9752-7CD4460C1A90}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "build", "..\build\build.csproj", "{8550B110-E789-4117-B9D3-7503D3C3B364}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -105,6 +107,26 @@ Global
|
|||
{AE41666B-41D1-4044-9752-7CD4460C1A90}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AE41666B-41D1-4044-9752-7CD4460C1A90}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AE41666B-41D1-4044-9752-7CD4460C1A90}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8550B110-E789-4117-B9D3-7503D3C3B364}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -17,27 +17,48 @@
|
|||
</UserControl.ContextMenu>
|
||||
<Grid Margin="10 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="3*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
<DrawingPresenter Grid.Column="0"
|
||||
IsVisible="{Binding IsFolder}"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="0 0 10 0">
|
||||
<DrawingPresenter.Drawing>
|
||||
<GeometryDrawing Brush="{DynamicResource HighlightBrush}"
|
||||
Geometry="M213.338 96H74.666C51.197 96 32 115.198 32 138.667v234.666C32 396.802 51.197 416 74.666 416h362.668C460.803 416 480 396.802 480 373.333V186.667C480 163.198 460.803 144 437.334 144H256.006l-42.668-48z" />
|
||||
</DrawingPresenter.Drawing>
|
||||
</DrawingPresenter>
|
||||
<DrawingPresenter Grid.Column="0"
|
||||
IsVisible="{Binding IsFile}"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="0 0 10 0">
|
||||
<DrawingPresenter.Drawing>
|
||||
<GeometryDrawing Brush="{DynamicResource ThemeAccentBrush}"
|
||||
Geometry="F1M225,-200C211.192886352539,-200,200,-188.807113647461,200,-175C200,-161.192886352539,211.192886352539,-150,225,-150L375,-150C388.80712890625,-150,400,-161.192886352539,400,-175C400,-188.807113647461,388.80712890625,-200,375,-200L225,-200z M225,-300C211.192886352539,-300,200,-288.80712890625,200,-275C200,-261.19287109375,211.192886352539,-250,225,-250L300,-250C313.80712890625,-250,325,-261.19287109375,325,-275C325,-288.80712890625,313.80712890625,-300,300,-300L225,-300z M350,-500L350,-421.25C349.129821777344,-410.510803222656,357.027465820313,-401.055877685547,367.75,-400L443.5,-400 350,-500z M164,-550L364,-550C371.054473876953,-549.983337402344,377.773529052734,-546.986999511719,382.5,-541.75L493.5,-416.75C497.667449951172,-412.1650390625,499.983825683594,-406.195892333984,500,-400L500,-112.5C499.802276611328,-95.7246856689453,492.948059082031,-79.7151184082031,480.945465087891,-67.9938430786133C468.94287109375,-56.2725677490234,452.775299072266,-49.7999038696289,436,-50.0000038146973L164,-50.0000038146973C147.224716186523,-49.7999038696289,131.05712890625,-56.2725677490234,119.054534912109,-67.9938430786133C107.051948547363,-79.7151184082031,100.197738647461,-95.7246856689453,100,-112.5L100,-487.5C100.197738647461,-504.275299072266,107.051948547363,-520.284851074219,119.054534912109,-532.006164550781C131.05712890625,-543.727416992188,147.224716186523,-550.200073242188,164,-550z" />
|
||||
</DrawingPresenter.Drawing>
|
||||
</DrawingPresenter>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding Name}"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
FontSize="14" />
|
||||
<TextBox Grid.Column="1"
|
||||
<TextBox Grid.Column="2"
|
||||
Classes="Badge"
|
||||
Text="Directory"
|
||||
IsVisible="{Binding IsFolder}"
|
||||
FontSize="12" />
|
||||
<TextBox Grid.Column="2"
|
||||
<TextBox Grid.Column="3"
|
||||
Classes="Badge"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding IsFile}"
|
||||
Text="{Binding Size}" />
|
||||
<TextBox Grid.Column="3"
|
||||
<TextBox Grid.Column="4"
|
||||
Classes="PrimaryBadge"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Modified}" />
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Reactive;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Reactive.Linq;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.ReactiveUI;
|
||||
using Camelotia.Presentation.Interfaces;
|
||||
|
|
|
@ -36,10 +36,21 @@
|
|||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="Camelotia"
|
||||
FontSize="17"
|
||||
Margin="12" />
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<DrawingPresenter VerticalAlignment="Top"
|
||||
Margin="20 10 0 0"
|
||||
Height="25"
|
||||
Width="30">
|
||||
<DrawingPresenter.Drawing>
|
||||
<GeometryDrawing Brush="{DynamicResource ThemeAccentBrush}"
|
||||
Geometry="M12.19 2.38a9.344 9.344 0 0 0-9.234 6.893c.053-.02-.055.013 0 0-3.875 2.551-3.922 8.11-.247 10.941l.006-.007-.007.03a6.717 6.717 0 0 0 4.077 1.356h5.173l.03.03h5.192c6.687.053 9.376-8.605 3.835-12.35a9.365 9.365 0 0 0-2.821-4.552l-.043.043.006-.05A9.344 9.344 0 0 0 12.19 2.38zm-.358 4.146c1.244-.04 2.518.368 3.486 1.15a5.186 5.186 0 0 1 1.862 4.078v.518c3.53-.07 3.53 5.262 0 5.193h-5.193l-.008.009v-.04H6.785a2.59 2.59 0 0 1-1.067-.23h.001a2.597 2.597 0 1 1 3.437-3.437l3.013-3.012A6.747 6.747 0 0 0 8.11 8.24c.018-.01.04-.026.054-.023a5.186 5.186 0 0 1 3.67-1.69z" />
|
||||
</DrawingPresenter.Drawing>
|
||||
</DrawingPresenter>
|
||||
<TextBlock Text="Camelotia"
|
||||
VerticalAlignment="Bottom"
|
||||
Margin="15 14 15 10"
|
||||
FontSize="17" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
|
@ -58,23 +69,35 @@
|
|||
Margin="0 6 6 12" />
|
||||
</Grid>
|
||||
<ListBox Grid.Row="2"
|
||||
Padding="0" BorderThickness="0"
|
||||
Padding="0"
|
||||
BorderThickness="0"
|
||||
IsVisible="{Binding IsReady}"
|
||||
SelectedItem="{Binding SelectedProvider, Mode=TwoWay}"
|
||||
Items="{Binding Providers, Mode=OneWay}"
|
||||
Background="Transparent">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="interfaces:IProviderViewModel">
|
||||
<Grid>
|
||||
<StackPanel Margin="10">
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
<DrawingPresenter Grid.Column="0"
|
||||
Opacity="0.5"
|
||||
Margin="10 0 5 0"
|
||||
Height="60"
|
||||
Width="60">
|
||||
<DrawingPresenter.Drawing>
|
||||
<GeometryDrawing Brush="{DynamicResource ThemeAccentBrush}"
|
||||
Geometry="M16.5,16H8A3,3 0 0,1 5,13A3,3 0 0,1 8,10C8.05,10 8.09,10 8.14,10C8.58,8.28 10.13,7 12,7A4,4 0 0,1 16,11H16.5A2.5,2.5 0 0,1 19,13.5A2.5,2.5 0 0,1 16.5,16M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
|
||||
</DrawingPresenter.Drawing>
|
||||
</DrawingPresenter>
|
||||
<StackPanel Grid.Column="1" Margin="10 5">
|
||||
<TextBlock Text="{Binding Name}"
|
||||
FontSize="15" />
|
||||
<StackPanel Orientation="Horizontal" Margin="0 5">
|
||||
<TextBlock Text="Size: " />
|
||||
<TextBlock Text="{Binding Size}" />
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding Description}"
|
||||
TextWrapping="Wrap" />
|
||||
TextWrapping="Wrap"
|
||||
Opacity="0.5"
|
||||
Margin="0 5 0 0" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Classes="Badge" Text="{Binding Size}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<StackPanel Grid.Column="2" Orientation="Horizontal"
|
||||
Margin="5" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding SelectedFile.Name}"
|
||||
Foreground="#888888" />
|
||||
Opacity="0.5" />
|
||||
</StackPanel>
|
||||
<Button Grid.Column="3"
|
||||
Content="Upload"
|
||||
|
|
|
@ -38,6 +38,6 @@ namespace Camelotia.Presentation.DesignTime
|
|||
|
||||
public bool IsLoading { get; }
|
||||
|
||||
public bool IsReady { get; }
|
||||
public bool IsReady { get; } = true;
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче