Пример #1
0
        private void ImportExistingExercices()
        {
            ListAvailable.SelectedIndex = -1;
            ListSelected.SelectedIndex  = -1;

            activityListInstance.ClearItems();
            activityListInstance.ClearSelectedItems();

            if (Directory.Exists(EXERCICES_FOLDER))
            {
                FileHelper.FileReader fileReader = new FileHelper.FileReader();
                fileReader.ReadAllExercicesIntoExerciceVMList(EXERCICES_FOLDER, activityListInstance.getActivityList());
                if (activityListInstance.getActivityList().Count > 0)
                {
                    lblAucunExercice.Visibility = Visibility.Hidden;
                }
                else
                {
                    lblAucunExercice.Visibility = Visibility.Visible;
                }
            }
            else
            {
                lblAucunExercice.Visibility = Visibility.Visible;
                //TODO: message indiquant qu'aucun exercice n'existe dans l'application
            }
        }
Пример #2
0
        private void ImportExistingExercices()
        {
            ListActivities.SelectedIndex = -1;

            ActivityListInstance.ClearItems();

            if (Directory.Exists(EXERCICES_FOLDER))
            {
                FileHelper.FileReader fileReader = new FileHelper.FileReader();
                fileReader.ReadAllExercicesIntoExerciceVMList(EXERCICES_FOLDER, ActivityListInstance.getActivityList());
            }
        }