Commit graph

76 commits

Author SHA1 Message Date
John Lewin
b1f41e540d Clear cached credentials after acquiring new ClientToken
- Extract existing file delete to resusable function - ClearCachedCredentials
- Reuse ClearCachedCredentials in SetClientToken
- MatterHackers/MCCentral#321
2016-09-06 14:32:00 -07:00
John Lewin
b97bd8ef28 Add to ProfileManager before invoking methods that call .Save()
- Issue MatterHackers/MatterControl#1346
2016-09-04 11:06:07 -07:00
John Lewin
312f652bbb Use short identifiers for public profiles
- Add support for new GetProfileList schema
- Add CacheablePath function to abstract and reuse path generation logic
- Serialize LoadCacheable content in human readable form
- Move public-profile cache into like named folder
- Move public-profile items into oem specific folders
- Reuse LoadOemProfileAsync for persistence instead of custom implementation
- Issues MatterHackers/MCWS#72, MatterHackers/MCWS#84
2016-09-03 17:12:11 -07:00
Lars Brubaker
4929f834d6 Merge branch 'master' of https://github.com/MatterHackers/MatterControl
Conflicts:
	SlicerConfiguration/Settings/ProfileManager.cs
2016-09-01 11:18:32 -07:00
Lars Brubaker
619c20aff0 Restore functionality to put default items in queue when new printer is created.
Made default calibration files include the calibration box
2016-09-01 10:53:10 -07:00
Lars Brubaker
102605d535 Don't override theme color on new printer
Either set it to default, or set it the name listed in the OEM settings
2016-08-31 17:32:43 -07:00
John Lewin
de84fe1705 Write user profiles to a user subdirectory below Profiles
- Issue MatterHackers/MatterControl#1339
2016-08-31 14:57:39 -07:00
John Lewin
0a15124e4b Fix issues in ChangeID
- New ID should be set in all cases
- Conditionally load local profile if exists
2016-08-31 13:57:51 -07:00
John Lewin
180c559d09 Single authority for ProfilePath construction
- Guard for null during load
2016-08-31 13:57:50 -07:00
John Lewin
4e727def1b Code clean up
- Remove unused SaveAs function from SlicePresetsWindow
- Remove unused LoadProfileFromMCWS()
- More consistent formatting
- Move SetValue call after adding Profile, to ensure ProfilePath works during save
2016-08-31 13:57:49 -07:00
John Lewin
98c26d0a7c Add locking around file save operations 2016-08-31 13:57:43 -07:00
Lars Brubaker
b6dcacdef9 Fixed a problem with create new printer 2016-08-31 12:49:25 -07:00
Lars Brubaker
22bca53d69 Changed the theme colors to save by name
fixed linux run bug MatterHackers/MCCentral#344

ActiveTheme does not recreate its data all the time
2016-08-31 11:42:02 -07:00
Greg
1b882e8050 If first run we effectively sign out user so that they will be forced to sign in and import printers
MatterMatterHackers/MatterControl#1207
2016-08-16 11:22:37 -07:00
John Lewin
4e83bab707 Avoid null conditional result on awaited call to workaround Mono error
- Issue MatterHackers/MCCentral#283
2016-08-15 13:36:40 -07:00
John Lewin
5237ef09da Assign ActiveSliceSettings.Instance on the UI thread 2016-08-12 15:59:53 -07:00
John Lewin
ea381ef7b1 Refactor LoadProfileAsync to reuse LoadWithoutRecovery 2016-08-12 13:29:22 -07:00
John Lewin
6079694be5 Prevent profile recovery during startup
- Fix whitespace
 - Remove unused comportNames variable
 - Prevent assigning profile reload if already loaded
2016-08-12 13:29:22 -07:00
John Lewin
d0ce7a5600 Move recovery orchestration into ProfileManager.LoadProfileAsync 2016-08-12 13:29:22 -07:00
Matt Moening
5b42eac301 Fixed import to not rely on layer_height validation
- Import preset no longer checks for slicer and will validate import on weather or not any settigns were valid
 - calling Import from MenuOptionFIle will cause the same error message as importing a printer form the settings import page
 - Import to new printer now attempts to load values and validates success on importing a valid setting
2016-08-11 14:59:33 -07:00
Matt Moening
bdf3e8f2a5 Importing a printer/settings from a file will now notify the user if the file contains no valid user settings
- ImportFomEisting now returns a bool of whether or not it succeeded
 - PrinterSettings now has a Contains method
 - merging or importing quality/material settings check to make sure at least one setting was importable and notifies user if not
2016-08-10 16:39:08 -07:00
John Lewin
4ece8d18a7 Make LoadCacheable collector return instance of T rather than string
- Issue #1195, #1188
2016-07-26 13:22:24 -07:00
John Lewin
3e79fb6590 Make DownloadPrinterProfile async, move to MHWebServices
- Issue  MatterHackers/MCCentral#218
 - Rename function to DownloadPublicProfileAsync
