home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Grafica / Animation / AnimationStudioSetup.msi / _3CA7015D32004C8B8FAB422593C47FB8 / _37747A52F2C76B3B39EFD0AEFBF745B3 < prev    next >
Text File  |  2004-05-03  |  16KB  |  451 lines

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Data;
  7.  
  8. namespace Example
  9. {
  10.     /// <summary>
  11.     /// Summary description for Form1.
  12.     /// </summary>
  13.     public class Form1 : System.Windows.Forms.Form
  14.     {
  15.         private AnimationStudio.SpritePanel spritePanel1;
  16.         private AnimationStudio.Sprite sprite1;
  17.         private AnimationStudio.KeyFrame keyFrame1;
  18.         private AnimationStudio.KeyFrame keyFrame2;
  19.         private AnimationStudio.KeyFrame keyFrame3;
  20.         private AnimationStudio.Sprite sprite2;
  21.         private AnimationStudio.KeyFrame keyFrame4;
  22.         private AnimationStudio.KeyFrame keyFrame5;
  23.         private AnimationStudio.KeyFrame keyFrame6;
  24.         private AnimationStudio.KeyFrame keyFrame7;
  25.         private AnimationStudio.KeyFrame keyFrame8;
  26.         private AnimationStudio.Sprite sprite3;
  27.         private AnimationStudio.KeyFrame keyFrame9;
  28.         private AnimationStudio.KeyFrame keyFrame10;
  29.         private AnimationStudio.KeyFrame keyFrame11;
  30.         private AnimationStudio.KeyFrame keyFrame12;
  31.         private AnimationStudio.KeyFrame keyFrame13;
  32.         private AnimationStudio.KeyFrame keyFrame14;
  33.         private AnimationStudio.KeyFrame keyFrame15;
  34.         private System.Windows.Forms.Label label1;
  35.         private AnimationStudio.Sprite sprite4;
  36.         private AnimationStudio.KeyFrame keyFrame16;
  37.         private AnimationStudio.KeyFrame keyFrame17;
  38.         /// <summary>
  39.         /// Required designer variable.
  40.         /// </summary>
  41.         private System.ComponentModel.Container components = null;
  42.  
  43.         public Form1()
  44.         {
  45.             //
  46.             // Required for Windows Form Designer support
  47.             //
  48.             InitializeComponent();
  49.  
  50.             //
  51.             // TODO: Add any constructor code after InitializeComponent call
  52.             //
  53.         }
  54.  
  55.         /// <summary>
  56.         /// Clean up any resources being used.
  57.         /// </summary>
  58.         protected override void Dispose( bool disposing )
  59.         {
  60.             if( disposing )
  61.             {
  62.                 if (components != null) 
  63.                 {
  64.                     components.Dispose();
  65.                 }
  66.             }
  67.             base.Dispose( disposing );
  68.         }
  69.  
  70.         #region Windows Form Designer generated code
  71.         /// <summary>
  72.         /// Required method for Designer support - do not modify
  73.         /// the contents of this method with the code editor.
  74.         /// </summary>
  75.         private void InitializeComponent()
  76.         {
  77.             System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
  78.             AnimationStudio.Sound sound1 = new AnimationStudio.Sound();
  79.             AnimationStudio.Sound sound2 = new AnimationStudio.Sound();
  80.             AnimationStudio.Sound sound3 = new AnimationStudio.Sound();
  81.             AnimationStudio.Sound sound4 = new AnimationStudio.Sound();
  82.             this.spritePanel1 = new AnimationStudio.SpritePanel();
  83.             this.label1 = new System.Windows.Forms.Label();
  84.             this.sprite3 = new AnimationStudio.Sprite(this.spritePanel1);
  85.             this.keyFrame9 = new AnimationStudio.KeyFrame();
  86.             this.keyFrame10 = new AnimationStudio.KeyFrame();
  87.             this.keyFrame11 = new AnimationStudio.KeyFrame();
  88.             this.keyFrame12 = new AnimationStudio.KeyFrame();
  89.             this.keyFrame13 = new AnimationStudio.KeyFrame();
  90.             this.keyFrame14 = new AnimationStudio.KeyFrame();
  91.             this.keyFrame15 = new AnimationStudio.KeyFrame();
  92.             this.sprite1 = new AnimationStudio.Sprite(this.spritePanel1);
  93.             this.keyFrame1 = new AnimationStudio.KeyFrame();
  94.             this.keyFrame2 = new AnimationStudio.KeyFrame();
  95.             this.keyFrame3 = new AnimationStudio.KeyFrame();
  96.             this.sprite2 = new AnimationStudio.Sprite(this.spritePanel1);
  97.             this.keyFrame4 = new AnimationStudio.KeyFrame();
  98.             this.keyFrame5 = new AnimationStudio.KeyFrame();
  99.             this.keyFrame6 = new AnimationStudio.KeyFrame();
  100.             this.keyFrame7 = new AnimationStudio.KeyFrame();
  101.             this.keyFrame8 = new AnimationStudio.KeyFrame();
  102.             this.sprite4 = new AnimationStudio.Sprite(this.spritePanel1);
  103.             this.keyFrame17 = new AnimationStudio.KeyFrame();
  104.             this.keyFrame16 = new AnimationStudio.KeyFrame();
  105.             this.spritePanel1.SuspendLayout();
  106.             this.SuspendLayout();
  107.             // 
  108.             // spritePanel1
  109.             // 
  110.             this.spritePanel1.BackColor = System.Drawing.Color.Black;
  111.             this.spritePanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  112.             this.spritePanel1.Controls.Add(this.label1);
  113.             this.spritePanel1.Location = new System.Drawing.Point(8, 8);
  114.             this.spritePanel1.Name = "spritePanel1";
  115.             this.spritePanel1.Size = new System.Drawing.Size(592, 504);
  116.             this.spritePanel1.Sprites.AddRange(new AnimationStudio.Sprite[] {
  117.                                                                                 this.sprite3,
  118.                                                                                 this.sprite1,
  119.                                                                                 this.sprite2,
  120.                                                                                 this.sprite4});
  121.             this.spritePanel1.TabIndex = 0;
  122.             // 
  123.             // label1
  124.             // 
  125.             this.label1.BackColor = System.Drawing.Color.Transparent;
  126.             this.label1.Font = new System.Drawing.Font("Verdana", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  127.             this.label1.Location = new System.Drawing.Point(213, 112);
  128.             this.label1.Name = "label1";
  129.             this.label1.Size = new System.Drawing.Size(162, 40);
  130.             this.label1.TabIndex = 0;
  131.             this.label1.Text = "Bill Gates";
  132.             this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  133.             // 
  134.             // sprite3
  135.             // 
  136.             this.sprite3.BorderColor = System.Drawing.Color.WhiteSmoke;
  137.             this.sprite3.BorderWidth = 2F;
  138.             this.sprite3.DrawBorder = false;
  139.             this.sprite3.DrawPath = false;
  140.             this.sprite3.DrawText = false;
  141.             this.sprite3.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold);
  142.             this.sprite3.Image = ((System.Drawing.Bitmap)(resources.GetObject("sprite3.Image")));
  143.             this.sprite3.PathClosed = true;
  144.             this.sprite3.Position = new System.Drawing.Point(128, 167);
  145.             this.sprite3.Rotation = 265.7143F;
  146.             this.sprite3.Size = new System.Drawing.Size(162, 162);
  147.             sound1.SoundFile = "";
  148.             this.sprite3.Sound = sound1;
  149.             this.sprite3.Text = "Sprite";
  150.             this.sprite3.TextColor = System.Drawing.Color.DarkRed;
  151.             this.sprite3.Timeline.AddRange(new AnimationStudio.KeyFrame[] {
  152.                                                                               this.keyFrame9,
  153.                                                                               this.keyFrame10,
  154.                                                                               this.keyFrame11,
  155.                                                                               this.keyFrame12,
  156.                                                                               this.keyFrame13,
  157.                                                                               this.keyFrame14,
  158.                                                                               this.keyFrame15});
  159.             this.sprite3.TransparentColor = System.Drawing.Color.Black;
  160.             this.sprite3.XScale = 3F;
  161.             this.sprite3.YScale = 3F;
  162.             // 
  163.             // keyFrame9
  164.             // 
  165.             this.keyFrame9.Duration = 50;
  166.             this.keyFrame9.Opacity = 1F;
  167.             this.keyFrame9.Position = new System.Drawing.Point(193, 474);
  168.             this.keyFrame9.Rotation = 0F;
  169.             this.keyFrame9.Visible = true;
  170.             this.keyFrame9.XScale = 1;
  171.             this.keyFrame9.YScale = 1;
  172.             this.keyFrame9.ZOrder = 0;
  173.             // 
  174.             // keyFrame10
  175.             // 
  176.             this.keyFrame10.Duration = 70;
  177.             this.keyFrame10.Opacity = 1F;
  178.             this.keyFrame10.Position = new System.Drawing.Point(69, 112);
  179.             this.keyFrame10.Rotation = 0F;
  180.             this.keyFrame10.Visible = true;
  181.             this.keyFrame10.XScale = 1;
  182.             this.keyFrame10.YScale = 1;
  183.             this.keyFrame10.ZOrder = 0;
  184.             // 
  185.             // keyFrame11
  186.             // 
  187.             this.keyFrame11.Duration = 50;
  188.             this.keyFrame11.Opacity = 1F;
  189.             this.keyFrame11.Position = new System.Drawing.Point(379, 24);
  190.             this.keyFrame11.Rotation = 0F;
  191.             this.keyFrame11.Visible = true;
  192.             this.keyFrame11.XScale = 1;
  193.             this.keyFrame11.YScale = 1;
  194.             this.keyFrame11.ZOrder = 0;
  195.             // 
  196.             // keyFrame12
  197.             // 
  198.             this.keyFrame12.Duration = 70;
  199.             this.keyFrame12.Opacity = 1F;
  200.             this.keyFrame12.Position = new System.Drawing.Point(590, 159);
  201.             this.keyFrame12.Rotation = 0F;
  202.             this.keyFrame12.Visible = true;
  203.             this.keyFrame12.XScale = 2;
  204.             this.keyFrame12.YScale = 2;
  205.             this.keyFrame12.ZOrder = 0;
  206.             // 
  207.             // keyFrame13
  208.             // 
  209.             this.keyFrame13.Duration = 32;
  210.             this.keyFrame13.Opacity = 1F;
  211.             this.keyFrame13.Position = new System.Drawing.Point(43, 263);
  212.             this.keyFrame13.Rotation = 0F;
  213.             this.keyFrame13.Visible = true;
  214.             this.keyFrame13.XScale = 1;
  215.             this.keyFrame13.YScale = 1;
  216.             this.keyFrame13.ZOrder = 0;
  217.             // 
  218.             // keyFrame14
  219.             // 
  220.             this.keyFrame14.Duration = 70;
  221.             this.keyFrame14.Opacity = 1F;
  222.             this.keyFrame14.Position = new System.Drawing.Point(131, 138);
  223.             this.keyFrame14.Rotation = 1000F;
  224.             this.keyFrame14.Visible = true;
  225.             this.keyFrame14.XScale = 3;
  226.             this.keyFrame14.YScale = 3;
  227.             this.keyFrame14.ZOrder = 0;
  228.             // 
  229.             // keyFrame15
  230.             // 
  231.             this.keyFrame15.Duration = 32;
  232.             this.keyFrame15.Opacity = 1F;
  233.             this.keyFrame15.Position = new System.Drawing.Point(549, 93);
  234.             this.keyFrame15.Rotation = 0F;
  235.             this.keyFrame15.Visible = true;
  236.             this.keyFrame15.XScale = 3;
  237.             this.keyFrame15.YScale = 3;
  238.             this.keyFrame15.ZOrder = 0;
  239.             // 
  240.             // sprite1
  241.             // 
  242.             this.sprite1.BorderColor = System.Drawing.Color.WhiteSmoke;
  243.             this.sprite1.BorderWidth = 2F;
  244.             this.sprite1.DrawBorder = false;
  245.             this.sprite1.DrawPath = false;
  246.             this.sprite1.DrawText = false;
  247.             this.sprite1.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold);
  248.             this.sprite1.Image = ((System.Drawing.Bitmap)(resources.GetObject("sprite1.Image")));
  249.             this.sprite1.Opacity = 0.06999999F;
  250.             this.sprite1.Position = new System.Drawing.Point(541, 746);
  251.             this.sprite1.Rotation = -309.6F;
  252.             this.sprite1.Size = new System.Drawing.Size(305, 250);
  253.             sound2.SoundFile = "";
  254.             this.sprite1.Sound = sound2;
  255.             this.sprite1.Text = "Sprite";
  256.             this.sprite1.TextColor = System.Drawing.Color.DarkRed;
  257.             this.sprite1.Timeline.AddRange(new AnimationStudio.KeyFrame[] {
  258.                                                                               this.keyFrame1,
  259.                                                                               this.keyFrame2,
  260.                                                                               this.keyFrame3});
  261.             this.sprite1.TransparentColor = System.Drawing.Color.Transparent;
  262.             this.sprite1.XScale = 1.14F;
  263.             this.sprite1.YScale = 0.944F;
  264.             this.sprite1.ZOrder = 1;
  265.             // 
  266.             // keyFrame1
  267.             // 
  268.             this.keyFrame1.Duration = 200;
  269.             this.keyFrame1.Opacity = 1F;
  270.             this.keyFrame1.Position = new System.Drawing.Point(-200, 35);
  271.             this.keyFrame1.Rotation = 0F;
  272.             this.keyFrame1.Visible = true;
  273.             this.keyFrame1.XScale = 2;
  274.             this.keyFrame1.YScale = 2;
  275.             this.keyFrame1.ZOrder = 1;
  276.             // 
  277.             // keyFrame2
  278.             // 
  279.             this.keyFrame2.Duration = 200;
  280.             this.keyFrame2.Opacity = 1F;
  281.             this.keyFrame2.Position = new System.Drawing.Point(566, 15);
  282.             this.keyFrame2.Rotation = 360F;
  283.             this.keyFrame2.Visible = true;
  284.             this.keyFrame2.XScale = 3;
  285.             this.keyFrame2.YScale = 0.2;
  286.             this.keyFrame2.ZOrder = 1;
  287.             // 
  288.             // keyFrame3
  289.             // 
  290.             this.keyFrame3.Duration = 200;
  291.             this.keyFrame3.Opacity = 0F;
  292.             this.keyFrame3.Position = new System.Drawing.Point(540, 800);
  293.             this.keyFrame3.Rotation = -360F;
  294.             this.keyFrame3.Visible = true;
  295.             this.keyFrame3.XScale = 1;
  296.             this.keyFrame3.YScale = 1;
  297.             this.keyFrame3.ZOrder = 1;
  298.             // 
  299.             // sprite2
  300.             // 
  301.             this.sprite2.BorderColor = System.Drawing.Color.WhiteSmoke;
  302.             this.sprite2.BorderWidth = 2F;
  303.             this.sprite2.DrawBorder = false;
  304.             this.sprite2.DrawPath = false;
  305.             this.sprite2.DrawText = false;
  306.             this.sprite2.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold);
  307.             this.sprite2.Image = ((System.Drawing.Bitmap)(resources.GetObject("sprite2.Image")));
  308.             this.sprite2.PathClosed = true;
  309.             this.sprite2.Position = new System.Drawing.Point(513, 168);
  310.             this.sprite2.Rotation = 67.5F;
  311.             this.sprite2.Size = new System.Drawing.Size(66, 66);
  312.             sound3.SoundFile = "";
  313.             this.sprite2.Sound = sound3;
  314.             this.sprite2.Text = "Sprite";
  315.             this.sprite2.TextColor = System.Drawing.Color.DarkRed;
  316.             this.sprite2.Timeline.AddRange(new AnimationStudio.KeyFrame[] {
  317.                                                                               this.keyFrame4,
  318.                                                                               this.keyFrame5,
  319.                                                                               this.keyFrame6,
  320.                                                                               this.keyFrame7,
  321.                                                                               this.keyFrame8});
  322.             this.sprite2.TransparentColor = System.Drawing.Color.Black;
  323.             this.sprite2.XScale = 1F;
  324.             this.sprite2.YScale = 1F;
  325.             this.sprite2.ZOrder = 2;
  326.             // 
  327.             // keyFrame4
  328.             // 
  329.             this.keyFrame4.Duration = 32;
  330.             this.keyFrame4.Opacity = 1F;
  331.             this.keyFrame4.Position = new System.Drawing.Point(521, 186);
  332.             this.keyFrame4.Rotation = 0F;
  333.             this.keyFrame4.Visible = true;
  334.             this.keyFrame4.XScale = 1;
  335.             this.keyFrame4.YScale = 1;
  336.             this.keyFrame4.ZOrder = 2;
  337.             // 
  338.             // keyFrame5
  339.             // 
  340.             this.keyFrame5.Duration = 32;
  341.             this.keyFrame5.Opacity = 1F;
  342.             this.keyFrame5.Position = new System.Drawing.Point(589, 328);
  343.             this.keyFrame5.Rotation = 0F;
  344.             this.keyFrame5.Visible = true;
  345.             this.keyFrame5.XScale = 4;
  346.             this.keyFrame5.YScale = 4;
  347.             this.keyFrame5.ZOrder = 2;
  348.             // 
  349.             // keyFrame6
  350.             // 
  351.             this.keyFrame6.Duration = 32;
  352.             this.keyFrame6.Opacity = 1F;
  353.             this.keyFrame6.Position = new System.Drawing.Point(19, 338);
  354.             this.keyFrame6.Rotation = 0F;
  355.             this.keyFrame6.Visible = true;
  356.             this.keyFrame6.XScale = 1;
  357.             this.keyFrame6.YScale = 1;
  358.             this.keyFrame6.ZOrder = 2;
  359.             // 
  360.             // keyFrame7
  361.             // 
  362.             this.keyFrame7.Duration = 32;
  363.             this.keyFrame7.Opacity = 1F;
  364.             this.keyFrame7.Position = new System.Drawing.Point(136, 38);
  365.             this.keyFrame7.Rotation = 0F;
  366.             this.keyFrame7.Visible = true;
  367.             this.keyFrame7.XScale = 0.2;
  368.             this.keyFrame7.YScale = 0.2;
  369.             this.keyFrame7.ZOrder = 2;
  370.             // 
  371.             // keyFrame8
  372.             // 
  373.             this.keyFrame8.Duration = 32;
  374.             this.keyFrame8.Opacity = 1F;
  375.             this.keyFrame8.Position = new System.Drawing.Point(470, 64);
  376.             this.keyFrame8.Rotation = 720F;
  377.             this.keyFrame8.Visible = true;
  378.             this.keyFrame8.XScale = 1;
  379.             this.keyFrame8.YScale = 1;
  380.             this.keyFrame8.ZOrder = 2;
  381.             // 
  382.             // sprite4
  383.             // 
  384.             this.sprite4.BorderColor = System.Drawing.Color.WhiteSmoke;
  385.             this.sprite4.BorderWidth = 2F;
  386.             this.sprite4.DrawBorder = false;
  387.             this.sprite4.DrawPath = false;
  388.             this.sprite4.DrawText = true;
  389.             this.sprite4.Font = new System.Drawing.Font("Arial Black", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  390.             this.sprite4.Image = ((System.Drawing.Bitmap)(resources.GetObject("sprite4.Image")));
  391.             this.sprite4.Position = new System.Drawing.Point(-819, 450);
  392.             this.sprite4.Size = new System.Drawing.Size(1562, 51);
  393.             sound4.SoundFile = "";
  394.             this.sprite4.Sound = sound4;
  395.             this.sprite4.Text = "Done with Animation Studio in the Visual Studio Designer, without any programming" +
  396.                 "!";
  397.             this.sprite4.TextColor = System.Drawing.Color.LightSkyBlue;
  398.             this.sprite4.Timeline.AddRange(new AnimationStudio.KeyFrame[] {
  399.                                                                               this.keyFrame17,
  400.                                                                               this.keyFrame16});
  401.             this.sprite4.TransparentColor = System.Drawing.Color.Black;
  402.             this.sprite4.XScale = 1F;
  403.             this.sprite4.YScale = 1F;
  404.             this.sprite4.ZOrder = 3;
  405.             // 
  406.             // keyFrame17
  407.             // 
  408.             this.keyFrame17.Duration = 400;
  409.             this.keyFrame17.Opacity = 1F;
  410.             this.keyFrame17.Position = new System.Drawing.Point(1400, 450);
  411.             this.keyFrame17.Rotation = 0F;
  412.             this.keyFrame17.Visible = true;
  413.             this.keyFrame17.XScale = 1;
  414.             this.keyFrame17.YScale = 1;
  415.             this.keyFrame17.ZOrder = 3;
  416.             // 
  417.             // keyFrame16
  418.             // 
  419.             this.keyFrame16.Duration = 32;
  420.             this.keyFrame16.Opacity = 1F;
  421.             this.keyFrame16.Position = new System.Drawing.Point(-900, 450);
  422.             this.keyFrame16.Rotation = 0F;
  423.             this.keyFrame16.Visible = true;
  424.             this.keyFrame16.XScale = 1;
  425.             this.keyFrame16.YScale = 1;
  426.             this.keyFrame16.ZOrder = 3;
  427.             // 
  428.             // Form1
  429.             // 
  430.             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  431.             this.ClientSize = new System.Drawing.Size(608, 518);
  432.             this.Controls.Add(this.spritePanel1);
  433.             this.Name = "Form1";
  434.             this.Text = "Form1";
  435.             this.spritePanel1.ResumeLayout(false);
  436.             this.ResumeLayout(false);
  437.  
  438.         }
  439.         #endregion
  440.  
  441.         /// <summary>
  442.         /// The main entry point for the application.
  443.         /// </summary>
  444.         [STAThread]
  445.         static void Main() 
  446.         {
  447.             Application.Run(new Form1());
  448.         }
  449.     }
  450. }
  451.