Zijian666.Ccli
1.0.3
dotnet add package Zijian666.Ccli --version 1.0.3
NuGet\Install-Package Zijian666.Ccli -Version 1.0.3
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="Zijian666.Ccli" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Zijian666.Ccli --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Zijian666.Ccli, 1.0.3"
#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 Zijian666.Ccli as a Cake Addin #addin nuget:?package=Zijian666.Ccli&version=1.0.3 // Install Zijian666.Ccli as a Cake Tool #tool nuget:?package=Zijian666.Ccli&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
�����нӿ�
����
���ڸ�winform��Ŀ���������
������־
��װ�̳�
��Ŀʾ��
ʹ��˵��
0. ѭ��������������
// 0. ����̨�����������нӿڣ�������Ϊ������ж˿ں�
Ccli.OpenConsole(8037);
// 1. ���ӱ��ػ�Զ�������нӿ�
// ͬʱֻ����һ���������ڽ���״̬, �ظ����û᷵��null
foreach (var command in Ccli.ConnectAndReceives(8037, "127.0.0.1")!)
{
MessageBox.Show(command);
}
1. �¼���ʽ��������
// 0. ��ӽ��������¼�
Ccli.Rceiver += (sender, command) => MessageBox.Show(command);
// 1. ����̨�����������нӿڣ�������Ϊ������ж˿ں�
Ccli.OpenConsole(8037);
// 2. ���ӱ��������нӿ�
Ccli.Connect(8037, "127.0.0.1");
2. ��������ʵ��
// 0. ������ִ����
class Cli
{
private readonly Form _frm;
public Cli(Form frm) => _frm = frm;
[Description("�������ڱ���")]
public void Title(string str) => _frm.Invoke(new Action(() => _frm.Text = str));
[Description("��ӡ��־������̨")]
public void Log(string message) => Console.WriteLine(message ?? "<@null>");
}
// 1. ��ʵ��
Ccli.BindCli(new Cli(MainForm));
// 2. ����̨�����������нӿڣ�������Ϊ������ж˿ں�
Ccli.OpenConsole(8037);
// 3. ���ӱ��������нӿ�
Ccli.Connect(8037, "127.0.0.1");
ע������
���
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0-windows7.0 is compatible. net6.0-windows was computed. net7.0-windows was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.