static void Main(string[] args) { Circle1 per = new Circle1(new length()); per.Start(); Operation operation1 = per.P; double result = Convert.ToInt32(operation1(CGraphicsObject.x)); Console.WriteLine("Длина окужности:"); Console.WriteLine(result); Ellipse1 per1 = new Ellipse1(new area()); per1.Start(); Operation2 operation2 = per1.P1; double result2 = operation2(CGraphicsObject.a, CGraphicsObject.b); Console.WriteLine("Площядь элипса:"); Console.WriteLine(result2); Console.Read(); ArrayList numbersList = new ArrayList() { CGraphicsObject.x, CGraphicsObject.a, CGraphicsObject.b }; object obj = 10; numbersList.Add(obj); numbersList.RemoveAt(3); Console.WriteLine("Коллекция радиуса и длин большого и малого элипса: "); foreach (object o in numbersList) { Console.Write(o + " "); } }
private void UserControlIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (Visibility == Visibility.Visible) { _stopped = false; StartAnimation(); } else { _stopped = true; foreach (var storyboard in _storyList) { storyboard.Stop(); } _storyList.Clear(); Ellipse1.SetValue(Canvas.LeftProperty, (double)130); Ellipse2.SetValue(Canvas.LeftProperty, (double)160); Ellipse3.SetValue(Canvas.LeftProperty, (double)190); Ellipse4.SetValue(Canvas.LeftProperty, (double)220); Ellipse5.SetValue(Canvas.LeftProperty, (double)250); } }