DelphiµÄÓï·¨ÎÊÌâ - Delphi / ÓïÑÔ»ù´¡/Ëã·¨/ϵͳÉè¼Æ
Àý×Ó³ÌÐò¼û¸½¼þ£¬ÓÃDelphi 7½øÐбàÒë
ÎÊÌâ´úÂëΪ
Delphi(Pascal) code:
if Node.ChildNodes <> nil then
begin
for i := 0 to Node.ChildNodes.Count - 1 do
begin
cNode := Node.ChildNodes.Get(i);
shapetype := cNode.NodeName;
if (shapeType = 'line') then
begin
shape := TLine.Create;
shape.ShapeType := shapetype;
shape.Name := cNode.AttributeNodes.Nodes['name'].NodeValue;
TLine(shape).X1 := cNode.AttributeNodes.Nodes['x1'].NodeValue;
TLine(shape).Y1 := cNode.AttributeNodes.Nodes['y1'].NodeValue;
TLine(shape).X2 := cNode.AttributeNodes.Nodes['x2'].NodeValue;
TLine(shape).Y2 := cNode.AttributeNodes.Nodes['y2'].NodeValue;
try
TLine(shape).Color := StringToColor(cNode.AttributeNodes.Nodes['color'].NodeValue);
except
TLine(shape).Color := ClBlue;
end;
end
else if (shapeType = 'rectangle') then
begin
shape := TRectangle.Create;
shape.ShapeType := shapetype;
shape.Name := cNode.AttributeNodes.Nodes['name'].NodeValue;
TRectangle(shape).X1 := cNode.AttributeNodes.Nodes['x1'].NodeValue;
TRectangle(shape).Y1 := cNode.AttributeNodes.Nodes['y1'].NodeValue;
TRectangle(shape).X2 := cNode.AttributeNodes.Nodes['x2'].NodeValue;
Ïà¹ØÎÊ´ð£º
Ò»Ö±ÏëʹÓÃdll£¬µ«delphiµÄdll×Ó´°Ìå¾³£Óи÷ÖÖÎÊÌ⣬±ÈÈçÖ÷´°¿ÚÓëdll×Ó´°¿ÚµÄ½¹µãÎÊÌ⣬×Ó´°¿ÚÖпؼþµÄtab¼ü¡¢Èȼü¡¢enter¼üµÈµÄÎÊÌ⣬×Ó´°¿ÚÍ˳öµÄÎÊÌâ¡¢Æ½Ãæ°´Å¥ÎÊÌâµÈµÈ£¬ÍøÕ¾ÉϽøÐÐÁËËÑË÷£¬Ã»ÓбȽÏÍêÃÀµÄ½â¾ö· ......
²»ºÃÒâ˼£¬You are fooled£¡
¹þ¹þ£¬ÓÞÈ˽ڿìÀÖ£¡ÎÒÒªÄÜÈ«¸ãµ½£¬ÎÒ¾ÍÈ¥¹ú¼Ò°²È«¾ÖÁË£¡
ºÇ£¬Äã»¹ÕæÏñ°²È«¾ÖµÄ
b4
¹þ¹þ£¡
ÕæºÃ
b4
ÎÒµ¹
¹þ¹þ£¡
½ñÌìÒ»¶¨ÒªÇõ¹Ò»個»ðÐǵġ£
ÕâÀïÓÐºÜ ......
ËÄܸøÎÒ¸ö¼òµ¥µÄÀý×Ó
delphi½ÓÊÜUDPÊý¾Ý°üµÄ Òª½ÓÊÕÊý×éµÄ
×îºÃÊÇÓà IdTCPserver1µÄ
×îºÃ»¹Óз¢Ë͵IJ¿·Ö
±¾È˲ËÄñ£¬Ð»Ð»¸÷λÁË£¡£¡
Â¥ÉϸøµÄÊÇTCPµÄ°É ÎÒÒªUDPµÄ
лл£¡£¡
ÒýÓÃ
×îº ......
Ö÷´°Ìå:
Delphi(Pascal) code:
procedure TfrmMain.btnResumeClick(Sender: TObject);
begin
myThread := TClientThread.Create(LeftPart(cbbServer.Text, ':'), StrToInt(RightPart(cbbServer.Text, ':')) ......