Ejemplo n.º 1
0
        public static void Exit(Huone h, Window w)
        {
            SoundPlayer click = new System.Media.SoundPlayer(Properties.Resources.click);

            click.Play();
            MainWindow main = new harjoitus.View.MainWindow();

            w.Close();
            main.ShowDialog();
        }
Ejemplo n.º 2
0
        public static void ExitPause(int n, Window w)
        {
            SoundPlayer click = new System.Media.SoundPlayer(Properties.Resources.click);

            click.Play();
            switch (n)
            {
            case 1:
                huone1     main1 = w.Owner as huone1;
                MainWindow h1    = new harjoitus.View.MainWindow();
                w.Close();
                main1.Close();
                h1.ShowDialog();
                break;

            case 2:
                huone2     main2 = w.Owner as huone2;
                MainWindow h2    = new harjoitus.View.MainWindow();
                w.Close();
                main2.Close();
                h2.ShowDialog();
                break;

            case 3:
                huone3     main3 = w.Owner as huone3;
                MainWindow h3    = new harjoitus.View.MainWindow();
                w.Close();
                main3.Close();
                h3.ShowDialog();
                break;

            case 4:
                huone4     main4 = w.Owner as huone4;
                MainWindow h4    = new harjoitus.View.MainWindow();
                w.Close();
                main4.Close();
                h4.ShowDialog();
                break;

            case 5:
                huone5     main5 = w.Owner as huone5;
                MainWindow h5    = new harjoitus.View.MainWindow();
                w.Close();
                main5.Close();
                h5.ShowDialog();
                break;
            }
        }