Esempio n. 1
0
        public void Successfully()
        {
            WindowSuccessfully window = new WindowSuccessfully();

            window.Show();
            DoubleAnimation windowAnimation = new DoubleAnimation();

            windowAnimation.From       = window.Opacity;
            windowAnimation.To         = 0;
            windowAnimation.Duration   = TimeSpan.FromSeconds(5);
            windowAnimation.Completed += window.ClosedThisWindow;
            window.BeginAnimation(OpacityProperty, windowAnimation);
        }
Esempio n. 2
0
        public void NotSuccessfully()
        {
            WindowSuccessfully window = new WindowSuccessfully();

            window.TextLabel.Content = "Ошибка!";
            window.Icon.Kind         = MaterialDesignThemes.Wpf.PackIconKind.CloseCircle;
            window.Icon.Foreground   = new SolidColorBrush(Color.FromRgb(255, 0, 0));
            window.Show();
            DoubleAnimation windowAnimation = new DoubleAnimation();

            windowAnimation.From       = window.Opacity;
            windowAnimation.To         = 0;
            windowAnimation.Duration   = TimeSpan.FromSeconds(5);
            windowAnimation.Completed += window.ClosedThisWindow;
            window.BeginAnimation(OpacityProperty, windowAnimation);
        }