void start_MouseUp(object sender, MouseButtonEventArgs e) { WinGame wg = new WinGame(); wg.Show(); this.Close(); }
/// <summary> /// Карандаш /// </summary> /// <param name="name">Имя</param> /// <param name="parent">Расположение</param> /// <param name="left">Отступ слева</param> /// <param name="top">Отступ сверху</param> /// <param name="rot">Поворот</param> /// <param name="rnd">Вариативность цвета</param> public Pen(string name, WinGame parent, int left, int top, int rot, int rnd) { int rand = new Random().Next(rnd); Image img = new Image(); img.Source = new BitmapImage(new Uri(@"Images\pen" + (rand + 1).ToString() + ".png", UriKind.Relative)); img.Width = 10; img.Height = 100; img.Name = name; parent.canva.Children.Add(img); Canvas.SetLeft(img, left); Canvas.SetTop(img, top); img.RenderTransform = new RotateTransform(rot, img.Width / 2, img.Height / 2); image = img; }