Compare commits
7 Commits
B2024-062_
...
B2024-063-
Author | SHA1 | Date | |
---|---|---|---|
6128632186 | |||
5db6a984f3 | |||
a43e059733 | |||
0ac79f4e46 | |||
218a2c17a2 | |||
a629f6834b | |||
bf5337cf63 |
Binary file not shown.
@@ -1206,20 +1206,28 @@ namespace VEPROMS
|
|||||||
private bool validateDate(TextBox txtDate)
|
private bool validateDate(TextBox txtDate)
|
||||||
{
|
{
|
||||||
DateTime dDate;
|
DateTime dDate;
|
||||||
if (DateTime.TryParse(txtDate.Text, out dDate))
|
if (!(txtDate.Text == ""))
|
||||||
{
|
{
|
||||||
return true;
|
|
||||||
}
|
if (DateTime.TryParse(txtDate.Text, out dDate))
|
||||||
else
|
{
|
||||||
{
|
return true;
|
||||||
string txtDate2 = txtDate.Text;
|
}
|
||||||
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
|
else
|
||||||
string txtTitle = "Invalid Format";
|
{
|
||||||
MessageBox.Show(message, txtTitle);
|
string txtDate2 = txtDate.Text;
|
||||||
return false;
|
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
|
||||||
|
string txtTitle = "Invalid Format";
|
||||||
|
MessageBox.Show(message, txtTitle);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void txbRevDate_Enter(object sender, EventArgs e)
|
private void txbRevDate_Enter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
txbDate = txbRevDate;
|
txbDate = txbRevDate;
|
||||||
|
@@ -295,7 +295,10 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
while (!MyPromsPrinter.MergeNotIncluded && _PdfFile == null && MessageBox.Show("Try Again?", "PDF Creation Failed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes);
|
// B2024-062 Added check for EmptyProcedure. We don't need to show the Try Again message if the procedure
|
||||||
|
// is empty, as it would be just be a waste of time for the user.
|
||||||
|
while (!MyPromsPrinter.MergeNotIncluded && _PdfFile == null && !MyPromsPrinter.EmptyProcedure &&
|
||||||
|
MessageBox.Show("Try Again?", "PDF Creation Failed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes);
|
||||||
|
|
||||||
|
|
||||||
if (_PdfFile == null)
|
if (_PdfFile == null)
|
||||||
|
@@ -674,12 +674,15 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
using (Annotation annotation = CurrentAnnotation.Get())
|
using (Annotation annotation = CurrentAnnotation.Get())
|
||||||
{
|
{
|
||||||
annotation.RtfText = rtxbComment.Rtf;
|
if (annotation != null) // B2024-061 check for null reference
|
||||||
annotation.SearchText = rtxbComment.Text;
|
{
|
||||||
annotation.MyAnnotationType = annotationType;
|
annotation.RtfText = rtxbComment.Rtf;
|
||||||
annotation.DTS = DateTime.Now;
|
annotation.SearchText = rtxbComment.Text;
|
||||||
annotation.UserID = Volian.Base.Library.VlnSettings.UserID;
|
annotation.MyAnnotationType = annotationType;
|
||||||
annotation.Save();
|
annotation.DTS = DateTime.Now;
|
||||||
|
annotation.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
|
annotation.Save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -138,6 +138,15 @@ namespace Volian.Print.Library
|
|||||||
get { return _Prefix; }
|
get { return _Prefix; }
|
||||||
set { _Prefix = value; }
|
set { _Prefix = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// B2024-062 Set to true when the procedure being printed has no content.
|
||||||
|
// When set to true, will prevent the "Try Again" dialog from appearing
|
||||||
|
// and simply exit the print function
|
||||||
|
private bool _EmptyProcedure = false;
|
||||||
|
public bool EmptyProcedure
|
||||||
|
{
|
||||||
|
get { return _EmptyProcedure; }
|
||||||
|
}
|
||||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
public event PromsPrinterStatusEvent StatusChanged;
|
public event PromsPrinterStatusEvent StatusChanged;
|
||||||
internal void OnStatusChanged(object sender, PromsPrintStatusArgs args)
|
internal void OnStatusChanged(object sender, PromsPrintStatusArgs args)
|
||||||
@@ -933,6 +942,9 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
MessageBox.Show("This procedure has no content and will not be printed.", "Empty Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("This procedure has no content and will not be printed.", "Empty Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
|
// B2024-062 Added check for EmptyProcedure. This is to prevent the Try Again message
|
||||||
|
// from appearing after the user clicks on the OK button from the Empty Procedure message
|
||||||
|
_EmptyProcedure = true;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
OnStatusChanged(myProcedure.DisplayNumber, PromsPrinterStatusType.ProgressSetup, myProcedure.Sections.Count);
|
OnStatusChanged(myProcedure.DisplayNumber, PromsPrinterStatusType.ProgressSetup, myProcedure.Sections.Count);
|
||||||
|
Reference in New Issue
Block a user