Merge pull request #1115 from gregory-diaz/master
Added notification that lets users know that the profile they are try…
This commit is contained in:
commit
cc871edcb0
1 changed files with 9 additions and 1 deletions
|
|
@ -38,6 +38,8 @@ using System.Text;
|
|||
using System.Collections.ObjectModel;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.SettingsManagement;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||
{
|
||||
|
|
@ -235,7 +237,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
public static PrinterSettings RecoverProfile(string printerProfilePath)
|
||||
|
||||
public static PrinterSettings RecoverProfile(string printerProfilePath)
|
||||
{
|
||||
string profileKey = Path.GetFileNameWithoutExtension(printerProfilePath);
|
||||
var profile = ProfileManager.Instance[profileKey];
|
||||
|
|
@ -251,6 +254,11 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
profileHelper.SetComPort(profile.ComPort);
|
||||
profileHelper.SaveChanges();
|
||||
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox(null, "The profile you are attempting to load has been corrupted. We loaded a usable public profile for you instead.".Localize(), "Corrupted printer profile".Localize(), messageType: StyledMessageBox.MessageType.OK);
|
||||
},1);
|
||||
|
||||
return oemProfile;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue