На Math
Add(MainForm,12554562,294,168) { Width=332 Height=167 } Add(Edit,12658659,378,168) { Left=40 Top=25 Text="0" } Add(Edit,14405351,420,168) { Left=110 Top=25 Text="1" } Add(Edit,7022689,462,168) { Left=180 Top=25 Text="0" } Add(Edit,1435577,504,168) { Left=250 Top=25 Text="1" } Add(Label,5803453,525,259) { Left=150 Top=80 } Add(Button,11984370,357,259) { Left=40 Top=80 link(onClick,6532954:doString,[]) } Add(Math,2285938,469,259) { OpType=1 Op1=1111 link(onResult,5803453:doText,[]) } Add(FormatStr,6532954,413,259) { DataCount=4 Mask="%1%2%3%4" Point(FString) link(onFString,2285938:doOperation,[]) link(Str1,12658659:Text,[(419,226)(384,226)]) link(Str2,14405351:Text,[]) link(Str3,7022689:Text,[(433,226)(468,226)]) link(Str4,1435577:Text,[(440,240)(510,240)]) }
На MathParse
Add(MainForm,12554562,357,98) { Width=332 Height=167 } Add(Edit,12658659,441,98) { Left=40 Top=25 Text="0" } Add(Edit,14405351,483,98) { Left=110 Top=25 Text="1" } Add(Edit,7022689,525,98) { Left=180 Top=25 Text="0" } Add(Edit,1435577,567,98) { Left=250 Top=25 Text="1" } Add(Label,5803453,539,189) { Left=150 Top=80 } Add(Button,11984370,413,189) { Left=40 Top=80 link(onClick,13542971:doCalc,[]) } Add(MathParse,13542971,476,189) { DataCount=4 MathStr="1000*(1-%1)+100*(1-%2)+10*(1-%3)+(1-%4)" link(onResult,5803453:doText,[]) link(X1,12658659:Text,[(482,159)(447,159)]) link(X2,14405351:Text,[]) link(X3,7022689:Text,[(496,159)(531,159)]) link(X4,1435577:Text,[(503,173)(573,173)]) }
|