This commit is contained in:
2009-01-27 15:47:52 +00:00
parent 258b503bed
commit d548cf9b29
4 changed files with 228 additions and 535 deletions

View File

@@ -29,18 +29,54 @@ namespace VEPROMS
#endregion
Color _CommentTitleBckColor;
VETreeNode _PrevBookMark = null;
string _PathToROs = @"\\Volian-server\04 ve-proms files\PROMS_2010\vehlp\ro\ro.fst";//@"G:\promsdat\vehlp\ro\ro.fst";//@"G:\VEHLP\RO\RO.FST";
//string _PathToROs = @"G:\debugdat\vebyron\RO\ro.fst";//@"G:\VEHLP\RO\RO.FST";
DocVersionInfo _SelectedDVI = null;
StepTabPanel _SelectedStepTabPanel=null;
public StepTabPanel SelectedStepTabPanel
{
get
{
return _SelectedStepTabPanel;
}
set
{
_SelectedStepTabPanel = value;
if (value == null) // DSO Tab Panel
SelectedDVI = (DocVersionInfo)tc.SelectedDisplayTabItem.MyItemInfo.MyActiveParent.ActiveParent;
else // Step Tab Panel
SelectedDVI = (DocVersionInfo)value.MyStepPanel.MyProcedureItemInfo.MyProcedure.MyActiveParent;
}
}
public DocVersionInfo SelectedDVI
{
get { return _SelectedDVI; }
set
{
if (_SelectedDVI != value)
{
_SelectedDVI = value;
_SelectedROFst = null;
}
}
}
// TODO: Should the following be an info
// For the initial release, we are assuming there will be only one rofst fro a docversion. Changes
// will be needed here if more than 1.
private ROFstInfo _SelectedROFst;
public ROFstInfo SelectedROFst
{
get
{
if(_SelectedROFst == null)
_SelectedROFst = SelectedDVI.DocVersionAssociations[0].MyROFst;
return _SelectedROFst;
}
set { _SelectedROFst = value; }
}
public frmVEPROMS()
{
InitializeComponent();
// TEMPORARY - FOR INSTALL OF DEMO ON MACHINE OTHER THAN AT VOLIAN
// TODO: REMOVE ONCE RO.FST INFO IS PLACE IN SQL DATABASE
if (!System.IO.File.Exists(_PathToROs))
_PathToROs = @"C:\proms2010\vehlp\ro\ro.fst";
// set the color of the ribbon
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable((eOffice2007ColorScheme)Settings.Default.SystemColor);
@@ -624,8 +660,7 @@ namespace VEPROMS
/// <param name="e"></param>
private void btnSetBookMrk_Click(object sender, EventArgs e)
{
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
_MyBookMarks.Add(dtp.SelectedStepItem.MyItemInfo);
_MyBookMarks.Add(SelectedStepTabPanel.SelectedStepItem.MyItemInfo);
RefreshBookMarkData();
}
private void lbxBookMarks_Click(object sender, EventArgs e)
@@ -802,18 +837,12 @@ namespace VEPROMS
{
infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabRO;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
//DocVersionInfo dvi = (DocVersionInfo)dtp.MyStepPanel.MyProcedureItemInfo.MyProcedure.MyActiveParent;
DocVersionInfo dvi;
if (dtp == null)
dvi = (DocVersionInfo)tc.SelectedDisplayTabItem.MyItemInfo.MyActiveParent.ActiveParent;
else
dvi = (DocVersionInfo)dtp.MyStepPanel.MyProcedureItemInfo.MyProcedure.MyActiveParent;
//if (dtp == null) return;
ROFST rofst = new ROFST(_PathToROs, dvi); //"g:\\vehlp\\ro\\ro.fst");
displayRO.MyROFST = rofst;
displayRO.MyRTB = (dtp == null) ? null : dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
displayRO.Mydvi = dvi;
displayRO.Mydvi = SelectedDVI;
displayRO.MyROFST = SelectedROFst;
displayRO.MyRTB = (SelectedStepTabPanel == null) ? null : SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
displayRO.ProgressBar = bottomProgBar;
}
#endregion
@@ -821,9 +850,8 @@ namespace VEPROMS
private void infotabTransition_Click(object sender, EventArgs e)
{
if (tc == null || tc.SelectedDisplayTabItem == null) return;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return;
displayTransition.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
if (SelectedStepTabPanel == null) return;
displayTransition.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
displayTransition.CurTrans = null;
}
private void btnInsTrans_Click(object sender, EventArgs e)
@@ -831,8 +859,8 @@ namespace VEPROMS
infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabTransition;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return;
displayTransition.MyRTB = (dtp == null) ? null : dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
if (SelectedStepTabPanel == null) return;
displayTransition.MyRTB = (SelectedStepTabPanel == null) ? null : dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
displayTransition.CurTrans = null;
}
#endregion
@@ -851,8 +879,7 @@ namespace VEPROMS
{
infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabTags;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
displayTags.MyRTB = (dtp == null) ? null : dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
displayTags.MyRTB = (SelectedStepTabPanel == null) ? null : SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
}
#endregion
private ItemInfo _CurrentItem = null;
@@ -864,6 +891,7 @@ namespace VEPROMS
ctrlAnnotationDetails.CurrentAnnotation = null;
ctrlAnnotationDetails.Annotations = null;
infotabRO.Visible = infotabTransition.Visible = infotabTags.Visible = false;
SelectedStepTabPanel = null;
}
else
{
@@ -888,6 +916,7 @@ namespace VEPROMS
displayTags.MyRTB = args.MyStepItem.MyStepRTB;
displayRO.ProgressBar = bottomProgBar;
}
SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
}
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem);
AnnotationPanelView();
@@ -935,43 +964,24 @@ namespace VEPROMS
displayTransition.CurTrans = null;
}
// This doesn't seem to be used...
//
//private void tc_LinkInsertRO(object sender, StepPanelLinkEventArgs args)
//{
// infoPanel.Expanded = true;
// infoTabs.SelectedTab = infotabRO;
// ROFST rofst = new ROFST(_PathToROs, _LastDocVersionInfo); //"g:\\vehlp\\ro\\ro.fst");
// displayRO.MyROFST = rofst;
// StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
// if (dtp == null) return;
// displayRO.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
// displayRO.CurROLink = null;
// //displayRO.Mydvi = dvi;
//}
private void tc_LinkModifyTran(object sender, StepPanelLinkEventArgs args)
{
infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabTransition;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return;
displayTransition.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
if (SelectedStepTabPanel == null) return;
displayTransition.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
displayTransition.CurTrans = args.MyLinkText.MyTransitionInfo;
}
private void tc_LinkModifyRO(object sender, StepPanelLinkEventArgs args)
{
infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabRO;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
DocVersionInfo dvi = (DocVersionInfo)dtp.MyStepPanel.MyProcedureItemInfo.MyProcedure.MyActiveParent;
if (dtp == null) return;
ROFST rofst = new ROFST(_PathToROs, dvi); //_LastDocVersionInfo); //"g:\\vehlp\\ro\\ro.fst");
displayRO.MyROFST = rofst;
displayRO.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
if (SelectedStepTabPanel == null) return;
displayRO.MyROFST = SelectedROFst;
displayRO.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
displayRO.CurROLink = args.MyLinkText.RoUsageid; // TODO: this is wrong - use for now.
displayRO.Mydvi = dvi;
displayRO.Mydvi = SelectedDVI;
displayRO.ProgressBar = bottomProgBar;
displayRO.CurROLink = args.MyLinkText.RoUsageid; // this is wrong - use for now.
}
@@ -1155,8 +1165,7 @@ namespace VEPROMS
private void infoPanel_Click(object sender, EventArgs e)
{
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
displayTags.MyRTB = (dtp == null) ? null : dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
displayTags.MyRTB = (SelectedStepTabPanel == null) ? null : SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
}
}
}