From bf5337cf63fb19ad1c22bc1e51e3878f95c81f61 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Tue, 20 Aug 2024 12:25:42 -0400 Subject: [PATCH 1/7] B2024-062 printing a procedure that is empty displays the Empty Procedure message. WhenOK button is clicked, PROMS will exit the Print function.. (#393) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit B2024-062 When you attempt to print a procedure that is empty (i.e. none of the sections are applicable to the selected Child to print), the Empty Procedure message appears. When you click the OK button PROMS will now simply exit the Print function instead of displaying the “Try Again” message box. Reviewed-on: https://git.volian.com/Volian/SourceCode/pulls/393 Reviewed-by: Paul Larsen Co-authored-by: John Jenko Co-committed-by: John Jenko --- PROMS/VEPROMS User Interface/frmPDFStatusForm.cs | 5 ++++- PROMS/Volian.Print.Library/PromsPrinter.cs | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs b/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs index 91c20e91..9ef8319b 100644 --- a/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs +++ b/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs @@ -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) diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index ee22b33e..bd55fe6f 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -138,6 +138,15 @@ namespace Volian.Print.Library get { return _Prefix; } 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); public event PromsPrinterStatusEvent StatusChanged; 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); 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; } OnStatusChanged(myProcedure.DisplayNumber, PromsPrinterStatusType.ProgressSetup, myProcedure.Sections.Count); From a629f6834b20fb202472b5c0795ef8e1760fcf41 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Wed, 21 Aug 2024 11:37:37 -0400 Subject: [PATCH 2/7] B2024-061- Added a null reference check in the save annotation code. Need for when Admin deletes the annotation while a user modified the text of it --- .../Volian.Controls.Library/AnnotationDetails.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/PROMS/Volian.Controls.Library/AnnotationDetails.cs b/PROMS/Volian.Controls.Library/AnnotationDetails.cs index a6ed00e8..dca9ff95 100644 --- a/PROMS/Volian.Controls.Library/AnnotationDetails.cs +++ b/PROMS/Volian.Controls.Library/AnnotationDetails.cs @@ -674,12 +674,15 @@ namespace Volian.Controls.Library { using (Annotation annotation = CurrentAnnotation.Get()) { - annotation.RtfText = rtxbComment.Rtf; - annotation.SearchText = rtxbComment.Text; - annotation.MyAnnotationType = annotationType; - annotation.DTS = DateTime.Now; - annotation.UserID = Volian.Base.Library.VlnSettings.UserID; - annotation.Save(); + if (annotation != null) // B2024-061 check for null reference + { + annotation.RtfText = rtxbComment.Rtf; + annotation.SearchText = rtxbComment.Text; + annotation.MyAnnotationType = annotationType; + annotation.DTS = DateTime.Now; + annotation.UserID = Volian.Base.Library.VlnSettings.UserID; + annotation.Save(); + } } } } From c06744b3bbf71258fed97cbd898c588d69129817 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Thu, 22 Aug 2024 08:19:20 -0400 Subject: [PATCH 3/7] B2024-060-Adding-a-picture-PROMS-crashes --- PROMS/Volian.Controls.Library/DisplayTags.cs | 28 ++++++----- PROMS/Volian.Controls.Library/ImageItem.cs | 50 ++++++++++++++++---- 2 files changed, 59 insertions(+), 19 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index cadc1ba4..1362cac9 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -111,7 +111,13 @@ namespace Volian.Controls.Library get { return tbFSHt.Text; } set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); } } - + // B2024-060 needed for resizing image. + public TrackBar TrBarFS + { + get { return trBarFS; } + //set { trBarFS.Value = Convert.ToInt32(value);} + } + #endregion #region Constructor public DisplayTags() @@ -417,14 +423,14 @@ namespace Volian.Controls.Library tbFSWd.Text = wd.ToString(); tbFSHt.Text = ht.ToString(); - //trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum); - //if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1; - //trBarFS.Minimum = Math.Min(wd, 72); - //trBarFS.Value = (int)wd; - //ImageItem ii = MyEditItem as ImageItem; - //_origFigureSizeWidth = ii.MyPictureBox.Width; - //tbFSWd.Text = ii.MyPictureBox.Width.ToString(); - //tbFSHt.Text = ii.MyPictureBox.Height.ToString(); + trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum); + if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1; + trBarFS.Minimum = Math.Min(wd, 72); + trBarFS.Value = (int)wd; + ImageItem ii = MyEditItem as ImageItem; + _origFigureSizeWidth = ii.MyPictureBox.Width; + tbFSWd.Text = ii.MyPictureBox.Width.ToString(); + tbFSHt.Text = ii.MyPictureBox.Height.ToString(); } else { @@ -567,8 +573,8 @@ namespace Volian.Controls.Library trBarFS.Minimum = Math.Min((int)wd, 72); trBarFS.Value = (int)wd; _origFigureSizeWidth = ii.MyPictureBox.Width; - //tbFSWd.Text = ii.MyPictureBox.Width.ToString(); - //tbFSHt.Text = ii.MyPictureBox.Height.ToString(); + tbFSWd.Text = ii.MyPictureBox.Width.ToString(); + tbFSHt.Text = ii.MyPictureBox.Height.ToString(); } private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType) diff --git a/PROMS/Volian.Controls.Library/ImageItem.cs b/PROMS/Volian.Controls.Library/ImageItem.cs index c419f9c9..0c0dc085 100644 --- a/PROMS/Volian.Controls.Library/ImageItem.cs +++ b/PROMS/Volian.Controls.Library/ImageItem.cs @@ -256,7 +256,8 @@ namespace Volian.Controls.Library private int _origCfgHt = 0; // keep track if original size was stored in cfg private int _origCfgWd = 0; private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg) - private DisplayTags _displayTags; + private DisplayTags _displayTags = new DisplayTags(); + //House myhouse = new House(); #endregion #region Constructors @@ -316,21 +317,26 @@ namespace Volian.Controls.Library } private void SetWidthsAndHeights(System.Drawing.Image img) { - int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) - int ht = img.Height * MyStepPanel.DPI / 72; + int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) + + double ht = (double)wd * aspectratio(img.Width, img.Height); + + //int ht = adjustimage(img.Height); // * MyStepPanel.DPI / 72; if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new. { ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); if (!_pastedNew && ic != null && ic.Image_Height != 0) { - wd = ic.Image_Width * MyStepPanel.DPI / 72; - ht = ic.Image_Height * MyStepPanel.DPI / 72; + wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; + ht = (double)wd * aspectratio(img.Width, img.Height); + //ht = wd * (int)aspectratio(img.Width, img.Height); + //ht = adjustimage(ic.Image_Height); // * MyStepPanel.DPI / 72; } } MyPictureBox.Visible = true; MyPictureBox.Width = wd; - MyPictureBox.Height = ht; + MyPictureBox.Height = (int)ht; MyPictureBox.SizeMode = PictureBoxSizeMode.Zoom; // as resize matches width/height. this.Width = MyPictureBox.Width + ImageMargin; this.Height = MyPictureBox.Height + 10; @@ -340,9 +346,37 @@ namespace Volian.Controls.Library _displayTags.TbFSwd = wd.ToString(); _displayTags.TbFSht = ht.ToString(); } - - } + // B2024-060 adjust pasted image if too large. If the image is too large PROMS crashes. + private int adjustimage(int dim) + { + int dim2 = dim * MyStepPanel.DPI / 72; + if (dim2 > _displayTags.TrBarFS.Maximum) + { + //int y = dim2 - _displayTags.TrBarFS.Maximum; + ////int a = y * 72 / MyStepPanel.DPI; + //int a = y * MyStepPanel.DPI / 72; + //dim = dim - a; + //dim2 = dim * MyStepPanel.DPI / 72; + + dim2 = _displayTags.TrBarFS.Maximum * 72 / MyStepPanel.DPI; + } + else + { + return dim2; + } + return dim2; + } + // B2024-060 Get aspect ratio to resize pasted image. + private double aspectratio(int w, int h) + { + //double ratio = Math.Max((double)image.width / (double)box.width, (double)image.height / (double)box.height); + //image.width = (int) (image.width / ratio); + //image.height = (int) (image.height / ratio); + double ratio = (double)h / (double)w; + return ratio; + } + // the following gets called for 'NEW' images private E_ImageSource InsType = E_ImageSource.None; public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType, DisplayTags displayTags) From 0ac79f4e46b9e3129f3409fa80f0df1890962647 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Thu, 22 Aug 2024 11:24:17 -0400 Subject: [PATCH 4/7] =?UTF-8?q?F2024-070=20-=20Add=20=E2=80=9CDEVIATION:?= =?UTF-8?q?=E2=80=9D=20to=20the=20enhanced=20background=20template=20after?= =?UTF-8?q?=20=E2=80=9CKNOWLOEDGE/ABILITY=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Formats/fmtall/CATEBCKall.xml | Bin 31208 -> 31328 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PROMS/Formats/fmtall/CATEBCKall.xml b/PROMS/Formats/fmtall/CATEBCKall.xml index d31a021c24456448552449021c94332515d27daf..2947594f1150272f5b7169f28968a4ea17c34ba7 100644 GIT binary patch delta 75 zcmaFyneo9F#tjpgC-X6LvAZz1GK4XBPIhD#pS*}gVe$s%Pw3*C7qJL2VhC!-~+Y$hcDvS|wq From 516b479c0cbec19b1724630046f133dd5bfb1e70 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 26 Aug 2024 10:00:31 -0400 Subject: [PATCH 5/7] B2024-060-Adding-a-picture-PROMS-crashes --- PROMS/Volian.Controls.Library/DisplayTags.cs | 2 +- PROMS/Volian.Controls.Library/ImageItem.cs | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 1362cac9..cb822689 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -103,7 +103,7 @@ namespace Volian.Controls.Library public string TbFSwd { get {return tbFSWd.Text;} - set { tbFSWd.Text = value; tbFSWd.Refresh(); trBarFS.Value = Convert.ToInt32(value); } + set { tbFSWd.Text = value; tbFSWd.Refresh(); } // trBarFS.Value = Convert.ToInt32(value); } public string TbFSht diff --git a/PROMS/Volian.Controls.Library/ImageItem.cs b/PROMS/Volian.Controls.Library/ImageItem.cs index 0c0dc085..f5eda541 100644 --- a/PROMS/Volian.Controls.Library/ImageItem.cs +++ b/PROMS/Volian.Controls.Library/ImageItem.cs @@ -317,9 +317,13 @@ namespace Volian.Controls.Library } private void SetWidthsAndHeights(System.Drawing.Image img) { - int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) - double ht = (double)wd * aspectratio(img.Width, img.Height); + int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) + int ht = img.Height * MyStepPanel.DPI / 72; + + //int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) + + //double ht = (double)wd * aspectratio(img.Width, img.Height); //int ht = adjustimage(img.Height); // * MyStepPanel.DPI / 72; if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new. @@ -327,8 +331,10 @@ namespace Volian.Controls.Library ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); if (!_pastedNew && ic != null && ic.Image_Height != 0) { - wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; - ht = (double)wd * aspectratio(img.Width, img.Height); + wd = ic.Image_Width * MyStepPanel.DPI / 72; + ht = ic.Image_Height * MyStepPanel.DPI / 72; + //wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; + //ht = (double)wd * aspectratio(img.Width, img.Height); //ht = wd * (int)aspectratio(img.Width, img.Height); //ht = adjustimage(ic.Image_Height); // * MyStepPanel.DPI / 72; } From 7a3748f7e01a29b25333489ae6e9c326efc6d2b8 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 26 Aug 2024 11:11:03 -0400 Subject: [PATCH 6/7] B2024-060-Adding-a-picture-PROMS-crashes --- PROMS/Volian.Controls.Library/DisplayTags.cs | 26 ++++++-------- PROMS/Volian.Controls.Library/ImageItem.cs | 38 +------------------- 2 files changed, 11 insertions(+), 53 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index cb822689..c191a66a 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -111,12 +111,6 @@ namespace Volian.Controls.Library get { return tbFSHt.Text; } set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); } } - // B2024-060 needed for resizing image. - public TrackBar TrBarFS - { - get { return trBarFS; } - //set { trBarFS.Value = Convert.ToInt32(value);} - } #endregion #region Constructor @@ -423,14 +417,14 @@ namespace Volian.Controls.Library tbFSWd.Text = wd.ToString(); tbFSHt.Text = ht.ToString(); - trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum); - if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1; - trBarFS.Minimum = Math.Min(wd, 72); - trBarFS.Value = (int)wd; - ImageItem ii = MyEditItem as ImageItem; - _origFigureSizeWidth = ii.MyPictureBox.Width; - tbFSWd.Text = ii.MyPictureBox.Width.ToString(); - tbFSHt.Text = ii.MyPictureBox.Height.ToString(); + //trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum); + //if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1; + //trBarFS.Minimum = Math.Min(wd, 72); + //trBarFS.Value = (int)wd; + //ImageItem ii = MyEditItem as ImageItem; + //_origFigureSizeWidth = ii.MyPictureBox.Width; + //tbFSWd.Text = ii.MyPictureBox.Width.ToString(); + //tbFSHt.Text = ii.MyPictureBox.Height.ToString(); } else { @@ -573,8 +567,8 @@ namespace Volian.Controls.Library trBarFS.Minimum = Math.Min((int)wd, 72); trBarFS.Value = (int)wd; _origFigureSizeWidth = ii.MyPictureBox.Width; - tbFSWd.Text = ii.MyPictureBox.Width.ToString(); - tbFSHt.Text = ii.MyPictureBox.Height.ToString(); + //tbFSWd.Text = ii.MyPictureBox.Width.ToString(); + //tbFSHt.Text = ii.MyPictureBox.Height.ToString(); } private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType) diff --git a/PROMS/Volian.Controls.Library/ImageItem.cs b/PROMS/Volian.Controls.Library/ImageItem.cs index f5eda541..b51fcd9b 100644 --- a/PROMS/Volian.Controls.Library/ImageItem.cs +++ b/PROMS/Volian.Controls.Library/ImageItem.cs @@ -321,11 +321,7 @@ namespace Volian.Controls.Library int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) int ht = img.Height * MyStepPanel.DPI / 72; - //int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) - //double ht = (double)wd * aspectratio(img.Width, img.Height); - - //int ht = adjustimage(img.Height); // * MyStepPanel.DPI / 72; if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new. { ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); @@ -333,16 +329,12 @@ namespace Volian.Controls.Library { wd = ic.Image_Width * MyStepPanel.DPI / 72; ht = ic.Image_Height * MyStepPanel.DPI / 72; - //wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; - //ht = (double)wd * aspectratio(img.Width, img.Height); - //ht = wd * (int)aspectratio(img.Width, img.Height); - //ht = adjustimage(ic.Image_Height); // * MyStepPanel.DPI / 72; } } MyPictureBox.Visible = true; MyPictureBox.Width = wd; - MyPictureBox.Height = (int)ht; + MyPictureBox.Height = ht; MyPictureBox.SizeMode = PictureBoxSizeMode.Zoom; // as resize matches width/height. this.Width = MyPictureBox.Width + ImageMargin; this.Height = MyPictureBox.Height + 10; @@ -353,35 +345,7 @@ namespace Volian.Controls.Library _displayTags.TbFSht = ht.ToString(); } } - // B2024-060 adjust pasted image if too large. If the image is too large PROMS crashes. - private int adjustimage(int dim) - { - int dim2 = dim * MyStepPanel.DPI / 72; - if (dim2 > _displayTags.TrBarFS.Maximum) - { - //int y = dim2 - _displayTags.TrBarFS.Maximum; - ////int a = y * 72 / MyStepPanel.DPI; - //int a = y * MyStepPanel.DPI / 72; - //dim = dim - a; - //dim2 = dim * MyStepPanel.DPI / 72; - dim2 = _displayTags.TrBarFS.Maximum * 72 / MyStepPanel.DPI; - } - else - { - return dim2; - } - return dim2; - } - // B2024-060 Get aspect ratio to resize pasted image. - private double aspectratio(int w, int h) - { - //double ratio = Math.Max((double)image.width / (double)box.width, (double)image.height / (double)box.height); - //image.width = (int) (image.width / ratio); - //image.height = (int) (image.height / ratio); - double ratio = (double)h / (double)w; - return ratio; - } // the following gets called for 'NEW' images private E_ImageSource InsType = E_ImageSource.None; From c8ed5b0565273d6d9edd83de66d22c22b9b3b243 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 27 Aug 2024 11:04:23 -0400 Subject: [PATCH 7/7] B2024-063-Invalid-Format-message-box-displays-when-rev-date-empty-2 --- .../DlgPrintProcedure.cs | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs index aaf2fab9..d11f1282 100644 --- a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs +++ b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs @@ -1206,18 +1206,23 @@ namespace VEPROMS private bool validateDate(TextBox txtDate) { DateTime dDate; - if (DateTime.TryParse(txtDate.Text, out dDate)) + if (!(txtDate.Text == "")) { - return true; - } - else - { - string txtDate2 = txtDate.Text; - 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; + + if (DateTime.TryParse(txtDate.Text, out dDate)) + { + return true; + } + else + { + string txtDate2 = txtDate.Text; + 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)