MRI Capability
MyConfig for ItemInfo Fixed various problems with DisplayTabControl VEPROMS ribbon for DisplayTabPanel
This commit is contained in:
@@ -113,5 +113,16 @@ namespace VEPROMS.Properties {
|
||||
this["SystemColor"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
public global::System.Collections.Specialized.StringCollection MRIList {
|
||||
get {
|
||||
return ((global::System.Collections.Specialized.StringCollection)(this["MRIList"]));
|
||||
}
|
||||
set {
|
||||
this["MRIList"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,5 +26,8 @@
|
||||
<Setting Name="SystemColor" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">2</Value>
|
||||
</Setting>
|
||||
<Setting Name="MRIList" Type="System.Collections.Specialized.StringCollection" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
1142
PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs
generated
1142
PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -71,18 +71,67 @@ namespace VEPROMS
|
||||
// Save the location and size of the VE-PROMS appication for this user
|
||||
Settings.Default.Location = this.Location;
|
||||
Settings.Default.Size = this.Size;
|
||||
Settings.Default.Save();
|
||||
SaveMRU();
|
||||
//Settings.Default.Save();
|
||||
}
|
||||
private void ShutDownRibbons()
|
||||
{
|
||||
rtabEdit.Visible = false;
|
||||
rtabHelp.Visible = false;
|
||||
rtabHome.Visible = false;
|
||||
rtabTools.Visible = false;
|
||||
ribbonControl1.Height = 50;
|
||||
}
|
||||
|
||||
private void frmVEPROMS_Load(object sender, EventArgs e)
|
||||
{
|
||||
// get the saved location and size of the VE-PROMS appication for this user
|
||||
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
|
||||
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
|
||||
ShutDownRibbons();
|
||||
_MyMRIList = MostRecentItemList.GetMRILst((System.Collections.Specialized.StringCollection)(Properties.Settings.Default["MRIList"]));
|
||||
SetupMRU();
|
||||
}
|
||||
|
||||
#region MRU
|
||||
private MostRecentItemList _MyMRIList;
|
||||
private void SetupMRU()
|
||||
{
|
||||
icRecentDocs.SubItems.Clear();
|
||||
if (_MyMRIList.Count > 0)
|
||||
{
|
||||
LabelItem lblItem = new LabelItem();
|
||||
lblItem.Text = "Recent Documents:";
|
||||
icRecentDocs.SubItems.Add(lblItem);
|
||||
//icRecentDocs.SubItems.Add();
|
||||
for (int i = 0; i < _MyMRIList.Count; i++)
|
||||
{
|
||||
MostRecentItem mri = _MyMRIList[i];
|
||||
ButtonItem btnItem = new ButtonItem();
|
||||
if (i < 9)
|
||||
btnItem.Text = string.Format("<b>&{0}.</b> {1}", i + 1, mri.MenuTitle);
|
||||
else
|
||||
btnItem.Text = string.Format(" {1}", i + 1, mri.MenuTitle);
|
||||
btnItem.Tag = mri.ItemID;
|
||||
btnItem.Tooltip = mri.ToolTip;
|
||||
btnItem.Click += new EventHandler(btnItem_Click);
|
||||
icRecentDocs.SubItems.Add(btnItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
void btnItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ButtonItem btnItem = (ButtonItem)sender;
|
||||
MostRecentItem mri = _MyMRIList.Add((int)(btnItem.Tag));
|
||||
//SaveMRU();
|
||||
SetupMRU();
|
||||
if (mri != null) tc.OpenItem(mri.MyItem);
|
||||
}
|
||||
private void SaveMRU()
|
||||
{
|
||||
Properties.Settings.Default.MRIList = _MyMRIList.ToSettings();
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
#endregion
|
||||
#region Tree View
|
||||
|
||||
/// <summary>
|
||||
/// Get the selected tree node's properties
|
||||
/// </summary>
|
||||
@@ -101,7 +150,8 @@ namespace VEPROMS
|
||||
epComments.Expanded = false;
|
||||
rtxbComment.Text = "";
|
||||
epComments.TitleStyle.BackColor1.Color = _CommentTitleBckColor;
|
||||
|
||||
if(_MyMRIList.Add(node.VEObject)!=null)
|
||||
SetupMRU();
|
||||
switch (node.VEObject.GetType().Name)
|
||||
{
|
||||
case "FolderInfo":
|
||||
@@ -115,6 +165,7 @@ namespace VEPROMS
|
||||
case "ProcedureInfo":
|
||||
_LastProcedureInfo = (ProcedureInfo)(_LastTreeNode.VEObject);
|
||||
_LastProcedure = _LastProcedureInfo.Get();
|
||||
|
||||
tc.OpenItem((ItemInfo)_LastProcedureInfo);
|
||||
if (_LastProcedureInfo.ItemAnnotationCount > 0)
|
||||
{
|
||||
@@ -138,14 +189,14 @@ namespace VEPROMS
|
||||
_LastStepInfo = (StepInfo)(_LastTreeNode.VEObject);
|
||||
_LastStep = _LastStepInfo.Get();
|
||||
tc.OpenItem((ItemInfo)_LastStepInfo);
|
||||
if (_LastStepInfo.ItemAnnotationCount > 0)
|
||||
{
|
||||
if (!cbCmntDontPopup.Checked)
|
||||
epComments.Expanded = true;
|
||||
rtxbComment.Text = _LastStepInfo.ItemAnnotations[0].SearchText;
|
||||
//if (_LastStepInfo.ItemAnnotationCount > 0)
|
||||
//{
|
||||
// if (!cbCmntDontPopup.Checked)
|
||||
// epComments.Expanded = true;
|
||||
// rtxbComment.Text = _LastStepInfo.ItemAnnotations[0].SearchText;
|
||||
itemAnnotationsBindingSource.DataSource = _LastStepInfo.ItemAnnotations;
|
||||
epComments.TitleStyle.BackColor1.Color = Color.Yellow;
|
||||
}
|
||||
// epComments.TitleStyle.BackColor1.Color = Color.Yellow;
|
||||
//}
|
||||
#region Sample Display Table Code
|
||||
// display an exiting table in that rtf grid thing
|
||||
//if ((_LastStepInfo.MyContent.Type == 20007) || (_LastStepInfo.MyContent.Type == 20009))
|
||||
@@ -944,45 +995,45 @@ namespace VEPROMS
|
||||
/// <param name="node"></param>
|
||||
private void setupRibbonTabs(VETreeNode node)
|
||||
{
|
||||
switch (node.VEObject.GetType().Name)
|
||||
{
|
||||
case "FolderInfo":
|
||||
rtabEdit.Visible = false;
|
||||
rtabTools.Visible = false;
|
||||
rbnPrint.Visible = false;
|
||||
ribbonControl1.SelectedRibbonTabItem = rtabHome;
|
||||
break;
|
||||
case "DocVersionInfo":
|
||||
rtabEdit.Visible = false;
|
||||
rtabTools.Visible = false;
|
||||
rbnPrint.Visible = false;
|
||||
ribbonControl1.SelectedRibbonTabItem = rtabHome;
|
||||
break;
|
||||
case "ProcedureInfo":
|
||||
rtabEdit.Visible = true;
|
||||
rtabTools.Visible = true;
|
||||
rbnPrint.Visible = true;
|
||||
ribbonControl1.SelectedRibbonTabItem = rtabEdit;
|
||||
break;
|
||||
case "SectionInfo":
|
||||
rtabEdit.Visible = true;
|
||||
rtabTools.Visible = true;
|
||||
rbnPrint.Visible = true;
|
||||
ribbonControl1.SelectedRibbonTabItem = rtabEdit;
|
||||
break;
|
||||
case "StepInfo":
|
||||
rtabEdit.Visible = true;
|
||||
rtabTools.Visible = true;
|
||||
rbnPrint.Visible = true;
|
||||
ribbonControl1.SelectedRibbonTabItem = rtabEdit;
|
||||
break;
|
||||
default:
|
||||
rtabEdit.Visible = false;
|
||||
rtabTools.Visible = false;
|
||||
rbnPrint.Visible = false;
|
||||
ribbonControl1.SelectedRibbonTabItem = rtabHome;
|
||||
break;
|
||||
}
|
||||
//switch (node.VEObject.GetType().Name)
|
||||
//{
|
||||
// case "FolderInfo":
|
||||
// rtabEdit.Visible = false;
|
||||
// rtabTools.Visible = false;
|
||||
// rbnPrint.Visible = false;
|
||||
// ribbonControl1.SelectedRibbonTabItem = rtabHome;
|
||||
// break;
|
||||
// case "DocVersionInfo":
|
||||
// rtabEdit.Visible = false;
|
||||
// rtabTools.Visible = false;
|
||||
// rbnPrint.Visible = false;
|
||||
// ribbonControl1.SelectedRibbonTabItem = rtabHome;
|
||||
// break;
|
||||
// case "ProcedureInfo":
|
||||
// rtabEdit.Visible = true;
|
||||
// rtabTools.Visible = true;
|
||||
// rbnPrint.Visible = true;
|
||||
// ribbonControl1.SelectedRibbonTabItem = rtabEdit;
|
||||
// break;
|
||||
// case "SectionInfo":
|
||||
// rtabEdit.Visible = true;
|
||||
// rtabTools.Visible = true;
|
||||
// rbnPrint.Visible = true;
|
||||
// ribbonControl1.SelectedRibbonTabItem = rtabEdit;
|
||||
// break;
|
||||
// case "StepInfo":
|
||||
// rtabEdit.Visible = true;
|
||||
// rtabTools.Visible = true;
|
||||
// rbnPrint.Visible = true;
|
||||
// ribbonControl1.SelectedRibbonTabItem = rtabEdit;
|
||||
// break;
|
||||
// default:
|
||||
// rtabEdit.Visible = false;
|
||||
// rtabTools.Visible = false;
|
||||
// rbnPrint.Visible = false;
|
||||
// ribbonControl1.SelectedRibbonTabItem = rtabHome;
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1278,11 +1329,20 @@ namespace VEPROMS
|
||||
|
||||
private void tc_ItemSelectedChanged(object sender, DisplayPanelEventArgs args)
|
||||
{
|
||||
if (args.MyVlnCSLARTB.MyItem.ItemAnnotationCount > 0)
|
||||
if(args == null)
|
||||
itemAnnotationsBindingSource.DataSource = null;
|
||||
else
|
||||
itemAnnotationsBindingSource.DataSource = args.MyVlnCSLARTB.MyItem.ItemAnnotations;
|
||||
}
|
||||
|
||||
private void itemAnnotationsBindingSource_DataSourceChanged(object sender, EventArgs e)
|
||||
{
|
||||
AnnotationInfoList myAnnotations = itemAnnotationsBindingSource.DataSource as AnnotationInfoList;
|
||||
if (myAnnotations != null && myAnnotations.Count != 0)
|
||||
{
|
||||
if (!cbCmntDontPopup.Checked)
|
||||
epComments.Expanded = true;
|
||||
rtxbComment.Text = args.MyVlnCSLARTB.MyItem.ItemAnnotations[0].SearchText;
|
||||
rtxbComment.Text = myAnnotations[0].SearchText;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1290,6 +1350,7 @@ namespace VEPROMS
|
||||
epComments.Expanded = false;
|
||||
rtxbComment.Text = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user