2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00

129 Commits

Author SHA1 Message Date
F K
351dcdb732
[Core] Settings improvements: Grouping w/labels, support for doubles (#137)
* [Core] Settings improvements: Grouping w/labels, support for doubles

Layout improvements:
* Plugins can set `[SettingSuggestedColumnWidth(123)]` on a settings class to adjust the settings view column width to make it wider or narrower to fit things nicely.
* Plugins can set `[SettingNewGroup("label")]` on any setting property to force a "new paragraph", or group, of settings. If "label" is also provided, a grouping header with that text will also be created.
* A double precision up/down numeric control has been added. In support of this, there is now a precision value on the existing `[SettingNumericBounds]` attribute to specify the number of digits of precision the control displays/allows.

Plugins:
* The above have been applied/demonstrated on the Botanist and Explorer plugin settings.
2024-01-29 15:37:00 -05:00
F K
a555c86083
[Herald+Core] Send notifications to plugins during read-all in Debug (#136)
This will allow notifications to be sent to Notification listeners during read-all to enhance testability.

This is controlled by the `DEBUG` compiler directive, so Release versions will not have this behaviour.

However, Herald, being a plugin itself, should ignore these otherwise the results are.... unfortunate. #askmehowiknow
2024-01-29 15:36:03 -05:00
Xjph
12d274ffcc remove sorting from list views while reading all 2024-01-25 23:19:20 -03:30
F K
666f91cfd3 [Core] Fix: Convert Decimal control values to int32 for Int settings (#134)
Attempting to set decimal values to int properties tends to throw errors. ;-)
2024-01-25 23:19:20 -03:30
F K
64d7b0e072 [ObservatoryCore] Add Statistics and OnFoot CarrierJumps to preread data (#129)
CarrierJump w/ OnFoot is needed for many location tracking things -- ATTN MattG as this is causing problems with BioInsights.

I'm requesting Statistics for use by StatsScanner.
2024-01-25 23:19:20 -03:30
F K
3ed93818fb [Core] Improve(?) Plugin List column sizing (#133)
After populating the list of plugins, auto-size the columns once. In the Resize event handler, do what you did before but account for the scrollbar width too. Prevents horizontal scrollbar appearing except for really fast resize movements.

I didn't try it yet with fewer than a scrollable # of plugins yet.

This cleans up my commented out code from #128.
2024-01-25 23:19:20 -03:30
Xjph
c5f863c098 suspend main window draw during read all 2024-01-25 23:18:02 -03:30
Fred K
a2add94e72 [ObservatoryCore] UI tweaks
Polishing a few rough edges:
* Enable scrolling on the Plugin List view. It only fit 6 or 7. I have 13.
* I fiddled a bit with column auto-sizing (left it commented out, see comment).
* A whole bunch of tweaks to the settings view:
  * first row of controls was cut off at the top (under the window title bar)
  * fixing that revealed uneven spacing between columns
  * action buttons were teensy tiny and unreadable
  * settings view columns were too narrow (200 px).
  * added some spacing to help with readability
  * settings windows now start in center of current screen rather than some random place.
2024-01-25 23:18:02 -03:30
Xjph
97da4c71d2 wire up donate and github links 2024-01-25 23:18:02 -03:30
Xjph
97e981bae2 ready for testing 2024-01-25 23:18:02 -03:30
Xjph
d99a190869 WIP: observatory UI overhaul 2024-01-25 23:18:01 -03:30
Xjph
1d62a0ec1d Winforms overhal in progress 2024-01-25 23:18:01 -03:30
Xjph
4dba621d7c New UI framework changes 2024-01-25 23:18:01 -03:30
Xjph
e2c6816d45 Initial overhaul work 2024-01-25 23:18:01 -03:30
Xjph
523710ce25 Update to avalonia 11 preview 2024-01-25 23:18:01 -03:30
F K
639ad72fb4
2 Bug Fixes (#112)
Add a try-catch in ReadAllLines to handle a read failure if a file is locked.
Add a check for a non-existing export folder when exporting and prompt for new path if it doesn't exist.
2023-04-30 13:19:22 -02:30
Xjph
5bbf2f50de Remove unused variables from catch 2023-03-01 16:31:18 -03:30
Maximilian Dorn
35a0cfdcbd
Update position when window is shown (#107) 2023-03-01 16:23:14 -03:30
Maximilian Dorn
5ada0e41d8
Implement click-through windows for X11 (Linux) (#106)
* Implement click-through windows for X11

* Adjust the "platform specific" comment

* Get rid of accidental whitespace

* Move else declaration into next line
2023-03-01 16:22:47 -03:30
F K
3f2f11bdf3
[Framework + Core] Feature: Add support for adding multiple grid items (#105)
For plugin developers: Adds a new method to the IObservatoryCore interface to add multiple grid items in 1 call -- which only invokes the UI thread once (and potentially only scrolls to bottom once) providing a small performance improvement and providing some modest convenience.
2023-03-01 16:22:20 -03:30
F K
7e401adb6f
Handle disposed timer object in ResetTimer() (#104)
I've had this occur a number of times (twice in a row yesterday) where if you receive new records while doing a long read-all, this exception crashes ObsCore.

So may need some further digging, but in the meantime, it won't crash here.
2023-03-01 16:21:23 -03:30
F K
6298316c94
Implement Tab separated export format (#103)
Tab separated output facilitates much more efficient opening of exported content in a spreadsheet for further data analysis, furthermore, it vastly reduces file size at the cost of human-readability. However, for the spreadsheet junkies among us, this is a welcome option.

To complement this, there is now an "Export Options" expander in the Core settings panel. Here one can select their preferred export style (default remains Fixed width) and now one can pre-select the export folder.

With this change, clicking export *will not* prompt for an export folder if one is already set. It will simply immediately export data.

Enjoy!
2023-02-26 11:20:59 -03:30
Xjph
c20af38a2e Always attempt properties upgrade 2023-01-19 19:28:31 -03:30
Xjph
7a7c110b45 Skip property upgrade if no version present 2023-01-17 19:06:08 -03:30
Xjph
eeae99dc2a Migrate to .NET 6 2022-12-04 15:01:56 -03:30
F K
9b34d50d32
Disable ShowActivated on notifications to avoid focus stealing (#98)
The recently updated avalonia seemed to change behavior in a way that caused notifications to steal focus from the game (often at at inopportune times). Not all users experienced this.
2022-12-04 10:41:30 -03:30
Xjph
62dd6730e8 Handle general exceptions during plugin loading. 2022-10-30 19:16:47 -02:30
Xjph
428b44cc2b Make file browse result check nullsafe 2022-08-29 09:48:15 -02:30
F K
be6ef85fa4
Fix boolean logic bug that slows ancillary file reading to a crawl (#93)
Symptoms: App takes a very long time to start up, sluggish response to events because it's reading and processing every ancillary file 10x instead of just once when successful.
2022-07-24 18:47:18 -02:30
Jonathan Miller
342d5af11c
Error handling improvements (#92)
* Consolidate plugin errors into single window.

* Handle error aggregation and loggin inside error reporter.

* Minor logging corrections.

* Error popup tweaking
2022-07-24 15:48:55 -02:30
Jonathan Miller
d8d5f2794b
Limited retries when ancillary files are locked. (#90)
* Limited retries when anciliary files are locked.

* Move sleep to top of loop.
2022-07-24 09:54:31 -02:30
Xjph
9586e37be7 Update to Avalonia 0.10.15 2022-06-12 13:57:25 -02:30
Xjph
750cb5bec4 Handle anciliary files. 2022-06-09 21:10:35 -02:30
F K
6616b54852
Suppress pre-reading if read-all is also selected (as it is redundant) (#84) 2022-05-28 10:24:10 -02:30
Jonathan Miller
8de34a141c
Export version fixes (#83)
* Add file association for .eop, prompt for install dir

* Handle .eop or .aip file passed as arg.

* VS2022 version bump

* Filter neutron stars and black holes from fast spinning criteria.

* Adjustments for new "high value" check

* Refactor herald cache

* Fix element order and namespaces for voice moods.

* Add explicit .Stop() between audio player calls.

* Use nullsafe member access instead of skipping

* Don't queue up a title that's already queued.

* Improve body ordinal handling for explorer speech titles.

* Escape strings being inserted into xml

* Handle flip-flopping JSON type

* Converter for flip-flopping property type

* Use the converter

* Escape characters *before* we wrap it in xml.

* Give Eahlstan his clear button. :D

* Exclude all stars from fast rotation check.

* Close outstanding popup notifications on exit.

* TO DONE

* [Herald] Suppress duplicate notification titles for spoken notifications

If you have notifications from multiple plugins producing notifications with the same title in quick succession (ie. "Body A 1 e" from both Explorer and BioInsights), the title on successive notifications will not be spoken again to save the breath of our friendly Azure speakers.

* Doc update

* Remove unintended member hiding

* Fix export errors when exporting BioInsights data, cleanup

Discovered a couple issues with exporting BioInsights data resulting from using two different types of objects in the data grid; improved error handling as well.

Also cleaned up some old-style read all code.

* Add read-all on launch setting

* Updated framework xml

* Improve high-value body description text

Co-authored-by: Fred Kuipers <mr.fredk@gmail.com>
2022-05-21 13:00:47 -02:30
Jonathan Miller
fb45b5c3e2
Export, plugin archive install, and herald cache race condition fixes (#82)
* WIP: Grid export and plugin extraction

* Tweak export process

* Check for recursion of the same assembly load.

* Individual screens aren't always primary?

* Wait for cache to be writable

* Export selection only.

* Update built xml docs

* Ignore invalid archives.

* Need to ensure task is started.
2022-05-09 11:11:57 -02:30
F K
ab365cd322
Expose core error logger to plugins and report custom criteria errors (#78)
* Expose core error logger to plugins and report custom criteria errors

Fixes #77

This adds an error logging method on the IObservatoryCore interface that writes the exception details to ObservatoryCore's central error log (found in `${Documents}/ObservatoryErrorLog.txt`). In addition, added a timestamp to each error log.

Also updates the Explorer to report Custom Criteria file load errors and execution errors to the log. Also updates HeraldNotifier to report CacheIndex.json parse failures to the error log as well.

* Expand debugging/error logging in Herald; cleanup empty mp3 files

Herald crashes if attempting to play 0-byte mp3s so if detected, delete, re-request (empty files can occur in some azure failure cases (ie. out of quota). Trap and log errors in other places in HeraldQueue to avoid hard crashes due to weird and wonderful unexpected stuff.
2022-05-03 19:02:31 -02:30
Xjph
7fe11b8094 fix monitor crash on no journals 2022-04-08 15:51:43 -02:30
Xjph
e7f7250c08 Correcting version check 2022-04-04 21:22:51 -02:30
Xjph
3fe3ef9901 Updated versioning 2022-04-04 12:29:59 -02:30
Jonathan Miller
1950d477fd
Herald v2 (#74)
* Add speech rate setting

* Add volume slider

* New speech manager skeleton

* User API key from resx

* Implement voice list retrieve via new api

* Rewrite to use ObAPI, remove all dependancies

* Use volume setting

* Clean up using statements

* Volume and timing adjustments

* Lookup rate value

* Use numeric rates for tighter spread

* Manage plugin data folder via core interface

* Add check that nullable settings are not null.

* Get file size before it's deleted.

* Improve old settings migration.

* Ignore cache sizes below 1MB

* Re-index orphaned files in cache, purge legacy wav files.

* Call top level error logging for native voice exception.

* Async title and detail requests to remove pause

* Remove NetCoreAudio use of temp files.

* Remove orphan using.
2022-04-04 11:58:30 -02:30
F K
3cc8cc3abe
Fix a "Call from invalid thread" exception. (#72)
Random occurrence triggered by a plugin's grid update. It's either fairly rare (related to something I was doing in-app) or new with a recent update to the plugin that caused it (just updated it last night).
2022-03-25 08:47:28 -02:30
Xjph
3e202d6ac7 Use HasFlag 2022-03-16 17:59:43 -02:30
Xjph
ffd218a341 LogMonitor fixes 2022-03-16 08:55:10 -02:30
F K
7d56a2b91b
Fix file ordering assumptions which were broken by U11 (#66)
* Fix file ordering assumptions which were broken by U11

With U11's new filename format for journal files, files don't sort right anymore and so the incorrect context was read during pre-reading, journals were read out-of-order during read-all or the wrong file was poked by JournalPoke for real-time. It seems that real-time still worked well enough (presumably the game client flushes journals semi reliably?)

Either way, ordering can be better guaranteed now.

* Update ObservatoryCore/LogMonitor.cs

Co-authored-by: Jonathan Miller <jmiller@xjph.net>
2022-03-16 08:50:39 -02:30
Xjph
1e7da8eae3 Forgot the journal poker 2022-03-15 13:20:44 -02:30
Xjph
f8eee18d78 Widen journal file filters for Odyssey Update 11 2022-03-15 12:15:18 -02:30
F K
fa5c978b34
Revert PluginCore use of event listening for current LogMonitor state (#64)
The order that listeners get notified isn't deterministic and as a result plugins which read the current state from PluginCore during the handling of a state change event may read a stale state resulting in unexpected results. PluginCore now reads a property directly from LogMonitor to avoid such inconsistencies.
2022-03-15 11:14:20 -02:30
F K
4f4ba88878
Add event-based LogMonitor state changes to better handle batch reads (#59)
* Add event-based LogMonitor state changes to better handle batch reads

Pre-reading hackily used read-all to suppress notifications. But that broke some assumptions about what read-all meant. Furthermore, the Core UI told plugins about read-all rather than the log monitor telling them -- which is really what should be telling them.

To address these concerns, LogMonitor now provides an event that both the PluginCore and PluginEventHandler listens to or tracking logging state allowing more granular information about the activities of LogMonitor, including distinguishing between ReadAll and Pre-read batches. Plugins no longer need to track if LogMonitor is in batch-read mode or not -- PluginCore now provides it. 

I've also converted all built-in plugins to use the new event-based system. The old system is marked deprecated and will go away once other known contributed plugins have converted to the new system.

* Change LogMonitorState enum to [Flags], drop 'None' state

As requested, and did associated simplifications and cleanup that followed.
2022-03-03 16:39:49 -03:30
Xjph
7c54d6dd65 On linux try Steam/Proton default journal location 2022-03-02 17:09:35 -03:30