示例#1
0
        private static void SimpleDemo(AnimationForm af)
        {
            var greenCircle = Drawings.Circle(Brushes.OliveDrab, 100.0f);
            var drawing     =
                greenCircle
                .Translate(-35f, 35f)
                .Compose(greenCircle.Translate(35f, -35f));

            ShowAndWait(Time.Forever(drawing));
        }
示例#2
0
        private static void SimpleDemo(AnimationForm af)
        {
            var greenCircle = Drawings.Circle(Brushes.OliveDrab, 100.0f);
               var drawing =
             greenCircle
              .Translate(-35f, 35f)
              .Compose(greenCircle.Translate(35f, -35f));

               ShowAndWait(Time.Forever(drawing));
        }
示例#3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            af = new AnimationForm();
            af.Click += (sender, e) => { waiting = false; };
            af.Show();

            try { RunAnimation(); } catch { }
            while (af.Visible) Application.DoEvents();
        }
示例#4
0
        // Listing 15.22 Creating solar system animation

        static void SolarSystemDemo(AnimationForm af)
        {
            var sun   = Anims.Cirle(Time.Forever(Brushes.Goldenrod), 100.0f.Forever());
            var earth = Anims.Cirle(Time.Forever(Brushes.SteelBlue), 50.0f.Forever());
            var moon  = Anims.Cirle(Time.Forever(Brushes.DimGray), 20.0f.Forever());

            var planets =
                sun.Compose(
                    earth.Compose(moon.Rotate(50.0f, 12.0f))
                    .Rotate(150.0f, 1.0f))
                .Faster(0.2f);

            ShowAndWait(planets);
        }
示例#5
0
        // Listing 15.22 Creating solar system animation
        static void SolarSystemDemo(AnimationForm af)
        {
            var sun = Anims.Cirle(Time.Forever(Brushes.Goldenrod), 100.0f.Forever());
              var earth = Anims.Cirle(Time.Forever(Brushes.SteelBlue), 50.0f.Forever());
              var moon = Anims.Cirle(Time.Forever(Brushes.DimGray), 20.0f.Forever());

              var planets =
             sun.Compose(
            earth.Compose(moon.Rotate(50.0f, 12.0f))
                 .Rotate(150.0f, 1.0f))
            .Faster(0.2f);

              ShowAndWait(planets);
        }
示例#6
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            af        = new AnimationForm();
            af.Click += (sender, e) => { waiting = false; };
            af.Show();

            try { RunAnimation(); } catch { }
            while (af.Visible)
            {
                Application.DoEvents();
            }
        }