Skip to content

WPF upgrade#11

Merged
Metadorius merged 19 commits intoCnCNet:masterfrom
SadPencil:feature-wpf
Mar 24, 2023
Merged

WPF upgrade#11
Metadorius merged 19 commits intoCnCNet:masterfrom
SadPencil:feature-wpf

Conversation

@SadPencil
Copy link
Member

@SadPencil SadPencil commented Feb 17, 2023

Why WPF:

  • WinForm has the layout issue which depends on system font and monitor DPI. Not easy to solve (although we can just increase the window size as a workaround).
  • MessageBox is not a good tool to display an exception message due to missing scrollbars.
  • No need to maintain two windows for gpu message and missing component, respectively. One AdvancedMessageBox is enough.
  • No need to be compactible with Wine anymore since Client is .NET 7.

Screenshots:
Snipaste_2023-02-19_15-44-10
01
02
03

@SadPencil
Copy link
Member Author

Snipaste_2023-03-20_12-17-48
Updated

@SadPencil SadPencil requested a review from Rampastring March 20, 2023 04:19
@Metadorius
Copy link
Member

Snipaste_2023-03-20_12-17-48 Updated

  1. What does this even mean?
    image
  2. If there's an incompatibility between PC and DX11 version, why is this an option?
    image

@SadPencil
Copy link
Member Author

@Metadorius

What does this even mean?

This dialog is launched by the dialog test, because it is hard to reproduce the incompatibility just in order to show the prompt. The only difference is the dialog launched by the dialog test will not do anything and has a (All buttons here won't work) text.

If there's an incompatibility between PC and DX11 version, why is this an option?

This PR only migrates the project from WinForm to WPF. No texts or buttons are changed.
Besides, Alternatively, you can retry launching the DirectX11 version of the client.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to use ReactiveUI.Fody for autogenerating INPC boilerplate.

Copy link
Member Author

@SadPencil SadPencil Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires distributing a DLL while the launcher is supposed to be single-file contained

@SadPencil SadPencil requested review from Metadorius and removed request for Rampastring March 22, 2023 15:59
Copy link
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Metadorius Metadorius merged commit 5ce0b63 into CnCNet:master Mar 24, 2023
@SadPencil SadPencil deleted the feature-wpf branch March 25, 2023 12:35
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.

4 participants