Added Warning with triple line box, Adjusted PSI Use Class text X-location
Support for Printing ‘[xx]’ text within an annotation by allowing for xlocation on dialog. Triple Line Box around note or caution
This commit is contained in:
parent
ac47021609
commit
a2835ab73d
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -404,17 +404,21 @@ namespace VEPROMS
|
||||
foreach (AnnotationTypeInfo ai in myAnnotationTypeInfoList) //spin through old list (database)
|
||||
{
|
||||
LocalAnnotationTypeInfo found = null;
|
||||
AnnotationTypeConfig oldAtc = new AnnotationTypeConfig(ai.Config);
|
||||
foreach(LocalAnnotationTypeInfo lai in myLocalAnnotationTypeInfoList) // find match in new list
|
||||
if (ai.TypeID == lai.TypeID )
|
||||
found = lai;
|
||||
if (found != null)
|
||||
{
|
||||
if (found.Name != ai.Name)// if different then save changes
|
||||
if (found.Name != ai.Name || oldAtc.PrintableText_XLocation != found.PrntLoc)// if different then save changes
|
||||
{
|
||||
using (AnnotationType at = ai.Get())
|
||||
{
|
||||
at.Name = found.Name;
|
||||
at.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||
AnnotationTypeConfig newAtc = new AnnotationTypeConfig();
|
||||
newAtc.PrintableText_XLocation = found.PrntLoc;
|
||||
at.Config = newAtc.ToString();
|
||||
at.DTS = DateTime.Now;
|
||||
at.Save();
|
||||
}
|
||||
@ -433,7 +437,9 @@ namespace VEPROMS
|
||||
}
|
||||
foreach (LocalAnnotationTypeInfo lai in myLocalAnnotationTypeInfoList)
|
||||
{
|
||||
using (AnnotationType at = AnnotationType.New(lai.Name, "", DateTime.Now, Volian.Base.Library.VlnSettings.UserID))
|
||||
AnnotationTypeConfig newAtc = new AnnotationTypeConfig();
|
||||
newAtc.PrintableText_XLocation = lai.PrntLoc;
|
||||
using (AnnotationType at = AnnotationType.New(lai.Name, newAtc.ToString(), DateTime.Now, Volian.Base.Library.VlnSettings.UserID))
|
||||
at.Save();
|
||||
}
|
||||
AnnotationTypeInfoList.Refresh();
|
||||
@ -1289,6 +1295,7 @@ namespace VEPROMS
|
||||
//if (dr == DialogResult.Yes)
|
||||
//{
|
||||
myLocalAnnotationTypeInfoList[_LastAnnotationTypeInfoIndex].Name = tbxAnnotationDescription.Text;
|
||||
myLocalAnnotationTypeInfoList[_LastAnnotationTypeInfoIndex].PrntLoc = int.Parse(txbPrntLoc.Text == "" ? "0" : txbPrntLoc.Text);
|
||||
RefreshAnnotationTypeList();
|
||||
//}
|
||||
}
|
||||
@ -1313,12 +1320,17 @@ namespace VEPROMS
|
||||
btnAnnoTypeRemove.Enabled = false;
|
||||
txbxRemoveMsg.Visible = false;
|
||||
lblAnnoTypeCntMessage.Visible = false;
|
||||
txbPrntLoc.Visible = false;
|
||||
lblPrintTxt.Visible = false;
|
||||
return;
|
||||
}
|
||||
tbxAnnotationDescription.Enabled = true;
|
||||
tbxAnnotationDescription.Text = ai.Name;
|
||||
btnAnnoTypeUndo.Enabled = false;
|
||||
btnAnnoTypeApply.Enabled = false;
|
||||
txbPrntLoc.Visible = true;
|
||||
lblPrintTxt.Visible = true;
|
||||
txbPrntLoc.Text = ai.PrntLoc != 0 ? ai.PrntLoc.ToString() : "";
|
||||
if (ai.AnnotationTypeAnnotationCount == 0)
|
||||
{
|
||||
btnAnnoTypeRemove.Enabled = true;
|
||||
@ -1345,7 +1357,11 @@ namespace VEPROMS
|
||||
btnAnnoTypeUndo.Enabled = true;
|
||||
btnAnnoTypeApply.Enabled = true;
|
||||
}
|
||||
|
||||
private void tbxAnnotationPrntLoc_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
btnAnnoTypeUndo.Enabled = true;
|
||||
btnAnnoTypeApply.Enabled = true;
|
||||
}
|
||||
private void tiAnnoTypes_Click(object sender, EventArgs e)
|
||||
{
|
||||
lbAnnotationTypes.SelectedIndex = -1;
|
||||
@ -1383,6 +1399,7 @@ namespace VEPROMS
|
||||
private void btnAnnoTypeUndo_Click(object sender, EventArgs e)
|
||||
{
|
||||
tbxAnnotationDescription.Undo();
|
||||
txbPrntLoc.Undo();
|
||||
btnAnnoTypeUndo.Enabled = false;
|
||||
btnAnnoTypeApply.Enabled = false;
|
||||
//int saveIdx = lbAnnotationTypes.SelectedIndex;
|
||||
@ -1410,7 +1427,23 @@ namespace VEPROMS
|
||||
LoadLocalAnnotationTypeInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private void txbAnnotationPrntLoc_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
if (_ValidateTextBox)
|
||||
{
|
||||
string newloc = txbPrntLoc.Text;
|
||||
if (newloc == "") newloc = "0";
|
||||
try
|
||||
{
|
||||
int newloci = int.Parse(newloc);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Invalid Print Location, must be an integer.", "Print Text Location");
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void tbxAnnotationDescription_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
if (_ValidateTextBox)
|
||||
@ -1651,6 +1684,9 @@ namespace VEPROMS
|
||||
btnAnnoTypeApply.Enabled = false;
|
||||
LocalAnnotationTypeInfo ati = lbAnnotationTypes.SelectedValue as LocalAnnotationTypeInfo;
|
||||
ati.Name = tbxAnnotationDescription.Text;
|
||||
txbPrntLoc.Visible = true;
|
||||
lblPrintTxt.Visible = true;
|
||||
ati.PrntLoc = int.Parse(txbPrntLoc.Text == "" ? "0" : txbPrntLoc.Text); // data was already checked
|
||||
RefreshAnnotationTypeList();
|
||||
}
|
||||
|
||||
@ -1736,6 +1772,12 @@ namespace VEPROMS
|
||||
get { return _Name; }
|
||||
set { _Name = value; }
|
||||
}
|
||||
private int _PrntLoc;
|
||||
public int PrntLoc
|
||||
{
|
||||
get {return _PrntLoc;}
|
||||
set {_PrntLoc = value; }
|
||||
}
|
||||
private int _AnnotationTypeAnnotationCount;
|
||||
public int AnnotationTypeAnnotationCount
|
||||
{
|
||||
@ -1746,12 +1788,18 @@ namespace VEPROMS
|
||||
{
|
||||
TypeID = MyUniqueID;
|
||||
Name = name;
|
||||
PrntLoc = 0;
|
||||
AnnotationTypeAnnotationCount = 0;
|
||||
}
|
||||
public LocalAnnotationTypeInfo(AnnotationTypeInfo ai)
|
||||
{
|
||||
TypeID = ai.TypeID;
|
||||
Name = ai.Name;
|
||||
AnnotationTypeConfig atc = new AnnotationTypeConfig(ai);
|
||||
if (atc != null)
|
||||
{
|
||||
PrntLoc = atc.PrintableText_XLocation;
|
||||
}
|
||||
AnnotationTypeAnnotationCount = ai.AnnotationTypeAnnotationCount;
|
||||
}
|
||||
public override string ToString()
|
||||
|
@ -131,6 +131,9 @@ Check "Show Default Settings" to display the "default" graphic file extension se
|
||||
<metadata name="imageCodecInfoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>665, 17</value>
|
||||
</metadata>
|
||||
<metadata name="imageCodecInfoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>665, 17</value>
|
||||
</metadata>
|
||||
<data name="ppBtnDeftDisAutoDuplx.SuperTooltip" xml:space="preserve">
|
||||
<value>This will revert the Disable Automatic Duplexing selection back to using the parent's (default) setting.
|
||||
|
||||
@ -170,8 +173,8 @@ Check "Show Default Settings" to display the "default" Change Bar Custom Message
|
||||
<data name="ppBtnChgTextColors.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK+AAA
|
||||
CvgBZiY8/QAAArVJREFUOE+lkV1IU2EYx0/eBHURdWXWcsxCQuqqMAwk+u6iaLlAxb78yDKllSViGllK
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
|
||||
CvYBwq9wAwAAArVJREFUOE+lkV1IU2EYx0/eBHURdWXWcsxCQuqqMAwk+u6iaLlAxb78yDKllSViGllK
|
||||
iSstHZpiCWm2Jjmcjj7oQgVrGg7nYTq3NLZ0H859eN5zzj7aeTpntLXhVXTxg/d53+f/43nfFwOA/yKm
|
||||
oF2yUkpfiUhdmZ/EbwZJ3e0A0pz3kIuNTdF90UQWtOttA6HJ9lHW1h9ejwrCUJZnPxFe7EfaApsVr7kV
|
||||
Heb4E5aVI/xagLJ3OGlPH4oROF/7KHuna1krNi+PirykRZq5SkDOVHgp+4tFLgB9JQCNZwEUJSEB7ehm
|
||||
|
@ -41,6 +41,33 @@ namespace VEPROMS.CSLA.Library
|
||||
if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
|
||||
return s;
|
||||
}
|
||||
#region PrintableText
|
||||
public int PrintableText_XLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = _Xp["PrintableText", "XLocation"];
|
||||
if (s == string.Empty) return 0;
|
||||
int tst = 0;
|
||||
try
|
||||
{
|
||||
tst = int.Parse(s);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return int.Parse(s);
|
||||
}
|
||||
set
|
||||
{
|
||||
string s = _Xp["PrintableText", "XLocation"];
|
||||
if (value.ToString() == s) return;
|
||||
_Xp["PrintableText", "XLocation"] = value.ToString();
|
||||
OnPropertyChanged("PrintableText_XLocation");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region AnnotationTypeConfigProperties
|
||||
[Category("Integration")] // Special Editor for Annotation Type
|
||||
[DisplayName("Executable")]
|
||||
|
@ -5481,6 +5481,14 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _Index, "@Index");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _NumLines;
|
||||
public int? NumLines // This was added to support 3 line box for VC Summer Alarms. It is only checked in 'double line' vlnbox.cs code!
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _NumLines, "@NumLines");
|
||||
}
|
||||
}
|
||||
private LazyLoad<float?> _Start;
|
||||
public float? Start
|
||||
{
|
||||
|
@ -145,6 +145,18 @@ namespace Volian.Print.Library
|
||||
cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier);
|
||||
break;
|
||||
case BoxDouble:
|
||||
if (MyBox.NumLines == 3)
|
||||
{
|
||||
lineThickness = .6F;
|
||||
cb.SetLineWidth(lineThickness / 2F);
|
||||
// outer rectangle (rectangle's are defined as x,y,w,h)
|
||||
cb.Rectangle(left + llxOffset - lineThickness * 1.5F, bottom - lineThickness, right - left + lineThickness * 3, (Height + lineThickness * 2) * MyPageHelper.YMultiplier);
|
||||
// inner rectangle
|
||||
cb.Rectangle(left + llxOffset + lineThickness, bottom + lineThickness * 1.5F, right - left - lineThickness * 2, (Height - lineThickness * 3) * MyPageHelper.YMultiplier);
|
||||
// outer outer most
|
||||
cb.Rectangle(left + llxOffset - lineThickness * 4F, bottom - lineThickness * 3.5F, right - left + lineThickness * 8, (Height + lineThickness * 7) * MyPageHelper.YMultiplier);
|
||||
break;
|
||||
}
|
||||
lineThickness = .6F;
|
||||
cb.SetLineWidth(lineThickness);
|
||||
// outer rectangle (rectangle's are defined as x,y,w,h)
|
||||
|
@ -3153,7 +3153,8 @@ namespace Volian.Print.Library
|
||||
ChildrenAbove.StepDesignator = null;
|
||||
ChildrenAbove.StepDesignatorColumn = null;
|
||||
}
|
||||
|
||||
DoAnnotationPrintableText(cb, itemInfo, yoff); // Look in annotation type to see if annotation has text that should be printed (like a step designator)
|
||||
|
||||
// if this is a hls with a box, adjust the starting y location for the hls. this is done here
|
||||
// in case this hls had a boxed caution and/or note before it. Also, this code is here rather
|
||||
// than in the vlnparagraphs.add code because the yoff in that code will position the box, but
|
||||
@ -3762,6 +3763,34 @@ namespace Volian.Print.Library
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
}
|
||||
|
||||
private void DoAnnotationPrintableText(PdfContentByte cb, ItemInfo itemInfo, float yoff)
|
||||
{
|
||||
// if this step has an Annotation and it has config data to define location, parse out '[xx]' and print it at the location
|
||||
// this was added for VC Summer (unit 2 & 3) but is available for any data that has defined the location in the config (from the folder properties
|
||||
// at the top node - annotationtype tab.
|
||||
if (itemInfo.ItemAnnotationCount > 0)
|
||||
{
|
||||
foreach (AnnotationInfo ai in itemInfo.ItemAnnotations)
|
||||
{
|
||||
// get the annotation type from the annotation, and see if it has a print location:
|
||||
AnnotationTypeInfo at = ai.MyAnnotationType;
|
||||
AnnotationTypeConfig atc = new AnnotationTypeConfig(at.Config);
|
||||
if (atc.PrintableText_XLocation != 0)
|
||||
{
|
||||
int st = ai.SearchText.IndexOf("[");
|
||||
int end = ai.SearchText.IndexOf("]");
|
||||
if (st != -1 && end != -1 && end > st)
|
||||
{
|
||||
string pref = ai.SearchText.Substring(st, end - st + 1); // annotation - parse out [xx]
|
||||
float xPref = atc.PrintableText_XLocation;
|
||||
PartsLeft.Add(new vlnText(cb, this, pref, pref, xPref, yoff, _MyItemInfo.FormatStepData.Font));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private float AdjustLocIfLongerRNO(ItemInfo itemInfo, float yoff, float yoffRightParent)
|
||||
{
|
||||
if (!itemInfo.IsInRNO && yoffRightParent > yoff && itemInfo.FormatStepData.Type.Contains("AER"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user