Add UserInfo property and modified code to assure a person with Reviewer security can only manage annotations created by themself.
Added SessionInfo property to DisplayTabControl class and managed opening and closing DisplayTabItems. Added OwnerID and UserRole properties to DisplayTabItem class and obtained owner id and setup security based on user role when opening an item. Added property to allow forced check in of word document to ignore any changes made by user. Removed debug code Added methods to setup ribbon control based on user's security role. Added SessionInfo property and events and methods to setup proper menu items to appear on the right click of a node based on user's role and checked out status of item.
This commit is contained in:
@@ -85,6 +85,12 @@ namespace Volian.Controls.Library
|
||||
return !doc.Saved;
|
||||
}
|
||||
}
|
||||
private bool _OverrideClose = false;
|
||||
public bool OverrideClose
|
||||
{
|
||||
get { return _OverrideClose; }
|
||||
set { _OverrideClose = value; }
|
||||
}
|
||||
public E_ViewMode PanelViewEditMode = E_ViewMode.Edit;
|
||||
#endregion
|
||||
//private frmPG _frm = null;
|
||||
@@ -187,7 +193,7 @@ namespace Volian.Controls.Library
|
||||
this._MyDSOFramer.Open(MyDSOFile.MyFile.FullName);
|
||||
}
|
||||
LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
|
||||
//Console.WriteLine("Version {0}", doc.Application.Version);
|
||||
Console.WriteLine("Version {0}", doc.Application.Version);
|
||||
float ver;
|
||||
if (!float.TryParse(doc.Application.Version, out ver))
|
||||
ver = 12.0F;
|
||||
@@ -528,6 +534,8 @@ namespace Volian.Controls.Library
|
||||
/// <returns></returns>
|
||||
public bool SaveDirty()
|
||||
{
|
||||
if (OverrideClose)
|
||||
return false;
|
||||
if (IsDirty)
|
||||
{
|
||||
// Unfortunately, the only way to handle view mode for DSO Framer is to not save.
|
||||
@@ -537,7 +545,7 @@ namespace Volian.Controls.Library
|
||||
return false;
|
||||
}
|
||||
//if (MessageBox.Show("Save changes to " + _MyDisplayTabItem.MyItemInfo.TabTitle + "\r\n" + _MyDisplayTabItem.MyItemInfo.TabToolTip, "Document has Changed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
if (MessageBox.Show("Save changes to " + _MyDisplayTabItem.Text + "\r\n" + _MyDisplayTabItem.Tooltip, "Document has Changed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
if (MessageBox.Show("Save changes to " + _MyDisplayTabItem.Text + "\r\n" + _MyDisplayTabItem.Tooltip, "Document has Changed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
return SaveDSO();
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user