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

Better disconnection handling in main form #20

Merged
merged 4 commits into from Aug 9, 2022
Merged

Better disconnection handling in main form #20

merged 4 commits into from Aug 9, 2022

Conversation

gbakeman
Copy link
Contributor

@gbakeman gbakeman commented Aug 9, 2022

  • Handle disconnections better by separating and centralizing subroutines
  • Small modifications to the Pref_Gui to make the main form more responsive to modifications
  • Fix two NullReferenceExceptions, in About_Gui and List_Var_Gui
  • General code cleanup throughout

- Bumped up reconnect interval for debug mode
- Applying code cleaning/simplification to WinNUT.vb
- Relocating Properties to near the top of the document
- Renamed UPSDisconnect to UPSDisconnectedEvent to better match the purposes of the subroutine. Struggling with the "best" way to handle UPS_Object lifecycle and references
- Cleaned up code in several files
  - Organized Properties in UPS_Device
  - PollingInterval is now a property, directly linked to the Timer.
  - WinNUT_Params: Delay defaults to valid value of 1
  - Clarified variable names in Pref_Gui
  - Raise an even when preferences are saved, and indicate if any were modified
  - WinNUT.vb: Connect PrefsChanged subroutine to respective event in Prefs_Gui
  - Simplified connection subroutine
  - Split off disconnection subroutines for beginning a disconnection, and handling post-disconnect event. Modified the rest of the file to use these subroutines to prevent future null ref exceptions.
  - Simplified PrefsChanged subroutine for handling changed preferences.
- Also cleaned up code
- Ref issue #16
- Also cleaned up code
- Ref issue #17
@gbakeman gbakeman added bug Something isn't working enhancement New feature or request labels Aug 9, 2022
@gbakeman gbakeman added this to the 2.2 Stable Release milestone Aug 9, 2022
@gbakeman gbakeman self-assigned this Aug 9, 2022
@gbakeman gbakeman merged commit 2449adb into Dev-2.2 Aug 9, 2022
@gbakeman gbakeman deleted the disconnect branch August 9, 2022 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when opening UPS Variables window Crash on opening the "about" window
1 participant