home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / news / 563 / ocdemo / demo.txt < prev    next >
Text File  |  1993-10-09  |  3KB  |  209 lines

  1.                         OBJECTCRAFT TEXT FILE
  2.                         ---------------------
  3.  
  4. OBJECTS
  5. -------
  6.  
  7.  
  8. -Object: doneit
  9.     | STRING
  10.     |-Click  ---  YES
  11.     | STRING
  12.     |-Image  ---  done
  13.     | INTEGER
  14.     |-X  ---  264
  15.     | INTEGER
  16.     |-Y  ---  210
  17.     | INTEGER
  18.     |-count  ---  200
  19.  
  20. -Object: target
  21.     | INTEGER
  22.     |-count  ---  150
  23.     | INTEGER
  24.     |-y3  ---  125
  25.     | FLOAT
  26.     |-y2  ---  145600
  27.     | FLOAT
  28.     |-y1  ---  125.466667
  29.     | INTEGER
  30.     |-currentv  ---  1120
  31.     | STRING
  32.     |-Image  ---  bar
  33.     | INTEGER
  34.     |-Y  ---  174
  35.     | INTEGER
  36.     |-X  ---  473
  37.     | INTEGER
  38.     |-targetv  ---  3000
  39.  
  40. -Object: order
  41.     | FLOAT
  42.     |-price  ---  1.40
  43.     | INTEGER
  44.     |-number  ---  200
  45.     | INTEGER
  46.     |-total  ---  280
  47.     | INTEGER
  48.     |-Method: ftot  ---  0
  49.  
  50. -Object: salestoday
  51.     | INTEGER
  52.     |-salesq  ---  800
  53.     | INTEGER
  54.     |-salesv  ---  1120
  55.  
  56. METHODS:
  57. -------
  58.  
  59. doneit.Click ()
  60. --------------
  61. if (click='YES') then image='done';
  62. if (click='NO') then
  63.    begin
  64.       image='done1';
  65.       count=0;
  66.       while (count<200)
  67.          do begin
  68.              count=count+1;
  69.          end;
  70.       image='done';
  71.       click='YES';
  72.       salestoday.salesq=salestoday.salesq+order.number;
  73.       salestoday.salesv=salestoday.salesv+order.total;
  74.       target.currentv=salestoday.salesv;
  75.    end;
  76.  
  77.  
  78.  
  79.  
  80. doneit.Image ()
  81. --------------
  82. draw ();
  83.  
  84.  
  85. doneit.X ()
  86. ----------
  87. erase ();
  88. setx (x);
  89. draw ();
  90.  
  91. doneit.Y ()
  92. ----------
  93. erase ();
  94. sety (y);
  95. draw ();
  96.  
  97. order.ftot ()
  98. ------------
  99. total=price*number
  100.  
  101. order.number ()
  102. --------------
  103. ftot () ;
  104.  
  105. order.price ()
  106. -------------
  107. ftot();
  108.  
  109. target.Image ()
  110. --------------
  111. draw ();
  112.  
  113. target.X ()
  114. ----------
  115. erase ();
  116. setx (x);
  117. draw ();
  118.  
  119. target.Y ()
  120. ----------
  121. erase ();
  122. sety (y);
  123. draw ();
  124.  
  125. target.currentv ()
  126. -----------------
  127. color(2);
  128. y2=130*currentv;
  129. if (currentv>targetv) then y2=130*targetv;
  130. y1=y-(y2/targetv);
  131. y3=round(y1);
  132. rectangle(x,y3,x+20,y);
  133. if (currentv>targetv) then 
  134.  begin
  135.   color(14);
  136.   count=0;
  137.   while (count<300) do
  138.    begin
  139.     count=count+1;
  140.    end;
  141.   rectangle(x,y3,x+20,y);
  142.   color(2);
  143.   count=0;
  144.   while (count<150) do
  145.    begin
  146.     count=count+1;
  147.    end;
  148.   rectangle(x,y3,x+20,y);
  149.   color(14);
  150.   count=0;
  151.   while (count<300) do
  152.    begin
  153.     count=count+1;
  154.    end;
  155.   rectangle(x,y3,x+20,y);
  156.   color(2);
  157.   count=0;
  158.   while (count<150) do
  159.    begin
  160.     count=count+1;
  161.    end;
  162.   rectangle(x,y3,x+20,y);
  163.  end; 
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.