-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from atticus-lv/develop
Develop
- Loading branch information
Showing
144 changed files
with
4,723 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
|
||
on: | ||
push: | ||
branches: [ "master","develop" ] | ||
tags: | ||
- 'v*.*.*' | ||
|
||
- "v*.*.*" | ||
|
||
jobs: | ||
windows: | ||
|
@@ -17,15 +17,15 @@ jobs: | |
run: mkdir upload | ||
|
||
- name: Publish win-x64 | ||
run: dotnet publish src/VirtualStreetSnap -c Release -r win-x64 --self-contained -p:PublishAot=true | ||
run: dotnet publish ./src/VirtualStreetSnap -c Release -r win-x64 --self-contained -p:PublishAot=true | ||
|
||
- name: Zip win-x64 | ||
run: | | ||
$files = Get-ChildItem -Path ./src/VirtualStreetSnap/bin/Release/net8.0/win-x64/publish/* -Recurse -Exclude *.pdb | ||
Compress-Archive -Path $files.FullName -DestinationPath ./upload/VirtualStreetSnap.win-x64.aot.zip | ||
Compress-Archive -Path $files.FullName -DestinationPath ./upload/VirtualStreetSnap.win-x64.zip | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: VirtualStreetSnap | ||
path: ./upload/VirtualStreetSnap.win-x64.aot.zip | ||
path: ./upload/VirtualStreetSnap.win-x64.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
## VirtualStreetSnap | ||
|
||
[English](README.md)/中文 | ||
|
||
VirtualStreetSnap 是一个基于 avaloniaui 上保存虚拟街景基础的屏幕截图工具。 | ||
|
||
与其他屏幕截图工具相比,VirtualStreetSnap 提供了更像相机的体验。 | ||
|
||
![VirtualStreetSnap](docs/images/shot.png) | ||
|
||
![ImageGallery](docs/images/gallery.png) | ||
|
||
![ImageGallery](docs/images/setting.png) | ||
|
||
![ImageEditor](docs/images/editor.png) | ||
|
||
![ImageEditor](docs/images/picker.png) | ||
|
||
### 功能 | ||
|
||
> v0.1.5 | ||
+ SnapShot 视图 | ||
+ 按钮:选择不同比例的屏幕截图。 | ||
+ 4:3 16:9 3:2 9:16 3:4 1:1 | ||
+ 输入大小(左下角显示) | ||
+ 叠加层 | ||
+ 红色高亮边框表示屏幕截图区域。 | ||
+ 帮助对齐屏幕截图区域的指南。 | ||
+ 网格 | ||
+ 中心 | ||
+ 比例 | ||
|
||
+ 在顶部:始终在顶部。 | ||
|
||
|
||
+ 设置 | ||
+ 翻译\[English\中文\]:更改语言 | ||
+ 文件前缀:用于保存屏幕截图的自定义文件前缀。 | ||
+ 保存目录:用于保存屏幕截图的自定义保存目录。 | ||
|
||
+ 图片库:查看屏幕截图。 | ||
+ 图像查看器:查看屏幕截图。 | ||
+ 翻转图像。 | ||
+ 滚动以缩放图像。 | ||
+ 单击鼠标中键/左键可拖动图像。 | ||
+ 从图像中选择颜色,然后将颜色复制到剪贴板。 | ||
+ 缩略图查看器:查看缩略图。 | ||
+ 右键菜单 | ||
+ 在资源管理器中删除/打开。 | ||
+ 将图像复制到剪贴板。 | ||
+ 滚动以查看更多缩略图。 | ||
+ 将图像发送到编辑器。 | ||
+ 可调整尺寸。 | ||
|
||
+ 图像编辑器 | ||
+ 简单的调整图层系统 | ||
+ 添加 / 删除图层;保存到图片库。 | ||
+ 拖放以调整图层顺序。 | ||
+ 图层(实时预览) | ||
+ HSL | ||
+ 亮度/对比度 | ||
+ 白平衡(色温/色调) | ||
+ 锐化/模糊 | ||
+ 晕影 | ||
+ 像素化 | ||
+ 曲线 | ||
|
||
### 下载 | ||
|
||
[Releases](https://github.com/atticus-lv/VirtualStreetSnap/releases) | ||
|
||
### 开发 | ||
|
||
环境 | ||
|
||
+ .net 8.0 (C# 12.0) | ||
+ win10 x64 | ||
|
||
构建 (默认启用aot编译) | ||
|
||
``` | ||
dotnet publish | ||
``` |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Application xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
x:Class="LiveChartCurveControl.App" | ||
xmlns:local="using:LiveChartCurveControl" | ||
RequestedThemeVariant="Default"> | ||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. --> | ||
|
||
<Application.DataTemplates> | ||
<local:ViewLocator/> | ||
</Application.DataTemplates> | ||
|
||
<Application.Styles> | ||
<FluentTheme /> | ||
</Application.Styles> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Avalonia; | ||
using Avalonia.Controls.ApplicationLifetimes; | ||
using Avalonia.Data.Core; | ||
using Avalonia.Data.Core.Plugins; | ||
using Avalonia.Markup.Xaml; | ||
using LiveChartCurveControl.ViewModels; | ||
using LiveChartCurveControl.Views; | ||
|
||
namespace LiveChartCurveControl; | ||
|
||
public partial class App : Application | ||
{ | ||
public override void Initialize() | ||
{ | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
|
||
public override void OnFrameworkInitializationCompleted() | ||
{ | ||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) | ||
{ | ||
// Line below is needed to remove Avalonia data validation. | ||
// Without this line you will get duplicate validations from both Avalonia and CT | ||
BindingPlugins.DataValidators.RemoveAt(0); | ||
desktop.MainWindow = new MainWindow | ||
{ | ||
DataContext = new MainWindowViewModel(), | ||
}; | ||
} | ||
|
||
base.OnFrameworkInitializationCompleted(); | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport> | ||
<ApplicationManifest>app.manifest</ApplicationManifest> | ||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Models\"/> | ||
<AvaloniaResource Include="Assets\**"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Avalonia" Version="11.2.2"/> | ||
<PackageReference Include="Avalonia.Desktop" Version="11.2.2"/> | ||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.2"/> | ||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.2"/> | ||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> | ||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.2"/> | ||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1"/> | ||
<PackageReference Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc4.5" /> | ||
<PackageReference Include="MathNet.Numerics" Version="5.0.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Avalonia; | ||
using System; | ||
|
||
namespace LiveChartCurveControl; | ||
|
||
sealed class Program | ||
{ | ||
// Initialization code. Don't use any Avalonia, third-party APIs or any | ||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized | ||
// yet and stuff might break. | ||
[STAThread] | ||
public static void Main(string[] args) => BuildAvaloniaApp() | ||
.StartWithClassicDesktopLifetime(args); | ||
|
||
// Avalonia configuration, don't remove; also used by visual designer. | ||
public static AppBuilder BuildAvaloniaApp() | ||
=> AppBuilder.Configure<App>() | ||
.UsePlatformDetect() | ||
.WithInterFont() | ||
.LogToTrace(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using Avalonia.Controls; | ||
using Avalonia.Controls.Templates; | ||
using LiveChartCurveControl.ViewModels; | ||
|
||
namespace LiveChartCurveControl; | ||
|
||
public class ViewLocator : IDataTemplate | ||
{ | ||
public Control? Build(object? data) | ||
{ | ||
if (data is null) | ||
return null; | ||
|
||
var name = data.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal); | ||
var type = Type.GetType(name); | ||
|
||
if (type != null) | ||
{ | ||
var control = (Control)Activator.CreateInstance(type)!; | ||
control.DataContext = data; | ||
return control; | ||
} | ||
|
||
return new TextBlock { Text = "Not Found: " + name }; | ||
} | ||
|
||
public bool Match(object? data) | ||
{ | ||
return data is ViewModelBase; | ||
} | ||
} |
Oops, something went wrong.