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

Refactor current form classes to Paclink.UI.Common/Paclink.UI.Windows #11

Open
tmiw opened this issue Mar 18, 2022 · 0 comments
Open

Refactor current form classes to Paclink.UI.Common/Paclink.UI.Windows #11

tmiw opened this issue Mar 18, 2022 · 0 comments

Comments

@tmiw
Copy link
Collaborator

tmiw commented Mar 18, 2022

Work has begun to be done on moving the existing forms in the Paclink project in preparation for porting Paclink to Linux and macOS. So far, the following have been moved:

  • DialogAGWEngine
  • DialogPolling
  • DialogSiteProperties
  • Main

And the following remain:

  • Bearing
  • DialogAutoupdate
  • DialogCallsignAccounts
  • DialogChangePassword
  • DialogPacketAGWChannels
  • DialogPacketTNCChannels
  • DialogPactorConnect
  • DialogPactorTNCChannels
  • DialogTacticalAccounts
  • DialogTelnetChannels
  • Terminal
  • TerminalSettings

Basically, the following should be done for each form to be moved:

  1. Create two interfaces in Paclink.UI.Common: a "Backing" (e.g. view model) interface and a "Window" one (e.g. the actual form). For example, IMainWindow and IMainFormBacking. The methods and properties for each interface should be platform-agnostic.
  2. Create the implementation of the Backing interface in the Paclink project. This will effectively serve as the "view model" and will be what other code in that project calls into if needed.
  3. Move the form into Paclink.UI.Windows and update as needed to implement the Window interface from (1).
  4. Update WindowsUiPlatform.cs to allow creation of this form.
  5. Update code in the Paclink project to call UserInterfaceFactory.GetUiSystem().DisplayForm() to display the newly moved form.

Once all remaining forms are moved, the next step will be to create a Paclink.UI.Maui project and port the forms in Paclink.UI.Windows to Maui.

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

No branches or pull requests

1 participant