Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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();
            }
        }