コード例 #1
0
ファイル: parametre.xaml.cs プロジェクト: romaissalmh/Helios
        private void evolut(object sender, RoutedEventArgs e) //pour activer ou désactiver le son
        {
            StreamReader sr  = new StreamReader(@"son.txt");
            string       str = sr.ReadLine();

            sr.Close();
            if (str == "Activé")
            {
                MediaPlayer player = new MediaPlayer();
                player.Open(new Uri(@"..\..\click.mp3", UriKind.RelativeOrAbsolute));
                player.Play();
            }
            evolution ev = new evolution(wilaya, output_out);

            ev.Show();
            this.Close();
        }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        if (GameManager.instance.Continue)
        {
        }
        else
        {
            playerState      = states.awake;
            currentEvolution = evolution.bad;
            moveTo           = position.empty;
        }

        wayPoints = new List <Transform>();

        foreach (Transform child in wayPointsParent.transform)
        {
            wayPoints.Add(child);
        }

        lastPosition = position.empty;
    }
コード例 #3
0
ファイル: parametre.xaml.cs プロジェクト: romaissalmh/Helios
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.A:
            {
                accueil ev = new accueil(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.M:
            {
                meteo_jour ev = new meteo_jour(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.P:
            {
                prevision ev = new prevision(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.E:
            {
                evolution ev = new evolution(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.T:
            {
                Contact ev = new Contact(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.R:
            {
                parametre ev = new parametre(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.O:
            {
                apropos ev = new apropos(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.D:
            {
                credit ev = new credit(wilaya, output_out);
                ev.Show();
                this.Close();
            }
            break;

            case Key.Z:
            {
                mise_a_jour mise = new mise_a_jour(wilaya, output_out);
                mise.Show();
                this.Close();
            }
            break;

            case Key.S:
            {
                StreamReader sr  = new StreamReader(@"son.txt");
                string       str = sr.ReadLine();
                sr.Close();
                if (str == "Activé")
                {
                    MediaPlayer player = new MediaPlayer();
                    player.Open(new Uri(@"..\..\screen.mp3", UriKind.RelativeOrAbsolute));
                    player.Play();
                }
                //déclaration et instanciation de la fenêtre parcourir
                SaveFileDialog parcourir = new SaveFileDialog();
                parcourir.DefaultExt = "png";
                //je spécifie que seul les images .png sont selectionnables
                parcourir.Filter = " Fichier PNG (*.PNG)|*.png";
                //ouverture de la fenêtre parcourir
                parcourir.ShowDialog();
                CreateScreenShot(this, parcourir.FileName);
            }
            break;
            }
        }