using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DocumentList_CS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            #if DEBUG
                MinimizeBox = false;
            #else
                MinimizeBox = true;
            #endif
        }

        private void cboFileType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboFileType.Text == "JPG")
            {
                docListFile.Filter = "Рисунки (*.jpg)|*.jpg";
                docListFile.SelectedDirectory = "My Pictures";
            }
            else
            {
                docListFile.Filter = "Звуки (*.wav)|*.wav";
                docListFile.SelectedDirectory = "My Music";
            }
        }

        private void docListFile_DocumentActivated(object sender, Microsoft.WindowsCE.Forms.DocumentListEventArgs e)
        {
            statusBar1.Text = e.Path;

            // ваш код над выбранным файлом
            
        }
    }
}