Skip to content

Vilis322/ArrayBoard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArrayBoard

A simple Avalonia UI project for managing and visualizing array-based data structures.


DESCRIPTION

ArrayBoard is a small C# / Avalonia desktop application that demonstrates working with arrays, data binding, and MVVM in a clean and modular structure.
The project was originally designed for a university task — "WPF program with arrays" — and implemented using Avalonia for cross-platform compatibility (macOS & Windows).


FEATURES

  • Display, add, edit, and remove items in an array of objects (Car model).
  • Real-time search and filtering by selected column.
  • Confirmation dialog for deletions.
  • Separation into layers (Models, ViewModels, Views, Services).
  • Unit tests with logging for basic operations.
  • Three deliberate runtime bugs for teamwork debugging practice.

ARCHITECTURE

ArrayBoard/
├── apps/
│   └── ArrayBoard.App/
│       ├── Models/           # Core data structures
│       ├── ViewModels/       # Business logic and binding
│       ├── Views/            # Avalonia XAML UI
│       ├── Services/         # Dialog handling
│       └── Resources/        # Localization and styles
├── tests/
│   └── ArrayBoard.Tests/     # Unit tests (with bug tracing)

⚙️ Technologies

  • C# 12 / .NET 9
  • Avalonia UI 11
  • MVVM pattern
  • xUnit for testing

KNOWN BUGS (for university teamwork task)

Bug #1 – Culture-Sensitive Price Parsing

  • Symptom: Entering price with a comma in some locales (e.g., "12,50") throws FormatException.
  • Repro:
    1. Add or edit a car.
    2. In "Price" field, type value with a comma (e.g., "19999,99").
    3. Click "OK" -> app crashes or shows unhandled error.
  • Suspected Place: CarEditViewModel.cs, price parsing logic.

Bug #2 – Delete While Filtered

  • Symptom: If you apply a filter, delete an item, then clear the filter, sometimes an ArgumentOutOfRangeException occurs or the grid index gets out of sync.
  • Repro:
    1. Set filter to match a subset (e.g., Brand: "Ford").
    2. Delete the only visible row.
    3. Clear filter -> random crash or inconsistent selection.
  • Suspected Place: MainViewModel.cs, remove logic vs. collection view sync.

Bug #3 – Cancel Still Saves

  • Symptom: In the Edit dialog, clicking "Cancel" still commits some changes because the binding updates the model prematurely.
  • Repro:
    1. Select a row, click "Edit".
    2. Change fields; click "Cancel".
    3. Observe that changes are sometimes reflected in the grid.
  • Suspected Place: CarEditDialog.axaml.cs and CarEditViewModel.cs (two-way binding updates original object, no snapshot/rollback).

BUILD AND RUN

dotnet restore
dotnet build
dotnet run --project apps/ArrayBoard.App

TEST

dotnet test

About

csharp dotnet avalonia avaloniaui-app oop

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages