diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 671e9f2c07..4976f09bb7 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -12,6 +12,7 @@ List of all contributors. - Freeman2016 - EBWeist - mdawsonuk +- labre_rdc ## Translators / reviewers on Transifex diff --git a/Source/.junie/guidelines.md b/Source/.junie/guidelines.md new file mode 100644 index 0000000000..ce56d4e6ca --- /dev/null +++ b/Source/.junie/guidelines.md @@ -0,0 +1,58 @@ +# Coding Conventions + +Junie Pro generated these guidelines using the Gemini 3 model. + +## General +* **Language**: C# (Latest version features used, e.g., file-scoped namespaces, target-typed new). +* **Framework**: .NET 10.0 (Windows). +* **Architecture**: MVVM (Model-View-ViewModel). +* **UI Framework**: WPF (using MahApps.Metro and Dragablz). + +## Naming Conventions +* **Classes, Methods, Properties, Enums**: PascalCase. +* **Private Fields**: `_camelCase` (underscore prefix). + * Exception: `private static readonly ILog Log` (PascalCase). +* **Event Handlers**: `Object_EventName` (e.g., `SettingsManager_PropertyChanged`). +* **Interfaces**: `IPascalCase` (prefix with I). + +## Formatting +* **Indentation**: 4 spaces. +* **Braces**: Allman style (opening brace on a new line). +* **Namespaces**: File-scoped namespaces (`namespace MyNamespace;`). +* **Imports**: `using` directives sorted alphabetically, `System` namespaces mixed in. +* **Grouping**: `#region` used to group related members (e.g., Variables, Events, Properties). + +## Specific Practices +* **Logging**: Use `log4net` via `LogManager.GetLogger(typeof(ClassName))`. +* **Properties**: Implement `INotifyPropertyChanged` (usually via `ViewModelBase`). Use expression-bodied members for getters where concise. +* **Null Checks**: Use pattern matching or standard checks. +* **Localization**: Use static `Strings` class (e.g., `localization:Strings.MyString`). +* **Documentation**: XML documentation comments (`///`) for all public members. + +# Code Organization and Package Structure + +## Projects +The solution is divided into multiple projects to separate concerns: + +* **NETworkManager**: The main WPF application project. Contains the entry point (`App.xaml`), main window, and feature-specific Views and ViewModels. +* **NETworkManager.Controls**: Custom WPF UI controls used throughout the application. +* **NETworkManager.Converters**: WPF Value Converters for data binding. +* **NETworkManager.Models**: Core business logic, data entities, and service wrappers (e.g., Network, Ping, Traceroute logic). +* **NETworkManager.Utilities**: General purpose utility classes and helpers. +* **NETworkManager.Utilities.WPF**: WPF-specific utility classes. +* **NETworkManager.Settings**: Manages application settings and configuration persistence. +* **NETworkManager.Profiles**: Logic for handling network profiles. +* **NETworkManager.Localization**: Contains localization resources (`Strings.resx`). +* **NETworkManager.Validators**: Input validation logic. +* **NETworkManager.Documentation**: Application documentation resources. +* **NETworkManager.Update**: Logic for checking and applying application updates. +* **NETworkManager.Setup**: Related to the installer setup. + +## Directory Structure +* `/NETworkManager` + * `/Views`: XAML Views (UserControls, Windows). + * `/ViewModels`: ViewModels corresponding to Views. + * `/Resources`: App-specific resources. +* `/NETworkManager.Models` + * Organized by feature (e.g., `/Network`, `/Ping`, `/Lookup`). +* `/3rdparty`: Third-party libraries and dependencies. Junie must not modify these libraries and dependencies. diff --git a/Source/NETworkManager.sln b/Source/NETworkManager.sln index 893418bce7..3d584fbd2e 100644 --- a/Source/NETworkManager.sln +++ b/Source/NETworkManager.sln @@ -34,6 +34,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig GlobalAssemblyInfo.cs = GlobalAssemblyInfo.cs + .junie\guidelines.md = .junie\guidelines.md EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rdparty", "3rdparty", "{B44F92AE-A764-4EA0-B663-FA2B82DA1E80}" diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md index ea7d42180d..9fddaa0f27 100644 --- a/Website/docs/changelog/next-release.md +++ b/Website/docs/changelog/next-release.md @@ -80,3 +80,4 @@ Release date: **xx.xx.2025** - Migrated existing credential and profile dialogs to use DialogHelper, improving usability, accessibility and maintainability across the app. [#3231](https://github.com/BornToBeRoot/NETworkManager/pull/3231) - Language files updated via [#transifex](https://github.com/BornToBeRoot/NETworkManager/pulls?q=author%3Aapp%2Ftransifex-integration) - Dependencies updated via [#dependabot](https://github.com/BornToBeRoot/NETworkManager/pulls?q=author%3Aapp%2Fdependabot) +- Generate project guidelines for Rider's coding agent Junie using itself as generator. [#3250](https://github.com/BornToBeRoot/NETworkManager/pull/3250)