parent
80d1d13245
commit
e084664fff
|
|
@ -0,0 +1,51 @@
|
|||
object bconfig_cmd_shower:t_bconfig_cmd_shower
|
||||
caption="ÃüÁîÐÐ"
|
||||
height=250
|
||||
left=610
|
||||
minmaxbox=false
|
||||
onclose=bconfig_cmd_shower_close
|
||||
top=406
|
||||
width=508
|
||||
object panel1:tpanel
|
||||
align=albottom
|
||||
caption="panel1"
|
||||
height=45
|
||||
left=0
|
||||
parentcolor=true
|
||||
top=166
|
||||
width=492
|
||||
wsdlgmodalframe=false
|
||||
object bt_ok:tbtn
|
||||
caption="Íê³É"
|
||||
height=26
|
||||
left=406
|
||||
onclick=btn1_clk
|
||||
top=8
|
||||
width=78
|
||||
end
|
||||
object bt_copy:tbtn
|
||||
caption="¸´ÖÆ"
|
||||
height=26
|
||||
left=291
|
||||
onclick=bt_copy_clk
|
||||
top=8
|
||||
width=94
|
||||
end
|
||||
end
|
||||
object memo1:tmemo
|
||||
align=alclient
|
||||
autogutterwidth=true
|
||||
caption="memo1"
|
||||
height=166
|
||||
left=0
|
||||
readonly=true
|
||||
top=0
|
||||
width=492
|
||||
end
|
||||
object cpbord:tclipboard
|
||||
left=211
|
||||
top=240
|
||||
height=30
|
||||
width=30
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
type t_bconfig_cmd_shower=class(tdcreateform)
|
||||
uses tslvcl;
|
||||
panel1:tpanel;
|
||||
bt_ok:tbtn;
|
||||
memo1:tmemo;
|
||||
bt_copy:tbtn;
|
||||
cpbord:tclipboard;
|
||||
function Create(AOwner);override; //构造
|
||||
begin
|
||||
inherited;
|
||||
end
|
||||
function bt_copy_clk(o;e);virtual;
|
||||
begin
|
||||
s := memo1.text;
|
||||
cpbord.text := replacetext(s,"\r\n"," ");;
|
||||
end
|
||||
|
||||
function bconfig_cmd_shower_close(o;e);
|
||||
begin
|
||||
EndModal(1);
|
||||
e.skip := true;
|
||||
end
|
||||
function btn1_clk(o;e);
|
||||
begin
|
||||
EndModal(1);
|
||||
end
|
||||
function set_config_text(s);
|
||||
begin
|
||||
memo1.text := s;
|
||||
end
|
||||
function DoControlAlign();override;//对齐子控件
|
||||
begin
|
||||
//当窗口大小改变时,该函数会被调用,
|
||||
//可以通过 clientrect 获取客户区大小,设置子控件的位置以及大小
|
||||
//如果自己处理了子控件的对齐,就可以去掉 inherited
|
||||
inherited;
|
||||
end
|
||||
function Recycling();override; //回收变量
|
||||
begin
|
||||
inherited;
|
||||
ci := self.classinfo(); //将成员变量赋值为nil避免循环引用
|
||||
for i,v in ci["members"] do
|
||||
begin
|
||||
if v["const"] then continue;
|
||||
if v["static"] then continue;
|
||||
invoke(self,v["name"],nil);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -62,7 +62,16 @@ type t_compile_config=class(tdcreateform)
|
|||
function bt_cmd_clk(o;e);
|
||||
begin
|
||||
s := format_build_params(get_config());
|
||||
MessageBoxA(s,"编译命令行",0,o);
|
||||
if not fcmd_shower then
|
||||
begin
|
||||
fcmd_shower := new t_bconfig_cmd_shower(self);
|
||||
fcmd_shower.Visible := false;
|
||||
fcmd_shower.parent := self;
|
||||
end
|
||||
fcmd_shower.Left := Left;
|
||||
fcmd_shower.top := top+200;
|
||||
fcmd_shower.set_config_text(s);
|
||||
fcmd_shower.ShowModal();
|
||||
end
|
||||
function bt_tsgadd_clk(o;e);virtual;
|
||||
begin
|
||||
|
|
@ -402,10 +411,11 @@ type t_compile_config=class(tdcreateform)
|
|||
r := d["build"]+="="+format('"%s" ',d["buildfile"]);
|
||||
if d["libpath"] and ifstring(d["libpath"]) then
|
||||
begin
|
||||
r+="-libpath "+d["libpath"]+" ";
|
||||
r+="\r\n-libpath "+d["libpath"]+" ";
|
||||
|
||||
end else
|
||||
r+="-libpath ."+ioFileseparator()+" ";
|
||||
r+="\r\n-libpath ."+ioFileseparator()+" ";
|
||||
r+="\r\n";
|
||||
r += f_b_a_param(d,"exports");
|
||||
r += f_b_a_param(d,"dependsdir");
|
||||
r += f_b_a_param(d,"depends");
|
||||
|
|
@ -435,4 +445,5 @@ type t_compile_config=class(tdcreateform)
|
|||
end
|
||||
return r;
|
||||
end
|
||||
fcmd_shower;
|
||||
end
|
||||
|
|
|
|||
|
|
@ -166,7 +166,12 @@ type tapplication=class(tcomponent)
|
|||
FApplicationWindow.bindmessage(WM_ACTIVATEAPP,thisfunction(WMACTIVATEAPP));
|
||||
end
|
||||
function Notification(a,op);override;
|
||||
begin
|
||||
begin
|
||||
if op=opclosemainwnd and a= Fmainform then
|
||||
begin
|
||||
FApplicationWindow._send_(WM_CLOSE,0,0);
|
||||
return ;
|
||||
end
|
||||
if op=opRecycling then
|
||||
begin
|
||||
if a=Fmainform then
|
||||
|
|
@ -210,7 +215,7 @@ type tapplication=class(tcomponent)
|
|||
**}
|
||||
CallMessgeFunction(Foldforminfo["close"],o,e);
|
||||
if e.skip then exit;
|
||||
FApplicationWindow._send_(WM_CLOSE,0,0);
|
||||
//FApplicationWindow._send_(WM_CLOSE,0,0);
|
||||
end
|
||||
function mainformminmize(o,e);
|
||||
begin
|
||||
|
|
@ -1029,6 +1034,12 @@ type TVCForm = class(TScrollingWinControl)
|
|||
end
|
||||
end
|
||||
end
|
||||
function DoWMCLOSE(o,e);override;
|
||||
begin
|
||||
inherited;
|
||||
if e.skip then exit;
|
||||
else NotifyComponent(self(true),opclosemainwnd,nil);
|
||||
end
|
||||
function Notification(AComponent:TComponent;Operation:TOperation);override;
|
||||
begin
|
||||
{**
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ type tconstant=class(talign,TAnchorKind,TFormStyle,TComponentState,TComponentSty
|
|||
end
|
||||
type TSLUICONST=class(tmacroconst,tconstant)
|
||||
static const WM_TRAY=0x464;static const opInsert="opInsert+";
|
||||
static const opRemove="opRemove-";static const opRecycling="opRecycling-";
|
||||
static const opRemove="opRemove-";static const opRecycling="opRecycling-";static const opclosemainwnd="~closemianwnd~";
|
||||
end
|
||||
type ws2def_h=class()
|
||||
static const AF_UNSPEC=0x0;static const AF_UNIX=0x1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue