parent
888ec1c7d9
commit
c1a3ad1423
|
|
@ -1051,6 +1051,21 @@ type TProjectView = class(TVCForm) //
|
|||
if FTree.NameInTree(lowercase(n),nil,true)then return MessageboxA("重复的文件名","提示",0,self);
|
||||
nd := info[0];
|
||||
if not ifobj(nd) then return MessageboxA("父窗口错误","提示",0,self);
|
||||
/////////Ìí¼ÓusesÄÚÈÝ//
|
||||
r := FTslEditer.getuses(nd.gettsfname());
|
||||
if ifarray(r) and r then
|
||||
begin
|
||||
us := "uses ";
|
||||
for i,v in r do
|
||||
begin
|
||||
us+=v+",";
|
||||
end
|
||||
us[length(us)] :=";";
|
||||
end else
|
||||
begin
|
||||
us := "";
|
||||
end
|
||||
///////////
|
||||
ph := FTree.CurrentNode.FPath;
|
||||
fio := ioFileseparator();
|
||||
fn := array("name":n,"type":nd.FType,"dir":ph);
|
||||
|
|
@ -1062,7 +1077,7 @@ type TProjectView = class(TVCForm) //
|
|||
begin
|
||||
r := format(%%
|
||||
type %s=class(%s)
|
||||
uses tslvcl;
|
||||
%s
|
||||
function create(AOwner);
|
||||
begin
|
||||
inherited;
|
||||
|
|
@ -1080,7 +1095,7 @@ type %s=class(%s)
|
|||
|
||||
end
|
||||
|
||||
%%,n,nd.Fname);
|
||||
%%,n,nd.Fname,us);
|
||||
ReWriteString(ph,r);
|
||||
FTmfParser.ScriptPath := nd.gettmfname();
|
||||
r := FTmfParser.inheritedcoy(n+"1",n,nd.Fname);
|
||||
|
|
@ -1091,12 +1106,12 @@ end
|
|||
cc := FTslParser.GetClassAbstract();
|
||||
if ifarray(cc)then
|
||||
begin
|
||||
inh := cc["inherited"];
|
||||
|
||||
inh := cc["inherited"];
|
||||
end
|
||||
end
|
||||
FTree.SetFileToNode(fn);
|
||||
SaveProjInfo();
|
||||
nd.parent.expand();
|
||||
end
|
||||
function AddFormToCurrentDir(n); //添加窗口
|
||||
begin
|
||||
|
|
@ -1802,6 +1817,11 @@ BD141CA912494F502D48D224F45050274A21E03806FF2C7CA7516022D7D000000
|
|||
it := OpenAndGotoFileByName(n);
|
||||
if it then return it.Delfiled(fld,nn);
|
||||
end
|
||||
function getuses(n);
|
||||
begin
|
||||
it := OpenAndGotoFileByName(n);
|
||||
if it then return it.getuses();
|
||||
end
|
||||
function GetClassInfo(n); //获得信息
|
||||
begin
|
||||
if n and ifstring(n)then
|
||||
|
|
|
|||
|
|
@ -1149,6 +1149,13 @@ type TPageEditerItem=class(TPageItem)
|
|||
end
|
||||
end
|
||||
end
|
||||
function getuses();
|
||||
begin
|
||||
if not FTslParser then return 0;
|
||||
d := GetClassInfo();
|
||||
if not(d and ifarray(d))then return 0;
|
||||
return d["uses"]["info"];
|
||||
end
|
||||
function adduses(libs);//Ìí¼Óuses
|
||||
begin
|
||||
if not FTslParser then return 0;
|
||||
|
|
@ -2237,7 +2244,7 @@ type TEditer=class(TCustomcontrol) //
|
|||
function PageItemSelChanged(o,e);virtual;
|
||||
begin
|
||||
it := GetCurrentItem();
|
||||
if not it then return;
|
||||
if not it then return Caption := "editer...";
|
||||
//if JudgeItemState(it) then return ;
|
||||
FCurrentItemCode[length(FCurrentItemCode)]:= it;
|
||||
if it.fisnewfile then
|
||||
|
|
|
|||
|
|
@ -232,9 +232,13 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
{**
|
||||
@explan(˵Ã÷) tslÓï·¨¸ßÁÁÀà
|
||||
**}
|
||||
private
|
||||
fpairbegin;
|
||||
public
|
||||
function Create(AOwner);
|
||||
begin
|
||||
inherited;
|
||||
fpairbegin := array("select":1,"sselect":1,"update":1,"mselect":1,"vselect":1,"try":1,"begin":1,"type":1,"case":1);
|
||||
FSynBranch := 0;// 0, "tsl" "tslx"
|
||||
Clean();
|
||||
FChangeDeal := true;
|
||||
|
|
@ -416,8 +420,7 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
if FKeyWords[lwttk] then
|
||||
begin
|
||||
d.FFcolor := 0x0000FF;
|
||||
end
|
||||
else
|
||||
end else
|
||||
if FBinFunc[lwttk] then
|
||||
begin
|
||||
d.FFcolor := 0xcd0000;
|
||||
|
|
@ -449,7 +452,7 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
D.FMate := FCMBState.GetSate();
|
||||
end else
|
||||
|
||||
if (lwttk in array("select","sselect","update","mselect","vselect","try","begin","type","case")) then
|
||||
if fpairbegin[lwttk] then
|
||||
begin
|
||||
FCBEState.GetLeft();
|
||||
d.FMATe := FCBEState.GetSate();
|
||||
|
|
@ -848,7 +851,6 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
end
|
||||
end else
|
||||
if pos(vi,"`~@#$^&*)+-;,.?:[]|\\=><%/") then
|
||||
//if vi in array("`","~","@","#","$","^","&","*",")","+","-",";",",",".","?",":","[","]","|","\\","=",">","<","%") then
|
||||
begin
|
||||
SetTToken(tokens,ttk,idx-1);
|
||||
if vi=")" then
|
||||
|
|
@ -1817,7 +1819,5 @@ type TTsfFileParser = class() //
|
|||
return 0;
|
||||
return 0;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end.
|
||||
|
|
@ -788,11 +788,11 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
it := flines[i];
|
||||
if it and it.FMarked then
|
||||
begin
|
||||
dc.brush.Color := 0xFF00FF;
|
||||
dc.brush.Color := 0x12a4f6;//0xFF00FF;
|
||||
tr := r;
|
||||
tr[0]+= 1;
|
||||
tr[1]+= 1;
|
||||
tr[3]-= 1;
|
||||
tr[1]+= 2;
|
||||
tr[3]-= 4;
|
||||
dc.FillRect(tr);
|
||||
end
|
||||
if i=Fecruningto then
|
||||
|
|
@ -4148,7 +4148,6 @@ function CreateATslMemoUndoItem(AReason,AStart,AEnd,ChangeText,SelMode);
|
|||
begin
|
||||
return new TTslMemoUndoItem(AReason,AStart,AEnd,ChangeText,SelMode);
|
||||
end
|
||||
|
||||
InitialIzation
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue