Вверх ↑
Разработчик
Ответов: 26163
Рейтинг: 2127
#1: 2008-02-10 17:04:41 ЛС | профиль | цитата
Вариант с IntToBits



Add(MainForm,6168812,77,119)
{
 Left=20
 Top=105
 Width=296
 Height=281
 Position=1
 link(onCreate,10511176:doEvent1,[])
}
Add(ArrayEnum,11530578,217,140)
{
 link(onItem,12950487:doConvert,[])
 link(onEndEnum,9387158:doEnum,[(261,153)(261,219)(205,219)(205,286)])
 link(Array,533869:Array,[])
}
Add(StrList,10534379,343,140)
{
}
Add(ListBox,533869,203,70)
{
 Left=10
 Top=35
 Width=130
 Height=155
 TabOrder=-1
 Strings=#7:0010000|7:0111000|7:0110000|7:0000010|7:0100010|
}
Add(Convertor,12950487,273,140)
{
 Mode=7
 link(onResult,10534379:doAdd,[])
}
Add(StrList,1659569,343,280)
{
}
Add(ListBox,2303860,203,210)
{
 Left=145
 Top=35
 Width=130
 Height=155
 TabOrder=-1
 Strings=#7:0001000|7:0011000|7:0110000|7:0110010|7:0100010|
}
Add(ArrayEnum,9387158,217,280)
{
 link(onItem,15685451:doConvert,[])
 link(onEndEnum,2361031:doEnum,[(303,293)(303,216)])
 link(Array,2303860:Array,[])
}
Add(Convertor,15685451,273,280)
{
 Mode=7
 link(onResult,1659569:doAdd,[])
}
Add(ArrayEnum,2361031,357,210)
{
 link(onItem,1185272:doRead,[(401,216)(401,286)(345,286)(345,356)])
 link(onEndEnum,12521979:doData,[(411,223)(411,363)])
 link(Array,10534379:Array,[])
}
Add(ArrayRW,1185272,357,350)
{
 link(onRead,12521979:doOperation1,[])
 link(Array,1659569:Array,[])
 link(Index,2361031:Index,[])
}
Add(Edit,15479895,518,343)
{
 Left=160
 Top=195
 Width=30
 Text=""
}
Add(MultiElementEx,12521979,434,343)
{
 @Hint=#11:Coincidence|
 link(onEventData,15479895:doText,[])
 link(onResult,1846163:doText,[(492,356)(492,391)])
 link(Op2,2361031:Item,[(440,293)(363,293)])
}
BEGIN_SDK
  Add(EditMultiEx,16634185,21,21)
  {
   WorkCount=#11:doOperation|12:doOperation1|6:doData|
   EventCount=#11:onEventData|8:onResult|
   DataCount=#3:Op2|
   Width=489
   Height=291
   link(doOperation,10001985:doClear,[(269,27)(269,97)])
   link(doOperation1,5611236:doOperation,[(35,34)(35,76)])
   link(doData,1227567:doEvent1,[(245,41)(245,209)])
  }
  Add(Math,5611236,49,70)
  {
   OpType=6
   ResultType=0
   link(onResult,13113798:doEvent1,[])
   link(Op2,16634185:Op2,[(62,46)(27,46)])
  }
  Add(Hub,13113798,98,70)
  {
   OutCount=3
   link(onEvent1,10949165:doBits,[])
   link(onEvent2,7134683:doCalc,[(184,83)(184,160)])
  }
  Add(Memory,7725410,287,105)
  {
  }
  Add(Memory,14433286,280,98)
  {
  }
  Add(Memory,11543668,273,91)
  {
  }
  Add(Memory,5639956,266,84)
  {
  }
  Add(Memory,2800136,259,77)
  {
  }
  Add(Memory,7989143,252,70)
  {
  }
  Add(Math,9717891,364,154)
  {
   Op1=1
   ResultType=0
   link(onResult,10001985:doValue,[(408,160)(408,129)(359,129)(359,90)])
   link(Op2,14671923:Var2,[])
  }
  Add(Memory,10001985,371,84)
  {
   Default=Integer(0)
  }
  Add(MathParse,7134683,252,154)
  {
   DataCount=6
   MathStr="%1+%2+%3+%4+%5+%6"
   ResultType=0
   link(onResult,9717891:doOperation,[])
   link(X1,7989143:Value,[])
   link(X2,2800136:Value,[])
   link(X3,5639956:Value,[])
   link(X4,11543668:Value,[])
   link(X5,14433286:Value,[])
   link(X6,7725410:Value,[])
  }
  Add(IntToBits,10949165,175,70)
  {
   Count=6
   Data_0=Integer(0)
   Data_1=Integer(1)
   link(onBit1,7989143:doValue,[])
   link(onBit2,2800136:doValue,[])
   link(onBit3,5639956:doValue,[])
   link(onBit4,11543668:doValue,[])
   link(onBit5,14433286:doValue,[])
   link(onBit6,7725410:doValue,[])
  }
  Add(MathParse,11146612,406,252)
  {
   MathStr="%1*100 div 35"
   link(onResult,16634185:onResult,[(474,258)(474,34)])
   link(X1,8057683:Result,[])
  }
  Add(Hub,1227567,322,203)
  {
   link(onEvent1,8057683:doOperation,[])
   link(onEvent2,11146612:doCalc,[(380,216)(380,258)])
  }
  Add(GetDataEx,14671923,364,126)
  {
   link(Data,10001985:Value,[])
  }
  Add(Math,8057683,406,203)
  {
   OpType=1
   Op1=35
   ResultType=0
   link(onResult,16634185:onEventData,[(474,209)(474,27)])
   link(Op2,14671923:Var3,[(419,135)])
  }
END_SDK
Add(Hub,10511176,140,133)
{
 OutCount=3
 link(onEvent1,12521979:doOperation,[(303,139)(303,349)])
 link(onEvent2,11530578:doEnum,[])
}
Add(Label,926163,119,21)
{
 Left=45
 Top=10
 Width=55
 Height=17
 Font=[MS Sans Serif,8,1,0,1]
 Caption="One Cow"
}
Add(Label,1363523,203,21)
{
 Left=185
 Top=10
 Width=56
 Height=17
 Font=[MS Sans Serif,8,1,0,1]
 Caption="Tow Cow"
}
Add(Label,13461899,245,21)
{
 Left=80
 Top=205
 Width=74
 Height=17
 Font=[MS Sans Serif,8,1,0,1]
 Caption="Coincidence"
}
Add(Edit,1846163,518,385)
{
 Left=160
 Top=215
 Width=30
 Text=""
}
Add(Label,1893345,161,21)
{
 Left=195
 Top=217
 Width=13
 Height=17
 Font=[MS Sans Serif,8,1,0,1]
 Caption="%"
}

карма: 22

0