Added parameter for frmPDFStatusForm

Added parameters for PromsPrinter
Changed ItemID TextBox to a multiline TextBox
Added Next and Previous button to move through IDs in TextBox
Added a print button to print all of the procedures associated with the list of IDs
Added code asociated with controls above
Added error handler for the Clipboard
This commit is contained in:
Rich
2015-05-06 14:39:04 +00:00
parent 69f77955de
commit c5fc60bfbd
4 changed files with 261 additions and 33 deletions

View File

@@ -916,12 +916,22 @@ namespace Volian.Controls.Library
btnCMRedo.Enabled = btnRedo.Enabled = _MyStepRTB.CanRedo;
// for paste, see if there is clipboard data, & if so, of a type we can use.
IDataObject iData = Clipboard.GetDataObject();
//btnEdit3CMPaste.Enabled = btnPasteText.Enabled = btnCMPasteText.Enabled = btnCMPaste.Enabled = btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
//btnPasteText.Enabled = btnPasteStepText.Enabled = btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
btnCMPasteText.Enabled = btnPasteText.Enabled = iData.GetDataPresent(DataFormats.Text);
btnCMPaste.Enabled = btnPasteStepText.Enabled = iData.GetDataPresent(DataFormats.Rtf);
try // RHM20150506 Multiline ItemID TextBox
{
IDataObject iData = Clipboard.GetDataObject();
//btnEdit3CMPaste.Enabled = btnPasteText.Enabled = btnCMPasteText.Enabled = btnCMPaste.Enabled = btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
//btnPasteText.Enabled = btnPasteStepText.Enabled = btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
btnCMPasteText.Enabled = btnPasteText.Enabled = iData.GetDataPresent(DataFormats.Text);
btnCMPaste.Enabled = btnPasteStepText.Enabled = iData.GetDataPresent(DataFormats.Rtf);
}
catch (Exception) // Error while trying to access the clipboard
{ // This happens when the ItemID Text Box at the bottom of the screen is used to paste
// a list of IDs using the context menu (Right-Click, Paste)
btnPaste.Enabled = false;
btnCMPasteText.Enabled = btnPasteText.Enabled = false;
btnCMPaste.Enabled = btnPasteStepText.Enabled = false;
}
}
// all selected copy while in either Edit or View mode
btnCMCopy.Enabled = btnCopy.Enabled = _MyStepRTB.SelectionLength > 0;