Commit graph

71 commits

Author SHA1 Message Date
Kurt
de774ed131 readonly ComboItem
create once, never modified after
2019-06-01 19:12:41 -07:00
Kurt
2f2512b09c Reduce allocations for checking file write time
FileInfo inherits from FileSystemInfo, which initializes a bunch of
strings that we don't need
this isn't a great optimization, just a fun exercise finding a quicker
approach to get these values
2019-04-05 18:45:59 -07:00
Kurt
8a08d32dff Simplify pkm constructors
remove Identifier param. 99% of the time, identifier is not provided,
resulting in a useless call

end result:
provide 'create new' and 'create from' constructors
2019-03-16 18:41:56 -07:00
Kurt
ca51edbdcf Change sav.LoadBoxes to return int
make MysteryGift specific method flexible so that any IEncounterable
enumerable can be passed.
2019-02-23 14:37:06 -08:00
Kurt
dc5cdc34d7 Remove FieldsInitialized and rename check method 2019-02-09 17:07:44 -08:00
Kurt
f481404503 Misc clean 2019-02-02 10:19:41 -08:00
Kurt
aa022fad40 Misc refactoring
remove some null usages, return an empty array instead
reduce as arg
2019-02-01 23:08:03 -08:00
Kurt
6f22599baf Prevent slot overwriting on bulk import
https://projectpokemon.org/home/forums/topic/48912-how-to-batch-import-pokemon-boxes-without-erasing-existing-pokemon/
2018-12-28 17:58:13 -08:00
Kurt
ebd1155bfc Fix egg search 2018-11-09 16:50:39 -08:00
Kurt
22b77892ec Update db pkmfile load filtering
Closes #2146
previously, it would only accept pk*, now that there are multiple
formats, just detect via any.
2018-10-21 09:21:46 -05:00
Kurt
f507ab7081 Misc parse settings reorg
makes it more centralized for defining parsing settings, maybe can have
flags to change severity of certain preferential checks
2018-10-05 19:58:30 -07:00
Kurt
debccff8b7 Flag illegal sprites in database
Closes #2108 , uses overload
2018-09-01 15:04:56 -07:00
Kurt
d7f39ea343 Extract pkm searching to separate classes
search logic can now be reused by core projects

adds option to provide extra filters run at the end (prior to clone
check)
2018-08-16 20:06:40 -07:00
Kurt
10894f5341 Add alternate clone hash method for Semi clones
https://projectpokemon.org/home/forums/topic/47048-suggestion-being-able-to-check-pokemon-with-exact-pid-semi-clones/

hold control when searching (kinda clunky solution) to instead search by
PID clones
2018-08-16 14:38:12 -07:00
Kurt
c3136187de Style updates 2018-08-04 10:06:06 -07:00
Kurt
1486b7f14a Misc style & minor tweaks
Remove move combobox flicker hack (no longer necessary)
Add more Array.Empty usages
cache mysterygift sizes
seal some classes

no functionality changes
2018-08-02 20:11:42 -07:00
Kurt
0c5c9bc33c Misc clean / xmldoc updates
remove unused label in QR (use window Font)
escape & -> & for xmldoc proper style
2018-07-21 19:20:11 -07:00
Kurt
99c790a4b0 Update File name/path/folder fields
original file path is not saved with the two listed properties, add
FileFolder and relcoate existing FilePath functions to that field

move some GetVariantSAV usages to the string method instead of byte[]
2018-07-16 21:00:43 -07:00
Kurt
46ece28f4c Add vc/gen1-2 search option
refactor out some searchable methods
2018-07-14 22:18:24 -07:00
Kurt
4d73fa70d8 Simplify binding to ComboItem logic
could probably look into better binding but meh
2018-07-14 16:00:28 -07:00
Kurt
346c401727 Rework initial evochain trim
push unsaved IVTotal/EVTotal stuff from prior commit
rework exposed types for evo chain
initial trim now uses much less linq

can probably redo the get initial chain to provide a species to break
on...
2018-06-22 17:59:02 -07:00
Kurt
1d9795f774 Fix batch modify filter bool
rename methods for clarity
Closes #1977
2018-05-31 19:59:05 -07:00
Kurt
abe3567174 Update db search
search caused cross thread exception due to ConfigurAwait not returning
context
finish await -> update controls with after restoring context.

don't rebox results 2x lmao; keep results as list due to other Remove
operations being present in other events.
2018-05-24 21:22:44 -07:00
Kurt
3b635be77f Flag nonparsed
removed parsedvalid/invalid, unnecessary I guess
2018-05-22 18:57:39 -07:00
Kurt
8cf70770cf clean up batch editor
refactor some logic to make it easier to reuse
add some xmldoc
2018-05-18 19:19:15 -07:00
Kurt
d772a82953 Move batch editor logic to core
previous hurdle a year ago was propertyinfo fetching not looking at the
base class's properties; dig deeper for all properties to mimic existing
code for netframework

