Exemple #1
0
        private void DoValidation()
        {
            /* deprecated for now###
             * HandlePartition handlePartition = new HandlePartition(SomeText);
             * string []filles = handlePartition.getAllFilesFromPartition();
             * PopulateListContent(filles);
             */
            if (string.IsNullOrEmpty(Utilities.test))
            {
                return;
            }

            // make sure that old content is removed
            _content.Clear();
            //Utilities.mCachedList.Clear();

            foreach (string item in HandlePartition.getAllContentOfADirectory(Utilities.test))
            {
                _content.Add("File: " + item);
            }

            foreach (string item in HandlePartition.getDirsOfADirectory(Utilities.test))
            {
                _content.Add("Directory: " + item);
                Utilities.mCachedList.Add(item);
            }
            Utilities.mCachedList.Add("### One step back ### (not a directory)");
        }
 private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     Utilities.test = mycomboBox.Text;
     //MessageBox.Show("This is a test");
     mycomboBox.Items.Clear();
     // do again combobox population
     foreach (string item in HandlePartition.getDirsOfADirectory(Utilities.test))
     {
         mycomboBox.Items.Add(item);
     }
     mCounter++;
 }