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

namespace FileListBoxDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            fileListBox1_Click(null, null);
            fileListBox1_ZmianaKatalogu(null, null);
        }

        private void fileListBox1_Click(object sender, EventArgs e)
        {
            label1.Text = "Zaznaczony element: " + fileListBox1.ŚcieżkaDoZaznaczonegoElementu;
        }

        private void fileListBox1_ZmianaKatalogu(object sender, EventArgs e)
        {
            label2.Text = "Katalog: " + fileListBox1.ŚcieżkaKatalogu;
        }

        private void fileListBox1_DwukrotneKliknieciePliku(object sender, EventArgs e, string nazwaPliku)
        {
            System.Diagnostics.Process.Start(nazwaPliku);
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            fileListBox1.ŚledzenieZmian = checkBox1.Checked;
        }
    }
}
