这可能是关于现实世界中不需要的问题.但我想知道我们能做到吗(只是为了知识)
我可以在没有VCL表单的情况下显示vcl组件.我们可以创建和使用非可视化vcl,但我们可以在visual vcl中进行,并使其在屏幕上可见.
或者至少我们可以在使用Windows API创建的表单中放置一个VCL,
您好,如何Blazor使用参数重定向到另一个页面?
@page "/auth"
@using Microsoft.AspNetCore.Blazor.Services;
@inject AuthService auth
@inject IUriHelper urihelper;
<input type="text" bind="@Username" />
<button onclick="@AuthAsync">Authenticate</button>
@functions{
public string Username { get; set; }
public string url = "/home";
public async Task AuthAsync()
{
var ticket=await this.auth.AuthenticateAsync(Username);
urihelper.NavigateTo(url); //i see no overload that accepts parameters
}
}
Run Code Online (Sandbox Code Playgroud)
在这种情况下,我想导航到/home页面并为其提供一个字符串作为参数。
我有机会让我的软件用户从openfile对话框中选择dll.(因此我的用户可以从我的网站下载dll并将其与主项目一起使用).一切都工作正常,甚至可以发现dll是由我提供或选择了一个无效的DLL.但如果用户选择重命名的文件(例如:apple.txt文件重命名为apple.dll),问题就会引发.我输入了这样的代码
尝试dllHandle:= LoadLibrary(pwidechar(openfiledialog1.filename));
catch {showmessage如果它不是一个dll(但它可以是任何dll,它会检查这是我的dll或第三方之后)}}
结束;
delphi显示的错误信息是"选择了错误的库图像"
但是如果用户选择了无效的dll,它会显示自己的错误消息并且被攻击,那么尝试catch是行不通的.
任何人都可以帮助我,我正在使用delphi 2009
我希望我自己的pascal代码被执行它还有一些使用文件和其他复杂的函数就像Delphi代码我可以这样做
就在今天,我检查了我的ubuntu并安装了葡萄酒,
Delphi 3到7工作得很好(Rad工作室因为使用.net剪贴板而无法工作).但我所做的所有应用程序都完美无缺!!!!! 我听说它在使用WineBottler的mac中运行良好
是否有可能创建一个头linux可执行文件并将我的vcl应用程序和requird wine东西放入其中并作为单个可执行文件分发(.bin)
Nick Hodges在一篇文章中提到以下内容仍在编写:
var
WeirdLookingArray: array(.1..10.) of string;
Run Code Online (Sandbox Code Playgroud)
的意义是什么 "." 在开始和结束?
以下代码是我修改的(与 10.5.8 一起使用)形成示例,以便使用Indy Mail 服务器中描述的 smtp 客户端独立发送电子邮件
以下来自 INDY smtpserver 示例
procedure TForm1.btnServerOnClick(Sender: TObject);
begin
IdSMTPServer1.active := true;
end;
procedure TForm1.btnServerOffClick(Sender: TObject);
begin
IdSMTPServer1.active := false;
end;
procedure TForm1.IdSMTPServer1MailFrom(ASender: TIdSMTPServerContext;
const AAddress: string; AParams: TStrings; var VAction: TIdMailFromReply);
begin
// Here we are testing the MAIL FROM line sent to the server.
// MAIL FROM address comes in via AAddress. VAction sets the return action to the server.
// The following actions can be returned to the server: …Run Code Online (Sandbox Code Playgroud) 我正在创建一个类似于对象检查器的控件,所以我想将属性的任何更改分配给相关对象.
var
v:TValue ;
ctx : TRttiContext;
begin
// k.IsOrdinal := true ;
v := v.FromVariant(2) ;
ctx.GetType(tButton).GetProperty('Style').SetValue(Button1, v.AsOrdinal);
end;
Run Code Online (Sandbox Code Playgroud)
上面是我的代码,但我收到无效的类型转换错误.
是否可以处理任何变量和枚举.(不需要对象和记录,因为它非常复杂)
以下是我的客户端代码,它从服务器检索文本并打印.
Socket socket = new Socket(ip, port);
InputStream in = socket.getInputStream();
OutputStream out = socket.getOutputStream();
String string = "Hello!\n";
byte buffer[] = string.getBytes();
out.write(buffer);
while ((character = in.read()) != -1){
System.out.print((char) character);
}
Run Code Online (Sandbox Code Playgroud)
我从服务器获取正确的值,但它一次又一次地发生,我怎样才能找到发送值的长度.
我有2个分量A和B,B是一个孩子A.是有什么样的EventEmitter(Angular)的Blazor?如何在父级中附加可以响应其子项输出的事件处理程序?
儿童
<button onclick="Emit">Press me</button>
@functions(){
[Parameter] // i do not know how the `Output` is called
private string Pressed {get;set;}
public void Emit()
{
//somehow emit `Pressed` to the parent , make him respond
}
}
Run Code Online (Sandbox Code Playgroud)
父组件
<Child [Pressed]="doSomething"> </Child>
@functions{
doSomething(string value){
Console.WriteLine("Child sent me : "+value);
}
}
Run Code Online (Sandbox Code Playgroud)
PS对不起语法错误,我对blazor很新.
delphi ×7
blazor ×2
c# ×2
delphi-2009 ×1
eventemitter ×1
indy ×1
interpreter ×1
java ×1
linux ×1
loadlibrary ×1
pascal ×1
routing ×1
rtti ×1
runtime ×1
sockets ×1
syntax ×1
try-catch ×1
vcl ×1
winapi ×1
wine ×1