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)); }
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(); }
// 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); }
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(); } }