Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Create WPF Main Window #226

Merged
merged 3 commits into from
Aug 3, 2023

Conversation

softwareantics
Copy link
Owner

@softwareantics softwareantics commented Aug 3, 2023

Description

  • Fulfilled requirements of [FEATURE REQUEST] Create WPF Main Window #222.
  • Created three new projects:
    • FinalEngine.Editor.Common - Contains services that connect views and view models.
    • FinalEngine.Editor.Desktop - Contains the views for the editor, this is the main WPF application.
    • FinalEngine.Editor.ViewModels - Contains view models and interaction interfaces to make it easier to manipulate views.
  • Created MainView and met the requirements of [FEATURE REQUEST] Create WPF Main Window #222 by styling and adding a File > Exit MenuItem and KeyBinding.
  • Created MainViewModel and corresponding interface to handle updating the MainView title and ExitCommand.

Dependencies

Type of change

How Has This Been Tested?

Unit tests have been provided for all testable changes. All unit tests are passing locally on my machine. I also ran the application and was able to manually test the ExitCommand to ensure the application closed both by clicking the button and using the Alt+F4 KeyBinding.

Test Configuration:

  • Operating System: Windows 10 Home
  • Hardware: Intel i7-6700HQ @ 2.60GHz, 16GB, GTX 950M
  • Toolchain: VS Community 2022 17.5.4

Proposed Design

Interactions

The PR introduces a new concept to the editor called interactions. Interactions are simple interfaces that provide functionality to the view model from the view. For example, an ICloseable interface can be passed from the view to the view model via a command parameter in order to close the corresponding view once an operation is complete:

public void Close(ICloseable? closeable)
{
    if (!this.ShouldClose)
    {
        return;
    }

    closeable?.Close();
}

Screenshots

image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My changes generate no new warnings

@softwareantics softwareantics self-assigned this Aug 3, 2023
@softwareantics softwareantics changed the base branch from develop to epic/112-editor August 3, 2023 14:01
@sonarcloud
Copy link

sonarcloud bot commented Aug 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@softwareantics softwareantics marked this pull request as ready for review August 3, 2023 16:01
@softwareantics softwareantics merged commit f0140e1 into epic/112-editor Aug 3, 2023
3 checks passed
@softwareantics softwareantics deleted the feature/222-create-wpf-main-window branch August 3, 2023 16:06
@softwareantics softwareantics changed the title [WIP] [FEATURE] Create WPF Main Window [FEATURE] Create WPF Main Window Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant