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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user