end result is batch editing now possible without gui
2018-05-17 22:43:07 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
Kurt
e91cb806e5 Extract extension->prefer format method
fails for 'pkx' (returned 8 instead of 6); establish standard behavior
2018-04-21 14:38:18 -07:00
Kurt
1d4e815689 Extract more mesage strings
all common strings in forms used by multiple generations

would rather rework the individual generation strings to be unnecessary
with better interaction instead (if possible), as translating hundreds
of limited exposure strings is a drag.
2018-04-06 21:23:09 -07:00
Kurt
9ed2c594f2 Reorder form init 2018-04-02 20:36:13 -07:00
Kurt
1a5d4efdfe Add database/mgdb -> save importing
Closes #1804
2018-02-01 17:29:07 -08:00
Kurt
ddf319c713 Set stat level on load
Closes #1790
lul
2018-01-28 14:11:12 -08:00
Kurt
523dfa32aa Unflip level search <>
closes #1785
2018-01-27 13:24:16 -08:00
Kurt
79add8dff1 Update modified check
takes negligibly longer but accomplishes the necessary task
Closes #1782
2018-01-27 10:15:56 -08:00
Kurt
f104df6386 Ignore party stats on pkm compare
Stats were recently added to be calculated on load, thus not matching
the all-zeros when obtained from the save.
Closes #1781
2018-01-26 21:09:12 -08:00
Kurt
bb20ec49cc load stats prior to searching
https://projectpokemon.org/home/forums/topic/43579-bug-pkhex-number-fields/
2018-01-25 09:17:39 -08:00
Kurt
959d598d76 Fix esv searching in database
only way the filter used to execute was if ESV textbox was empty, which
would throw an exception lul

sync dead code removal for prior pkrs commit (never executes)
475acfaeac
2018-01-25 08:54:29 -08:00
Kurt
0edefedc2b Remove gen2->7 auto filtering
closes #1768
(<7)->7 is now possible so no need to filter further
2018-01-24 09:19:20 -08:00
Kurt
f5a6f23161 Add more static enc data
clear out unused (highly certain) SM encounters
add solgaleo/lunala locations
add partner form pikachu
2017-11-10 19:43:31 -08:00
Kurt
7c36190661 Expand IdentifierContains feature
now behaves the same as a property filtering
2017-10-20 08:47:31 -07:00
Kurt
a9892203c7 Refactoring
extract pkm loading routines to smaller methods
reduce code duplication (rely on empty setters to ignore some calls)

should be much easier to understand the load/save process; the original
setup (pk6) was following the structure from 0x00-end, no point still
doing that as everything is now abstracted.
2017-10-02 23:13:40 -07:00
Kurt
1e377c2963 interpolation++
no functional change (assumed)
2017-09-29 22:58:25 -07:00
Kurt
ed1b934374 Misc refactoring
expose some useful IEnumerable methods (sorting / bin->pkm / copy) to
simplify some common operations
change some explicit arrays to IList for flexibility
remove old memecrypto bool (no longer necessary as XP is not supported)
rename some methods for more clarity
2017-09-28 22:20:27 -07:00
Kurt
d8c2cdb8e3 Use EnumerateFiles over GetFiles in some cases
https://msdn.microsoft.com/en-us/library/07wt70x2.aspx

iterating as an ienumerable (ie not consuming the whole collection) can
be more efficient by not waiting for the whole collection
2017-09-23 17:02:28 -07:00
Kurt
a938a1bd9c Add wordfilter bypass search via database
regex matching takes a lot more time and is a cosmetic / easily fixable
issue (reset to no nickname / default OT).
Add a prompt to temp turn off those checks to drastically speed up
search (no regexes done).

Fix unsanitize for gen6 (should have been >= 6, aka starting with gen6)
2017-09-20 16:46:40 -07:00
Kurt
97f0f418d6 Enable auto-bak loading for db
previously was only for debug builds; loads in like 2 seconds on my
computer for >70k pkm from >250 backups

if enough people complain I can add it as a setting instead
2017-09-04 22:27:55 -07:00
Kurt
dcf2b5fd9c Improve database loading speed
do db population in another thread, invoke an update when complete
2017-09-04 22:22:02 -07:00
Kurt
ccc6357294 Misc updates
Re-enable PKM (abstract class) property searching via Database/MGDB
search
Closes #1412 (can now search or exclude certain formats)

Add auto-detection for all supported saves (rather than gen3+ except
GC/PBR)
2017-08-24 18:49:09 -07:00
Kurt
bbac3dc7ee Improve db scroll behavior
Focus was passed when control area was entered; only pass focus when the
mouse wheel is moved.
Add tooltip to show full path of last viewed file if the filename is too
long. Double clicking the label still works to copy the full label to
clipboard.
2017-07-05 18:39:53 -07:00