Jacek Matulewski

Applications and components for Microsoft .NET Framework 1.x

 

New site with projects for .NET 2.0/3.0/3.5


  1. Microsoft .NET platform
  2. Components
  3. Applications (in construction)
    1. Reversi (in polish)
    2. DiskFree .NET
    3. .NET Assembly Explorer
  4. Sourcecodes (in construction)

Microsoft .NET platform:


Components:

JacekMatulewski.Util library
Documentation
Download: JacekMatulewski.Util.zip (documentation included)
Can be also downloaded from a Borland Codecental (ID: 21816) or Microsoft Windows Forms Control Gallery
Download: Demo application for FileListBox component

Two components are included: FileListBox and DiskFreeBar. First one is a browseable directory list based on standard ListBox component. The second one is a simple bar showing the percentage of the occupied/free space at any pointed drive. Many properties and events are defined in both of them (see documentation).

The main properties of FileListBox are: DirectoryPath which determines the directory displayed in the component, DirectoryVisible, DrivesVisible, the group of properties FileVisible, DirectoriesVisible, DrivesVisible and DoublDotVisible which allow to control of directory contents displayed in the component, DirectoryWatchingEnabled which determines if contents is automatically updated after file operations made in the displayed directory, DirectoryChangeAllowed which allow to block the browsing possibility. The read only property FileName provide the full path and name of the selected item. It is possible to filter the contents also.
Using events DirectoryChanged, FileDoubleClicked and FileSelectionChanged one can detect the operation made by user.
Some properties and events are also defined to help in drag'n'drop process maintance. Drag&drop process is easier thank to property StartDragAutomatically which, if it is set to true, starts the process automatically after draging the item to the distance determined by DragDistance property. The StartDrag event is also defined and launched just after starting the process.
See the screenshot. See also demo application to take a look at FileListBox component in action (also drag'n'drop).

The second component is the bar (looking like typical progress bar in Windows) with the percentage value of the occupied space displayed. One can determine the drive assigning the drive letter to the DriveLetter property. Many of the drive's parameters as drive type, FAT type, volume name, serial number and obviously the size of free, occupied and total volume are provided by the set of read only properties.
For an example of using DiskFreeBar see below the application DiskFree .NET.


Applications:

Reversi (in polish)

Reversi rozgrywa się na typowej szachownicy 8 na 8. Gra rozpoczyna się z zajętymi czterema polami zgodnie z rysunkiem.
Zasady są następujące:

  • Gracze zajmują na przemian pola planszy przejmując przy tym wszystkie pola przeciwnika znajdujące się między nowo zajętym polem, a innymi polami gracza wykonującego ruch.
  • Celem gry jest zdobycie większej ilości pól niż przeciwnik.
  • Gracz może zająć jedynie takie pole, które pozwoli mu przejąć przynajmniej jedno pole przeciwnika. Jeżeli takiego pola nie ma, musi oddać ruch.
  • Gra kończy się w momencie zajęcia wszystkich pól lub gdy żaden z graczy nie może wykonać ruchu.

    Strategia wyboru pola przez komputer wyznaczona jest następującymi priorytetami (od najwyższego):

  • ustawić pionek w rogu (pole w rogu nie może być przejęte przez przeciwnika i jest dobrą bazą dla następnych ruchów),
  • unikać ustawienia pionka tuż przy rogu (aby nie pozwolić przeciwnikowi ustawić pionka w rogu),
  • ustawić pionek przy krawędzi planszy,
  • unikać ustawienia pionka w wierszu lub kolumnie oddalonej o jedno pole od krawędzi planszy,
  • wybierać pole, w wyniku którego zamieniona będzie największa liczba pionków przeciwnika

    Pobierz: Reversi.exe (61kB)
    Dla porównania zobacz wersję z 1982 roku na ZX Spectrum.


    DiskFree .NET

    Simple application presenting free volume on all accessible drives, floppies and CD-ROMs.

    Download: DiskFreeNET.zip (11kB)


    .NET Assembly Explorer

    This application allows to explore classes placed in .NET intermediate language files (both .exe and .dll). Name of the assembly, the attributes, fields, constructors, methods, properties, events, interfaces and nested types are presented in tree-view list. I suppose it is useful for every .NET developer.

    Download: AssemblyExplorer.exe (32kB)


    Sourcecodes:

    in construction

    Zip file bcs_source.zip contains the sources of all examples described in my book C#. Programming for .NET Framework in Borland C# Builder environment as well as above-mentioned components and some application's sourcecodes (partly in polish).

    Back to top