private void TextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     Black blackwindow = new Black();
     blackwindow.Show();
     MainWindow main = new MainWindow();
     App.Current.MainWindow = main;
     main.Show();
     blackwindow.Close();
     this.Close();
 }
        private void PrzejdzDoOknaLogowania()
        {
            Black blackwindow = new Black();
            blackwindow.Show();
            MainWindow main = new MainWindow();

            App.Current.MainWindow = main;
            //main.Opacity = 0;
            main.Show();
            blackwindow.Close();
            //main.Loaded += new RoutedEventHandler(da1_Completed);
            //MainWindow.BeginAnimation(OpacityProperty, da1);
            //this.GetAnimationBaseValue(da);

            //this.BeginAnimation
            //while(da.Completed==null)
            //this.Hide();
            //this.Close();

            this.Close();
        }