Consolidate to single ShowMessageBox call
This commit is contained in:
parent
9d70b11508
commit
cfa1ea73ce
1 changed files with 10 additions and 8 deletions
|
|
@ -64,14 +64,16 @@ namespace MatterHackers.MatterControl.PrintHistory
|
|||
&& !printer.Settings.GetValue<bool>(SettingsKey.has_hardware_leveling))
|
||||
{
|
||||
lastPrintTask = lastPrint;
|
||||
if (printer.Settings.GetValue<bool>(SettingsKey.z_homes_to_max))
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox(RecoverPrintProcessDialogResponse, printRecoveryMessage, recoverPrintTitle, StyledMessageBox.MessageType.YES_NO, recoverPrint, cancelRecovery);
|
||||
}
|
||||
else // make sure we include a waring
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox(RecoverPrintProcessDialogResponse, printRecoveryMessage + "\n\n" + printRecoveryWarningMessage, recoverPrintTitle, StyledMessageBox.MessageType.YES_NO, recoverPrint, cancelRecovery);
|
||||
}
|
||||
|
||||
bool safeHomingDirection = printer.Settings.GetValue<bool>(SettingsKey.z_homes_to_max);
|
||||
|
||||
StyledMessageBox.ShowMessageBox(
|
||||
RecoverPrintProcessDialogResponse,
|
||||
(safeHomingDirection) ? printRecoveryMessage : printRecoveryMessage + "\n\n" + printRecoveryWarningMessage,
|
||||
recoverPrintTitle,
|
||||
StyledMessageBox.MessageType.YES_NO,
|
||||
recoverPrint,
|
||||
cancelRecovery);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue