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

Use Avalonia to rewrite this App #5

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0ba13a3
移动 WPF 项目,因为想做 Linux 版本
walterlv Jul 3, 2024
52b2d9f
升级项目结构
walterlv Jul 3, 2024
a8e8c4d
添加 Avalonia 版本
walterlv Jul 3, 2024
e6eacfd
脚手架
walterlv Jul 3, 2024
d39dcba
Move window item
walterlv Jul 3, 2024
3f5a133
More UI
walterlv Jul 4, 2024
60b6cfd
仿 GitHub App 过滤器样式
walterlv Jul 4, 2024
83993c0
Add basic window info region
walterlv Jul 5, 2024
7e1bb2a
Add detail pages.
walterlv Jul 5, 2024
7571c59
Add icons for UI
walterlv Jul 5, 2024
717b975
Add windows info page
walterlv Jul 5, 2024
41458cc
Add more pages
walterlv Jul 7, 2024
2c9999d
微调文案、默认选择、边距
walterlv Jul 7, 2024
6a87c6c
Let enums work.
walterlv Jul 7, 2024
ad59468
Let filters work.
walterlv Jul 7, 2024
9ca48a8
错误提示
walterlv Jul 7, 2024
c7be097
重新加载
walterlv Jul 7, 2024
2dabcc6
common features.
walterlv Jul 7, 2024
7581242
reveal
walterlv Jul 7, 2024
dd2c7f2
window style
walterlv Jul 7, 2024
97a1168
simplify
walterlv Jul 7, 2024
fe184cd
style ex
walterlv Jul 7, 2024
1ccdf79
class styles.
walterlv Jul 7, 2024
b0e9bbc
Fix conversion
walterlv Jul 7, 2024
2da52f7
header style
walterlv Jul 7, 2024
5313cfc
column width
walterlv Jul 8, 2024
831e9ef
make header clearer
walterlv Jul 8, 2024
48f23d6
dwm page
walterlv Jul 8, 2024
68509e0
operations page
walterlv Jul 8, 2024
687ecdd
other page.
walterlv Jul 8, 2024
4dd9ab7
reveal in file manager
walterlv Jul 8, 2024
9f808b3
Add capture button
walterlv Jul 8, 2024
670f7e5
change some styles.
walterlv Jul 8, 2024
a3eb7de
Add version.
walterlv Jul 8, 2024
3cd2ce2
Use default lang.
walterlv Jul 8, 2024
1512032
Add preview
walterlv Jul 8, 2024
b422f2e
Fit linux window style.
walterlv Jul 8, 2024
19a9a15
Add settings page.
walterlv Jul 8, 2024
e87c073
Let linux uac button use no space.
walterlv Jul 9, 2024
0f7ae56
let filter work more.
walterlv Jul 9, 2024
7ebe4cc
Add linux support (first commit)
walterlv Jul 9, 2024
8a7dbbd
Import sewzc's code to find linux windows.
walterlv Jul 9, 2024
7da272c
实现一些 Linux 的窗口信息和属性;修复命名空间
SeWZC Jul 9, 2024
f0dddcf
Merge pull request #1 from SeWZC/master
walterlv Jul 10, 2024
77fe59b
change list to tree (first)
walterlv Jul 10, 2024
31b0b42
Tree view style.
walterlv Jul 10, 2024
b7369ea
Group by process
walterlv Jul 10, 2024
5404c0f
group by process
walterlv Jul 10, 2024
df78b7f
change treeviewitem style.
walterlv Jul 10, 2024
1255ffd
linux window tree.
walterlv Jul 10, 2024
0e32987
linux property page style
walterlv Jul 10, 2024
12d3f51
use win11 expander style for linux properties page.
walterlv Jul 10, 2024
fbf904a
soft toml lines.
walterlv Jul 10, 2024
8818021
reduce indents.
walterlv Jul 10, 2024
ae3fa84
fix coordinate
walterlv Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
333 changes: 281 additions & 52 deletions .gitignore

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>

<PropertyGroup>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
</PropertyGroup>

</Project>
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

A tool to debug window.

