Net2Com, в твоей схеме нужно было указать нулевую позицию данных в MemoryStream перед их чтением. Add(MainForm,3952998,175,70) { Width=242 Height=293 link(onCreate,11165079:doEvent1,[]) } Add(If_else,5491688,581,147) { link(onTrue,9362269:doEvent1,[]) link(Op1,4949098:1,[(587,131)(419,131)]) link(Op2,14053124:Size,[]) } Add(MemoryStream,3864290,231,112) { } Add(StreamPack,7064802,231,168) { DataCount=#1:1|1:2| link(onPack,52372:doSend,[]) link(1,3864290:Size,[(237,156)(244,156)]) link(2,3864290:Stream,[(244,156)(237,156)]) } Add(TCP_Client,52372,357,154) { Port=123 IP="127.0.0.1" DataType=3 Point(onError) } Add(TCP_Server,37674,357,84) { Port=123 DataType=3 Point(doCloseAll) Point(onError) Point(doSendByIp) link(onRead,4949098:doUnPack,[]) } Add(StreamUnPack,4949098,413,84) { DataCount=#1:1|1:2| link(onUnPack,14319484:doEvent1,[]) } Add(MemoryStream,14053124,581,77) { Point(doPosition) link(SrcStream,4949098:2,[(587,72)(458,72)(458,128)(426,128)]) } Add(Hub,14319484,476,84) { OutCount=4 link(onEvent1,14053124:doClear,[]) link(onEvent2,14053124:doCopy,[(556,97)(556,83)]) link(onEvent3,6094010:doData,[]) link(onEvent4,5491688:doCompare,[(518,111)(518,153)]) } Add(Hub,9362269,644,147) { link(onEvent1,7040765:doLoadFromStream,[]) link(onEvent2,7040765:doBitmap,[]) } Add(Jpeg,7040765,679,133) { Quality=100 Point(Stream) Point(doLoadFromStream) Point(doBitmap) link(onBitmap,6573010:doLoad,[]) link(Stream,14053124:Stream,[(685,125)(587,125)]) } Add(Image,6573010,742,133) { Width=200 Height=175 Color=0 Ctl3D=0 WinStyle=1 ViewStyle=3 Point(Handle) } Add(Button,9217890,182,168) { Left=80 Top=205 link(onClick,7064802:doPack,[]) } Add(Hub,11165079,238,84) { link(onEvent1,37674:doOpen,[]) link(onEvent2,11846632:doTimer,[]) } Add(Timer,11846632,287,91) { Interval=500 Enable=1 AutoStop=1 link(onTimer,52372:doOpen,[(342,97)(342,160)]) } Add(DoData,6094010,532,98) { Data=Integer(0) link(onEventData,14053124:doPosition,[(572,104)(572,97)]) }
|