2016-07-25 14:39:23 -07:00
John Lewin
135b4df7ad Refactor for clarity, conciseness 2016-07-24 08:24:47 -07:00
John Lewin
063ac60ec9 Assign current theme to new printers
- Issue #1158
2016-07-24 07:48:42 -07:00
John Lewin
6f394c7c1f Make LoadCacheable async
- Collector func<string> becomes async
 - Propagate async to LoadCacheable callers
2016-07-22 14:09:25 -07:00
Lars Brubaker
2a238fdcc4 Moving this code to ApplicationController
MatterControlApplication should be as thin as possible it is not shared accross platforms.
Put shared code into ApplicationController
2016-07-21 15:13:10 -07:00
Matt Moening
97d3615755 Load public profiles from Static Data before launching request to web server in new task
This reduced loading time for public profiles from 5200-5300ms to 2ms
Loadcacheable can now fall back to Static data if passed a path for it
2016-07-21 14:23:35 -07:00
Matt Moening
d96531152b converted oemprofiles to be .printer files and to be retrieved as such from various locations.
Updated to test to reflect the actions actually done by the request (not sure why they were not failing before)
2016-07-20 17:39:19 -07:00
Lars Brubaker
451626504e Renamed SettingsProflie to SettingsHelpers 2016-07-19 13:28:10 -07:00
John Lewin
54d165d15f Consolidate member names 2016-07-18 16:58:25 -07:00
John Lewin
42f133aa70 Consolidate SettingsProfile and PrinterSettings types 2016-07-18 16:58:25 -07:00
John Lewin
f304e9f3d6 Migrate SettingsProfile functionality to new SettingsHelpers type
- Add as child property of settings scope, ready for merge of types
 - Progress on Issue #1113
2016-07-18 16:58:25 -07:00
Lars Brubaker
e39ad85d87 Make sure the profiles directory exists 2016-07-18 15:18:17 -07:00
John Lewin
fe07d0b5c1 Replace OemProfile with PrinterSettings type
- Issue #1112
2016-07-18 11:58:54 -07:00
Greg
73f396544c Merge branch 'master' of https://github.com/MatterHackers/MatterControl 2016-07-15 17:23:21 -07:00
Greg
1115f05da0 Added Make and Model properties to PrinterInfo class and made sure that when we add a new printer, the Make and Model are written to {user}.json 2016-07-14 16:48:18 -07:00
Matt Moening
f8e00ca879 Made sure profiles use proper profile extension and are looked for accordingly
Fixed bug where we would show upload profile dialog without any profiles to upload
2016-07-14 13:46:33 -07:00
John Lewin
dba57b3e0a Change printer profile extensions to '.printer'
- Convert string literals to shared const
2016-07-14 11:37:04 -07:00
John Lewin
65d5b5505c Add option to ProfileManager to load Guest profile db
- Move SQLite import code into externally callable function
 - Add persistable property for PrintersImported to ProfileManager data
2016-07-13 17:22:02 -07:00
John Lewin
c2d87979c1 Call unregister event before changing instances 2016-07-13 17:22:02 -07:00
John Lewin
0d890a824e Better encapsulate profile path and filename logic from application
- Switch to unique file extension for user profile list (.profiles)
 - Use readonly property for Profile extensions
 - Add const for guest file name
2016-07-13 17:22:02 -07:00
John Lewin
da695dc581 Convert more string literals into SettingsKey constants 2016-07-12 17:51:26 -07:00
Matt Moening
469345e73f Async download of profiles not in cache
When creating a printer checks if profile is already on disk before downloading
2016-07-11 17:05:16 -07:00
John Lewin
4fd087134a Update ProfileManager.Instance on change
- Issue #1058
 - Add ProfileManager->Reload functionality to update static instance
 - On Reload, reassign ActiveSliceSettings to last profile or empty
 - Reorder members in ProfileManager
 - Remove PermanentDelete profile function
 - Set identifier of empty profiles to "EmptyProfile"
2016-07-11 15:30:30 -07:00
John Lewin
be3eed0f5d Move last selected profile management into ProfileManager
- Multi-user support: store the value in a user specific key
2016-07-11 15:30:30 -07:00
John Lewin
0d0625a6e7 Add support for LoadProfile call that can be forced to reload from disk
- Issue MatterHackers/MCCentral#178
 - Without this mechanism, requests for the active profile return the
   active instance rather than loading the latest on disk values
2016-07-08 07:31:43 -07:00
Lars Brubaker
80c3a4708c Make sure profilePath exists before loading it.
Cleaning up Action names
Change to development build for user profiles
2016-07-07 17:05:50 -07:00
John Lewin
35a0c26916 Fix empty SHA1 field, add to ProfileManager before save 2016-07-07 12:37:39 -07:00
John Lewin
58a27356c2 Profile Sync 2016-07-07 12:37:39 -07:00