Update underlying data field when related object is updated.

If the selected Library Document is out-of-range throw a specific error
Don't fail if the user clicks on open space in the BookMark list
Added property to provide a right margin (RTBMargin) between the RichTextBox and the StepItem
This commit is contained in:
Rich 2010-12-16 20:42:44 +00:00
parent abd26062f6
commit 10f06a5e9c
42 changed files with 147 additions and 69 deletions

View File

@ -4449,6 +4449,11 @@ private void vlnDataPortalFetch(string sPrefix,IColumns cols,string sql,bool get
sCheck2=FormatColumn("\r\n\t\t\t\t\t{member} = (value == null ? null : ({ctype})value.{!column});",column); sCheck2=FormatColumn("\r\n\t\t\t\t\t{member} = (value == null ? null : ({ctype})value.{!column});",column);
sCheck3=FormatColumn("({!member} == null ? {member} : ({ctype}){!member}.{!column}) != (value == null ? null : ({ctype})value.{!column})",column); sCheck3=FormatColumn("({!member} == null ? {member} : ({ctype}){!member}.{!column}) != (value == null ? null : ({ctype})value.{!column})",column);
} }
else
{
sCheck2=FormatColumn("\r\n\t\t\t\t\t{member} = value.{!column};// Update underlying data field",column);
sCheck3=FormatColumn("{!member} != value",column);
}
vlnProperty(RelObjType( column ) + (bInfo?"Info":"") ,sMember vlnProperty(RelObjType( column ) + (bInfo?"Info":"") ,sMember
,sProp,";"+DebugLine("20070501.4"),"",bReadOnly,column.IsInPrimaryKey,false,null,sCheck,sCheck2,sCheck3); ,sProp,";"+DebugLine("20070501.4"),"",bReadOnly,column.IsInPrimaryKey,false,null,sCheck,sCheck2,sCheck3);
//if (sProp.StartsWith("My"))_refreshMine += string.Format("\t\t\t{0} = null;\r\n",sMember); //if (sProp.StartsWith("My"))_refreshMine += string.Format("\t\t\t{0} = null;\r\n",sMember);

View File

@ -445,40 +445,40 @@ namespace VEPROMS
{ {
ProcessButtonClick(tiLibDoc, btnLibDocs); ProcessButtonClick(tiLibDoc, btnLibDocs);
} }
private void ppBtnCvrtToLibDoc_Click(object sender, EventArgs e) private void ppBtnCvrtToLibDoc_Click(object sender, EventArgs e)
{ {
// Double Check that this is not a step section, if so just return. // Double Check that this is not a step section, if so just return.
if (_isStepSection) return; if (_isStepSection) return;
// If current section is library document, user selected to convert to non-library document. If // If current section is library document, user selected to convert to non-library document. If
// this is the case, data from lib doc must be copied to new document and the section must point // this is the case, data from lib doc must be copied to new document and the section must point
// to id. // to id.
if (ppBtnCvrtToLibDoc.Text.IndexOf("Non") > 0) // convert to a 'non' library. if (ppBtnCvrtToLibDoc.Text.IndexOf("Non") > 0) // convert to a 'non' library.
{ {
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID); ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
DocumentInfo doclibinfo = ii.MyContent.MyEntry.MyDocument; DocumentInfo doclibinfo = ii.MyContent.MyEntry.MyDocument;
// if just one usage (this one), then just convert this to a non-library document. If there are more // if just one usage (this one), then just convert this to a non-library document. If there are more
// than one usage, make a copy so that the rest of the usages still point to the library document. // than one usage, make a copy so that the rest of the usages still point to the library document.
if (doclibinfo.DocumentEntryCount == 1) if (doclibinfo.DocumentEntryCount == 1)
_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle = null; _SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle = null;
else else
{ {
// make new document with 'no' libtitle - use libtitle for the doc title. Then link this // make new document with 'no' libtitle - use libtitle for the doc title. Then link this
// to the item... // to the item...
Document doc = Document.MakeDocument(null, doclibinfo.DocContent,doclibinfo.DocAscii,doclibinfo.Config,doclibinfo.DocPdf); Document doc = Document.MakeDocument(null, doclibinfo.DocContent, doclibinfo.DocAscii, doclibinfo.Config, doclibinfo.DocPdf);
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = doc; _SectionConfig.MySection.MyContent.MyEntry.MyDocument = doc;
} }
ppCmbxLibDoc.Items.Clear(); ppCmbxLibDoc.Items.Clear();
ppCmbxLibDoc.WatermarkEnabled = true; ppCmbxLibDoc.WatermarkEnabled = true;
ppBtnCvrtToLibDoc.Text = "Convert this to a Library Document"; ppBtnCvrtToLibDoc.Text = "Convert this to a Library Document";
superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Library Document button", "", "This button will convert the current section to a library document, allowing it t" + superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Library Document button", "", "This button will convert the current section to a library document, allowing it t" +
"o be shared with other procedures.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76))); "o be shared with other procedures.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76)));
return; return;
} }
// If current section is not a library document, it is either a new section or the user selected the // If current section is not a library document, it is either a new section or the user selected the
// button to convert it to a library document. Check for this, if new, just attach to document. // button to convert it to a library document. Check for this, if new, just attach to document.
else if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null) else if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null)
{ {
// if nothing was selected, give message & return // if nothing was selected, give message & return
if (ppCmbxLibDoc.SelectedIndex == -1) if (ppCmbxLibDoc.SelectedIndex == -1)
{ {
@ -495,57 +495,57 @@ namespace VEPROMS
break; break;
} }
} }
if (docid==-1)return; if (docid == -1) return;
using (Document dc = Document.Get(docid)) using (Document dc = Document.Get(docid))
{ {
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = dc; _SectionConfig.MySection.MyContent.MyEntry.MyDocument = dc;
} }
} }
else else
// if converting to library document, just put 'text' into the 'LibTitle' property (that's what flags // if converting to library document, just put 'text' into the 'LibTitle' property (that's what flags
// it to be a library document. // it to be a library document.
{ {
_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle = _SectionConfig.MySection.MyContent.Text; _SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle = _SectionConfig.MySection.MyContent.Text;
// Save now so that it shows up in the library document list in the ppcmbxlibdoc (combo box // Save now so that it shows up in the library document list in the ppcmbxlibdoc (combo box
// listing lib docs that is regenerated in ppCmbxLibDocFill) // listing lib docs that is regenerated in ppCmbxLibDocFill)
_SectionConfig.MySection.MyContent.MyEntry.MyDocument.Save(); _SectionConfig.MySection.MyContent.MyEntry.MyDocument.Save();
ppCmbxLibDocFill(); ppCmbxLibDocFill();
ppCmbxLibDoc.Enabled = false; ppCmbxLibDoc.Enabled = false;
} }
ppBtnCvrtToLibDoc.Text = "Convert this Section To A Non-Library Document"; ppBtnCvrtToLibDoc.Text = "Convert this Section To A Non-Library Document";
lblLibraryDocument.Text = "Library Document"; lblLibraryDocument.Text = "Library Document";
superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Non-Library Document", "", "This button will convert the current section from a library document to a non-library document", superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Non-Library Document", "", "This button will convert the current section from a library document to a non-library document",
null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76))); null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76)));
} }
private void ppCmbxLibDoc_SelectedIndexChanged(object sender, EventArgs e) private void ppCmbxLibDoc_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (_Initializing) return; if (_Initializing) return;
// first check if this is a 'new' section - if so, then just return. // first check if this is a 'new' section - if so, then just return.
if (_SectionConfig.MySection.MyContent.MyEntry == null) return; if (_SectionConfig.MySection.MyContent.MyEntry == null) return;
// see if this was NOT a library document. If it is not a library document, ask the user if // see if this was NOT a library document. If it is not a library document, ask the user if
// it should be linked, thus losing the original text/data. // it should be linked, thus losing the original text/data.
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument != null && !(_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != "")) if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument != null && !(_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != ""))
{ {
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.New(); _SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.New();
if (ppCmbxLibDoc.SelectedIndex > -1) if (ppCmbxLibDoc.SelectedIndex > -1)
{ {
if (MessageBox.Show("Linking to this library document will cause loss of data to this section. Do you want to continue?", "Link", MessageBoxButtons.YesNo) == DialogResult.Yes) if (MessageBox.Show("Linking to this library document will cause loss of data to this section. Do you want to continue?", "Link", MessageBoxButtons.YesNo) == DialogResult.Yes)
{ {
_DocumentToDelete = _SectionConfig.MySection.MyContent.MyEntry.MyDocument; _DocumentToDelete = _SectionConfig.MySection.MyContent.MyEntry.MyDocument;
DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true); DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true);
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID); _SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID);
ppBtnCvrtToLibDoc.Enabled = true; ppBtnCvrtToLibDoc.Enabled = true;
} }
else else
{ {
ppCmbxLibDoc.SelectedIndex = -1; ppCmbxLibDoc.SelectedIndex = -1;
ppBtnCvrtToLibDoc.Enabled = false; ppBtnCvrtToLibDoc.Enabled = false;
} }
} }
} }
//else if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null) //else if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null)
//{ //{
// // was creating a new document & selected to connect it to a libdoc // // was creating a new document & selected to connect it to a libdoc
@ -553,12 +553,19 @@ namespace VEPROMS
//} //}
else else
{ {
// it already is a library document, just change usages... // it already is a library document, just change usages...
DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true); DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true);
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID); if (ppCmbxLibDoc.SelectedIndex >= 0 && ppCmbxLibDoc.SelectedIndex < LibDocList.Count)
ppBtnCvrtToLibDoc.Enabled = true; {
} _SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID);
} ppBtnCvrtToLibDoc.Enabled = true;
}
else
{
throw new Exception(string.Format("Index Out Of Range Index = {0}, Count = {1}", ppCmbxLibDoc.SelectedIndex, LibDocList.Count));
}
}
}
#endregion #endregion
#region View Settings tab #region View Settings tab

