Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var fenetreNewCompetition = new FenetreCompetition(new Donnee());

            fenetreNewCompetition.Show();
            this.Close();
        }
Ejemplo n.º 2
0
        private void bgwOpen_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            var fenetreCompetition = new FenetreCompetition(donnee);

            fenetreCompetition.Show();
            this.Close();
            ProgressBar.IsIndeterminate = false;
        }
Ejemplo n.º 3
0
        private void bgwNew_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            Donnee datas = (Donnee)e.Result as Donnee;
            var    fenetreCompetition = new FenetreCompetition(datas);

            fenetreCompetition.Show();
            this.Close();
        }
        private async void OuvrirCompetition_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new OpenFileDialog();
            dialog.Filter = "xml files (*.xml)|*.xml";
            if ((bool)dialog.ShowDialog())
            {
                VM.IsLoading = true;

                DataSerialisation d = new DataSerialisation();
                var result = await Task.Run(() => d.ReadFile(dialog.FileName));

                var fenetreCompetition = new FenetreCompetition(result);


                fenetreCompetition.Show();
                Close();
            }
        }
Ejemplo n.º 5
0
        private async void OuvrirCompetition_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new OpenFileDialog();

            dialog.Filter = "xml files (*.xml)|*.xml";
            if ((bool)dialog.ShowDialog())
            {
                VM.IsLoading = true;

                DataSerialisation d = new DataSerialisation();
                var result          = await Task.Run(() => d.ReadFile(dialog.FileName));

                var fenetreCompetition = new FenetreCompetition(result);


                fenetreCompetition.Show();
                Close();
            }
        }
Ejemplo n.º 6
0
        private void NouvelleCompetition_Click_1(object sender, RoutedEventArgs e)
        {
            var dialog = new SaveFileDialog();

            dialog.Filter   = "xml files (*.xml)|*.xml";
            dialog.FileName = string.Format("{0} {1:MM-dd-yyyy} {2}", VM.NomNouvelleCompetition, VM.DateNouvelleCompetition, VM.LieuNouvelleCompetition);

            if ((bool)dialog.ShowDialog())
            {
                VM.IsLoading = true;

                CompetitionManager CM          = new CompetitionManager();
                var donneesNouvelleCompetition = CM.CreerNouvelleCompetition(VM.LieuNouvelleCompetition, VM.NomNouvelleCompetition, VM.DateNouvelleCompetition, dialog.FileName);

                var fenetreCompetition = new FenetreCompetition(donneesNouvelleCompetition);
                fenetreCompetition.Show();

                Close();
            }
        }
        private void NouvelleCompetition_Click_1(object sender, RoutedEventArgs e)
        {
            var dialog = new SaveFileDialog();
            dialog.Filter = "xml files (*.xml)|*.xml";
            dialog.FileName = string.Format("{0} {1:MM-dd-yyyy} {2}", VM.NomNouvelleCompetition, VM.DateNouvelleCompetition,VM.LieuNouvelleCompetition);

            if ((bool)dialog.ShowDialog())
            {
                VM.IsLoading = true;

                CompetitionManager CM = new CompetitionManager();
                var donneesNouvelleCompetition = CM.CreerNouvelleCompetition(VM.LieuNouvelleCompetition,VM.NomNouvelleCompetition, VM.DateNouvelleCompetition,dialog.FileName);

                var fenetreCompetition = new FenetreCompetition(donneesNouvelleCompetition);
                fenetreCompetition.Show();

                Close();                  
            }
        }        
 private void Button_Click(object sender, RoutedEventArgs e)
 {        
     var fenetreNewCompetition = new FenetreCompetition(new Donnee());           
     fenetreNewCompetition.Show();
     this.Close();
 }