// dummy implementation
 private void populateThisListBox()
 {
     foreach (string item in HandlePartition.ExistingPartitions())
     {
         myListBox.Items.Add(item);
     }
 }
예제 #2
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 populateThisComboBox()
 {
     foreach (string item in HandlePartition.getRootPartitions())
     {
         if (string.IsNullOrEmpty(item))
         {
             continue;
         }
         mycomboBox.Items.Add(item);
     }
 }
 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++;
 }