home *** CD-ROM | disk | FTP | other *** search
/ Techno Guide - Aspettando Windows 98 / TechnoGuide.iso / applicaz / ccalend / setup.exe / YEAR1A.CC1 < prev    next >
Encoding:
INI File  |  1997-06-12  |  2.7 KB  |  97 lines

  1. [OPTIONS]
  2. ; Year1a.cc1 written by Kent Briggs
  3. ; n00 = year (user setting)
  4. ; n01 = month (loop 1 to 12)
  5. ; n02 = x (upper left corner of box)
  6. ; n03 = y (upper left corner of box)
  7. ; n04 = DoW for 1st day of month
  8. ; n05 = Last day in month
  9. ; n06 = DoW loop 1 to 7
  10. ; n07 = x1 (various offsets from x)
  11. ; n08 =y1 (various offsets from y)
  12. ; n09 =x2 (lower right box corner)
  13. ; n10 =y2 (lower right box corner)
  14. ; n11 = line color (user option)
  15. ; n12 = text color (user option)
  16. ; n13 = shadow color (user option)
  17. ; t00 = typeface (user option)
  18. ; t01 = month name & dow letter
  19. ; t02 = title (user option)
  20. ; t03 = footnote (user option)
  21. Orientation(Portrait)
  22. Option(t02,Text [t],"Title","Yearly Planner")
  23. Option(t03,Text [t],"Footnote","Printed by Calendar Commander")
  24. Option(t00,Typeface [t],"Typeface","Times New Roman")
  25. Option(n11,Color [n],"Line color",$000000)
  26. Option(n13,Color [n],"Shadow color",$808080)
  27. Option(n12,Color [n],"Text color",$000000)
  28. [COMMANDS]
  29. ; draw year
  30. DateNum(n00,Year)
  31. Font(t00,5,n12,0,0,0,0)
  32. Text(50,3,1,n00)
  33. ; draw title
  34. Font(t00,3.5,n12,0,1,0,0)
  35. Text(50,8,1,t02)
  36. ; draw footnote
  37. Font(t00,2,n12,0,0,0,0)
  38. Text(50,98,7,t03)
  39. ; initialize month, x, y
  40. NumVar(n01,set equal to,1)
  41. NumVar(n02,set equal to,12.5)
  42. NumVar(n03,set equal to,13)
  43. ; loop month 1 to 12
  44. Block(While,n01,<=,12)
  45.   ; draw box shadow
  46.   NumVar(n07,set equal to,n02)
  47.   NumVar(n08,set equal to,n03)
  48.   NumVar(n07,increment by,1)
  49.   NumVar(n08,increment by,1)
  50.   NumVar(n09,set equal to,n07)
  51.   NumVar(n10,set equal to,n08)
  52.   NumVar(n09,increment by,30)
  53.   NumVar(n10,increment by,11)
  54.   Brush(n13,0)
  55.   Rectangle(n07,n08,n09,n10,0)
  56.   ; draw calendar box
  57.   NumVar(n09,decrement by,1)
  58.   NumVar(n10,decrement by,1)
  59.   Brush($FFFFFF,0)
  60.   Pen(n11,2,0)
  61.   Rectangle(n02,n03,n09,n10,1)
  62.   ; draw month name
  63.   DateText(t01,Month,Full,Capitalized,n01)
  64.   NumVar(n07,set equal to,n02)
  65.   NumVar(n08,set equal to,n03)
  66.   NumVar(n07,increment by,15)
  67.   NumVar(n08,increment by,1.5)
  68.   Font(t00,1.8,n12,0,0,0,0)
  69.   Brush($FFFFFF,1)
  70.   Text(n07,n08,4,t01)
  71.   ; draw day of week letters
  72.   NumVar(n07,decrement by,12)
  73.   NumVar(n08,increment by,1.75)
  74.   NumVar(n06,set equal to,1)
  75.   Font(t00,1.2,n12,0,0,0,0)
  76.   Block(While,n06,<=,7)
  77.     DateText(t01,Day of week,1-letter,Capitalized,n06)
  78.     Text(n07,n08,4,t01)
  79.     NumVar(n06,increment by,1)
  80.     NumVar(n07,increment by,4)
  81.   EndBlock
  82.   ; draw month number grid
  83.   WeekDay(n04,n00,n01,1)
  84.   LastDay(n05,n00,n01)
  85.   NumVar(n07,decrement by,28)
  86.   NumVar(n08,increment by,1.25)
  87.   NumGrid(n07,n08,4,1.05,7,n04,1,n05,4)
  88.   ; advance month and y value
  89.   NumVar(n01,increment by,1)
  90.   NumVar(n02,increment by,45)
  91.   ; next row when x>90
  92.   Block(If,n02,>,90)
  93.     NumVar(n02,set equal to,12.5)
  94.     NumVar(n03,increment by,14)
  95.   EndBlock
  96. EndBlock
  97.