View File

@ -135,6 +135,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
_ItemID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -167,6 +168,7 @@ namespace VEPROMS.CSLA.Library
if (_MyAnnotationType != value) if (_MyAnnotationType != value)
{ {
_MyAnnotationType = value; _MyAnnotationType = value;
_TypeID = value.TypeID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
_ItemID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -136,6 +136,7 @@ namespace VEPROMS.CSLA.Library
if (_MyGroup != value) if (_MyGroup != value)
{ {
_MyGroup = value; _MyGroup = value;
_GID = value.GID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -168,6 +169,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRole != value) if (_MyRole != value)
{ {
_MyRole = value; _MyRole = value;
_RID = value.RID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -200,6 +202,7 @@ namespace VEPROMS.CSLA.Library
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
_FolderID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -145,6 +145,7 @@ namespace VEPROMS.CSLA.Library
if (_MyDocVersion != value) if (_MyDocVersion != value)
{ {
_MyDocVersion = value; _MyDocVersion = value;
_VersionID = value.VersionID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -177,6 +178,7 @@ namespace VEPROMS.CSLA.Library
if (_MyROFst != value) if (_MyROFst != value)
{ {
_MyROFst = value; _MyROFst = value;
_ROFstID = value.ROFstID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyParent != value) if (_MyParent != value)
{ {
_MyParent = value; _MyParent = value;
_ParentID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -75,6 +75,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
_ItemID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -172,6 +172,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRODb != value) if (_MyRODb != value)
{ {
_MyRODb = value; _MyRODb = value;
_RODbID = value.RODbID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -91,6 +91,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItemToID != value) if (_MyItemToID != value)
{ {
_MyItemToID = value; _MyItemToID = value;
_ToID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -123,6 +124,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItemRangeID != value) if (_MyItemRangeID != value)
{ {
_MyItemRangeID = value; _MyItemRangeID = value;
_RangeID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -134,6 +134,7 @@ namespace VEPROMS.CSLA.Library
if (_MyContent != value) if (_MyContent != value)
{ {
_MyContent = value; _MyContent = value;
_ContentID = value.ContentID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -149,6 +149,7 @@ namespace VEPROMS.CSLA.Library
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
_FolderID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyROFst != value) if (_MyROFst != value)
{ {
_MyROFst = value; _MyROFst = value;
_ROFstID = value.ROFstID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -142,6 +142,7 @@ namespace VEPROMS.CSLA.Library
if (_MyDocument != value) if (_MyDocument != value)
{ {
_MyDocument = value; _MyDocument = value;
_DocID = value.DocID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -145,6 +145,7 @@ namespace VEPROMS.CSLA.Library
if (_MyROFst != value) if (_MyROFst != value)
{ {
_MyROFst = value; _MyROFst = value;
_ROFstID = value.ROFstID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -177,6 +178,7 @@ namespace VEPROMS.CSLA.Library
if (_MyROImage != value) if (_MyROImage != value)
{ {
_MyROImage = value; _MyROImage = value;
_ImageID = value.ImageID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -178,6 +178,7 @@ namespace VEPROMS.CSLA.Library
if (_MyParent != value) if (_MyParent != value)
{ {
_MyParent = value; _MyParent = value;
_ParentID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -210,6 +211,7 @@ namespace VEPROMS.CSLA.Library
if (_MyConnection != value) if (_MyConnection != value)
{ {
_MyConnection = value; _MyConnection = value;
_DBID = value.DBID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyGroup != value) if (_MyGroup != value)
{ {
_MyGroup = value; _MyGroup = value;
_GID = value.GID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -120,6 +121,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRole != value) if (_MyRole != value)
{ {
_MyRole = value; _MyRole = value;
_RID = value.RID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -189,6 +189,7 @@ namespace VEPROMS.CSLA.Library
if (_MyParent != value) if (_MyParent != value)
{ {
_MyParent = value; _MyParent = value;
_ParentID = value.FormatID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
_FolderID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyParent != value) if (_MyParent != value)
{ {
_MyParent = value; _MyParent = value;
_ParentID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -120,6 +121,7 @@ namespace VEPROMS.CSLA.Library
if (_MyConnection != value) if (_MyConnection != value)
{ {
_MyConnection = value; _MyConnection = value;
_DBID = value.DBID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRole != value) if (_MyRole != value)
{ {
_MyRole = value; _MyRole = value;
_RID = value.RID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -120,6 +121,7 @@ namespace VEPROMS.CSLA.Library
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
_FolderID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyUser != value) if (_MyUser != value)
{ {
_MyUser = value; _MyUser = value;
_UID = value.UID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -239,6 +239,7 @@ namespace VEPROMS.CSLA.Library
if (_MyContent != value) if (_MyContent != value)
{ {
_MyContent = value; _MyContent = value;
_ContentID = value.ContentID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyAnnotationType != value) if (_MyAnnotationType != value)
{ {
_MyAnnotationType = value; _MyAnnotationType = value;
_TypeID = value.TypeID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
_FolderID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyContent != value) if (_MyContent != value)
{ {
_MyContent = value; _MyContent = value;
_FromID = value.ContentID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -123,6 +124,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItemToID != value) if (_MyItemToID != value)
{ {
_MyItemToID = value; _MyItemToID = value;
_ToID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyContent != value) if (_MyContent != value)
{ {
_MyContent = value; _MyContent = value;
_FromID = value.ContentID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -120,6 +121,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItemRangeID != value) if (_MyItemRangeID != value)
{ {
_MyItemRangeID = value; _MyItemRangeID = value;
_RangeID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -135,6 +135,7 @@ namespace VEPROMS.CSLA.Library
if (_MyUser != value) if (_MyUser != value)
{ {
_MyUser = value; _MyUser = value;
_UID = value.UID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -167,6 +168,7 @@ namespace VEPROMS.CSLA.Library
if (_MyGroup != value) if (_MyGroup != value)
{ {
_MyGroup = value; _MyGroup = value;
_GID = value.GID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -154,6 +154,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
_ItemID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -134,6 +134,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRole != value) if (_MyRole != value)
{ {
_MyRole = value; _MyRole = value;
_RID = value.RID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyContent != value) if (_MyContent != value)
{ {
_MyContent = value; _MyContent = value;
_ContentID = value.ContentID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -170,6 +170,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRODb != value) if (_MyRODb != value)
{ {
_MyRODb = value; _MyRODb = value;
_RODbID = value.RODbID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyDocVersion != value) if (_MyDocVersion != value)
{ {
_MyDocVersion = value; _MyDocVersion = value;
_VersionID = value.VersionID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyROImage != value) if (_MyROImage != value)
{ {
_MyROImage = value; _MyROImage = value;
_ImageID = value.ImageID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -157,6 +157,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRODb != value) if (_MyRODb != value)
{ {
_MyRODb = value; _MyRODb = value;
_RODbID = value.RODbID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyROFst != value) if (_MyROFst != value)
{ {
_MyROFst = value; _MyROFst = value;
_ROFstID = value.ROFstID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -135,6 +135,7 @@ namespace VEPROMS.CSLA.Library
if (_MyContent != value) if (_MyContent != value)
{ {
_MyContent = value; _MyContent = value;
_ContentID = value.ContentID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -251,6 +252,7 @@ namespace VEPROMS.CSLA.Library
if (_MyRODb != value) if (_MyRODb != value)
{ {
_MyRODb = value; _MyRODb = value;
_RODbID = value.RODbID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyGroup != value) if (_MyGroup != value)
{ {
_MyGroup = value; _MyGroup = value;
_GID = value.GID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -120,6 +121,7 @@ namespace VEPROMS.CSLA.Library
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
_FolderID = value.FolderID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -136,6 +136,7 @@ namespace VEPROMS.CSLA.Library
if (_MyContent != value) if (_MyContent != value)
{ {
_MyContent = value; _MyContent = value;
_FromID = value.ContentID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -171,6 +172,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItemToID != value) if (_MyItemToID != value)
{ {
_MyItemToID = value; _MyItemToID = value;
_ToID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }
@ -203,6 +205,7 @@ namespace VEPROMS.CSLA.Library
if (_MyItemRangeID != value) if (_MyItemRangeID != value)
{ {
_MyItemRangeID = value; _MyItemRangeID = value;
_RangeID = value.ItemID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -88,6 +88,7 @@ namespace VEPROMS.CSLA.Library
if (_MyGroup != value) if (_MyGroup != value)
{ {
_MyGroup = value; _MyGroup = value;
_GID = value.GID;// Update underlying data field
PropertyHasChanged(); PropertyHasChanged();
} }
} }

View File

@ -113,7 +113,8 @@ namespace Volian.Controls.Library
private void lbxBookMarks_Click(object sender, EventArgs e) private void lbxBookMarks_Click(object sender, EventArgs e)
{ {
MostRecentItem itm = lbxBookMarks.SelectedValue as MostRecentItem; MostRecentItem itm = lbxBookMarks.SelectedValue as MostRecentItem;
MyDisplayTabControl.OpenItem(itm.MyItemInfo); if(itm != null)
MyDisplayTabControl.OpenItem(itm.MyItemInfo);
} }
#endregion #endregion
} }

View File

@ -372,6 +372,16 @@ namespace Volian.Controls.Library
get { return new Point(Location.X + lblTab.Left, Location.Y); } get { return new Point(Location.X + lblTab.Left, Location.Y); }
set { Location = new Point(value.X - lblTab.Left, value.Y); } set { Location = new Point(value.X - lblTab.Left, value.Y); }
} }
private int _RTBMargin = 3;
/// <summary>
/// Margin between the StepItem and the StepRTB. Appears on the Right.
/// Will allow space to draw a Change Bar on the right side of the StepItem.
/// </summary>
public int RTBMargin
{
get { return _RTBMargin; }
set { _RTBMargin = value; }
}
/// <summary> /// <summary>
/// Width of the Tab and RTB /// Width of the Tab and RTB
/// </summary> /// </summary>
@ -380,7 +390,7 @@ namespace Volian.Controls.Library
get { return Width - lblTab.Left; } get { return Width - lblTab.Left; }
set set
{ {
Width = value + lblTab.Left; Width = RTBMargin + value + lblTab.Left;
} }
} }
/// <summary> /// <summary>
@ -430,7 +440,7 @@ namespace Volian.Controls.Library
lblTab.Width = tabString.Length * 8 * MyStepPanel.DPI / 96;// Adjust width for DPI lblTab.Width = tabString.Length * 8 * MyStepPanel.DPI / 96;// Adjust width for DPI
Invalidate(); Invalidate();
_MyStepRTB.Left = lblTab.Left + lblTab.Width;// +2; _MyStepRTB.Left = lblTab.Left + lblTab.Width;// +2;
_MyStepRTB.Width = Width - _MyStepRTB.Left; _MyStepRTB.Width = Width - _MyStepRTB.Left - RTBMargin;
_TabFormat = value; // tabString; _TabFormat = value; // tabString;
} }
} }