DZ.WPF.DZHelperV2
1.0.4
dotnet add package DZ.WPF.DZHelperV2 --version 1.0.4
NuGet\Install-Package DZ.WPF.DZHelperV2 -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DZ.WPF.DZHelperV2" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DZ.WPF.DZHelperV2 --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DZ.WPF.DZHelperV2, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DZ.WPF.DZHelperV2 as a Cake Addin #addin nuget:?package=DZ.WPF.DZHelperV2&version=1.0.4 // Install DZ.WPF.DZHelperV2 as a Cake Tool #tool nuget:?package=DZ.WPF.DZHelperV2&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DzHelperV2.dll
Dll dự kiến có các helper liên quan đến:
- Adb
- Ldplayer
- Selnium
Có thể sử dụng để tương tác với các ứng dụng android, giả lập android, web browser.
Các Dll được tích hợp:
- CommunityToolkit.Mvvm
Ngôn ngữ
- Dll: wpf class library
- Application: wpf application >>c#,wpf
Installation
https://www.nuget.org/packages/DZ.WPF.DZHelperV2/
Đặc điểm dll.
- Tạo các module function trong class dll.
- Tạo commands từ trong class dll.
- Binding commands lên view. để khỏi tạo lại nhiều xaml.
Cách sử dụng Ldplayer
Class Helper >> list module
public static async Task Test(object item)
{
}
public static void LaunchInstance(object item, string nameOrIndex)
{
item.ChangeProperty($"launch");
ExecuteCommand($"launch --index {nameOrIndex}");
}
public static void QuitInstance(object item, string nameOrIndex)
{
item.ChangeProperty("quit");
ExecuteCommand($"quit --index {nameOrIndex}");
}
- object item: item là model. nhưng code này là trong dll.
- còn model để trong project application thì vẫn binding Property Status để update lên views được.
Class Helper >> return commands
public static List<CommandInfo> CommandsMain(int index)
{
List<CommandInfo> commands = new List<CommandInfo>();
commands.Add(new CommandInfo()
{
Name = "Load Devices",
Action = async item => Test(item)
});
foreach (var command in commands)
{
command.Group = "LdPlayer-Main";
}
return commands;
}
trong viewmodel hãy binging list<CommandInfo> lên ItemControl lên views
Demo 1.0.1
khi click vào button Load Devices thì function Test sẽ hoạt động
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0-windows7.0 is compatible. net8.0-windows was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0-windows7.0
- CommunityToolkit.Mvvm (>= 8.4.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
MIT