Get releases from [here](https://gitlab.sdlsj.net/lsj/windowdebugger/-/releases) or [my scoop bucket](https://github.com/kkwpsv/ScoopBucket).
Get releases from [here](https://gitlab.sdlsj.net/lsj/windowdebugger/-/releases) or [my scoop bucket](https://github.com/kkwpsv/ScoopBucket).

![en](docs/images/Preview.jpg)

![zh-cn](docs/images/Preview.zh-cn.jpg)
18 changes: 17 additions & 1 deletion WindowDebugger.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32408.312
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowDebugger", "WindowDebugger\WindowDebugger.csproj", "{29BD45C3-4086-4145-B7E6-46C09A20870C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowDebugger.old", "WindowDebugger\WindowDebugger.old.csproj", "{29BD45C3-4086-4145-B7E6-46C09A20870C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{28DF4C15-2275-4BFE-AD04-D14B423E0F68}"
ProjectSection(SolutionItems) = preProject
build.ps1 = build.ps1
pack.ps1 = pack.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{E169165C-9FC2-4BB6-84C9-61E62F952C12}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
README.md = README.md
Directory.Build.props = Directory.Build.props
.gitlab-ci.yml = .gitlab-ci.yml
LICENSE = LICENSE
global.json = global.json
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowDebugger", "src\WindowDebugger\WindowDebugger.csproj", "{C381BD8F-08A0-4833-B16D-E0ECB65EB62F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +33,10 @@ Global
{29BD45C3-4086-4145-B7E6-46C09A20870C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29BD45C3-4086-4145-B7E6-46C09A20870C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29BD45C3-4086-4145-B7E6-46C09A20870C}.Release|Any CPU.Build.0 = Release|Any CPU
{C381BD8F-08A0-4833-B16D-E0ECB65EB62F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C381BD8F-08A0-4833-B16D-E0ECB65EB62F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C381BD8F-08A0-4833-B16D-E0ECB65EB62F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C381BD8F-08A0-4833-B16D-E0ECB65EB62F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>icon.ico</ApplicationIcon>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>WindowDebugger</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Binary file added docs/images/Preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Preview.zh-cn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"msbuild-sdks": {
"allowPrerelease": false
}
}
122 changes: 122 additions & 0 deletions src/WindowDebugger/App.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="WindowDebugger.App"
RequestedThemeVariant="Dark">

<Application.Resources>
<ResourceDictionary>

<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="Themes/ListBoxItem.axaml" />
<ResourceInclude Source="Themes/TreeViewItem.axaml" />
</ResourceDictionary.MergedDictionaries>

<x:Double x:Key="ComboBoxThemeMinWidth">0</x:Double>
<FontFamily x:Key="MonoFontFamily">/Assets/Fonts/FiraCode-Regular.ttf#Fira Code</FontFamily>
<FontFamily x:Key="MonoFontFamilyLight">/Assets/Fonts/FiraCode-Light.ttf#Fira Code Light</FontFamily>
<FontFamily x:Key="MonoFontFamilyBold">/Assets/Fonts/FiraCode-Retina.ttf#Fira Code Retina</FontFamily>

</ResourceDictionary>
</Application.Resources>

<Application.Styles>

<FluentTheme />

<Style Selector="TextBox">
<Setter Property="BorderBrush" Value="#20FFFFFF" />
<Setter Property="CornerRadius" Value="6" />
</Style>
<Style Selector="TextBox.Code">
<Setter Property="FontFamily" Value="{StaticResource MonoFontFamily}" />
</Style>

<Style Selector="ComboBox">
<Setter Property="BorderBrush" Value="#20FFFFFF" />
<Setter Property="CornerRadius" Value="6" />
</Style>
<Style Selector="ComboBox.Code">
<Setter Property="FontFamily" Value="{StaticResource MonoFontFamily}" />
</Style>

<Style Selector="Button">
<Setter Property="Background" Value="#10FFFFFF" />
<Setter Property="CornerRadius" Value="6" />
</Style>

<Style Selector="ToggleButton">
<Setter Property="Background" Value="#10FFFFFF" />
<Setter Property="CornerRadius" Value="6" />
</Style>

<Style Selector="HyperlinkButton">
<Setter Property="Background" Value="Transparent" />
<Setter Property="CornerRadius" Value="6" />
</Style>

<Style Selector="DropDownButton">
<Setter Property="Foreground" Value="#80FFFFFF" />
<Setter Property="Background" Value="#20FFFFFF" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="8 0 -4 0" />
<Setter Property="Height" Value="24" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="24" />
<Setter Property="CornerRadius" Value="12" />
<Style Selector="^ /template/ ContentPresenter">
<Setter Property="FontSize" Value="10" />
</Style>
<Style Selector="^ /template/ PathIcon#DropDownGlyph">
<Setter Property="RenderTransform" Value="scale(0.75) translate(4px,0px)" />
</Style>
</Style>

<Style Selector="CheckBox.Code">
<Setter Property="FontFamily" Value="{StaticResource MonoFontFamily}" />
</Style>

<Style Selector="TextBox">
<Setter Property="Margin" Value="0 4" />
<Setter Property="Padding" Value="8 4" />
<Setter Property="Height" Value="32" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="TextWrapping" Value="Wrap" />
<Style Selector="^[IsReadOnly=True]">
<Setter Property="Foreground" Value="#999999" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="#20FFFFFF" />
<Style Selector="^:pointerover /template/ Border#PART_BorderElement">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="#20FFFFFF" />
</Style>
<Style Selector="^:focus /template/ Border#PART_BorderElement">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="#20FFFFFF" />
</Style>
</Style>
</Style>
<Style Selector="TextBox.CopyableText">
<Setter Property="CornerRadius" Value="0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="IsReadOnly" Value="True" />
<Style Selector="^:pointerover /template/ Border#PART_BorderElement">
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="^:focus /template/ Border#PART_BorderElement">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Style>
</Style>

<Style Selector="Separator">
<Setter Property="Background" Value="#20FFFFFF" />
</Style>

</Application.Styles>

</Application>
26 changes: 26 additions & 0 deletions src/WindowDebugger/App.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using WindowDebugger.Localizations;

namespace WindowDebugger;

public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted()
{
// Lang.SetCurrent("en");

if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}

base.OnFrameworkInitializationCompleted();
}
}
Binary file not shown.
Binary file not shown.
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.
Binary file added src/WindowDebugger/Assets/Icons/icon.128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WindowDebugger/Assets/Icons/icon.16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WindowDebugger/Assets/Icons/icon.24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WindowDebugger/Assets/Icons/icon.256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WindowDebugger/Assets/Icons/icon.32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WindowDebugger/Assets/Icons/icon.48x48.png
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.
Binary file added src/WindowDebugger/Assets/Icons/icon.64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WindowDebugger/Assets/Icons/icon.96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WindowDebugger/Assets/Icons/icon.ico
Binary file not shown.
37 changes: 37 additions & 0 deletions src/WindowDebugger/Assets/UI/bar-chart-graph-svgrepo-com.svg
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.
7 changes: 7 additions & 0 deletions src/WindowDebugger/Assets/UI/browser-ui-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions src/WindowDebugger/Assets/UI/connections-scheme-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading