This commit is contained in:
@@ -28,6 +28,7 @@ namespace VEPROMS
|
||||
#region Log4Net
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
#region PropertiesVariables
|
||||
Color _CommentTitleBckColor;
|
||||
DocVersionInfo _SelectedDVI = null;
|
||||
StepTabPanel _SelectedStepTabPanel=null;
|
||||
@@ -78,7 +79,7 @@ namespace VEPROMS
|
||||
}
|
||||
set { _SelectedROFst = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
public frmVEPROMS()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -431,54 +432,6 @@ namespace VEPROMS
|
||||
// // newtable.Show();
|
||||
// //}
|
||||
//}
|
||||
#endregion
|
||||
#region Bottom Button Modes
|
||||
|
||||
/// <summary>
|
||||
/// Insert button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnInsertMode_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnInsOvr.Text = btnInsertMode.Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overwrite button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnOverstrikeMode_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnInsOvr.Text = btnOverstrikeMode.Text;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Multi User
|
||||
|
||||
/// <summary>
|
||||
/// Set Lock button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSetLock_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnLckUlck.Image = btnSetLock.Image;
|
||||
btnLckUlck.Text = "Locked";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Release Lock button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnReleaseLck_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnLckUlck.Image = btnReleaseLck.Image;
|
||||
btnLckUlck.Text = "Unlocked";
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Progress Bar
|
||||
|
||||
@@ -549,63 +502,6 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Views: Procedure Background Deviation
|
||||
/// <summary>
|
||||
/// Procedure Step View button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnViewPrcStp_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnViewTypes.Text = btnViewPrcStp.Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Background Text View button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnViewBckgnd_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnViewTypes.Text = btnViewBckgnd.Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deviation Text View button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnViewDev_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnViewTypes.Text = btnViewDev.Text;
|
||||
}
|
||||
#endregion
|
||||
#region Bookmarks
|
||||
|
||||
/// <summary>
|
||||
/// Mark Position button on bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnBookMark_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (SelectedStepTabPanel == null||SelectedStepTabPanel.MyStepPanel==null||SelectedStepTabPanel.MyStepPanel.SelectedStepItem==null) return;
|
||||
displayBookMarks.AddBookMark(SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB.MyItemInfo);
|
||||
if (toolsPanel.Expanded == false) toolsPanel.Expanded = true;
|
||||
toolsTabs.SelectedTab = toolsTabBookMarks;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the given tree node to the list of bookmarks
|
||||
/// TODO: Add a menu item to tree view context menu for adding to book mark list.
|
||||
/// </summary>
|
||||
/// <param name="bkmrk"></param>
|
||||
//private void AddToBookMarkList(VETreeNode bkmrk)
|
||||
//{
|
||||
// if (!(lbxBookMarks.Items.Contains(bkmrk)))
|
||||
// lbxBookMarks.Items.Add(bkmrk);
|
||||
//}
|
||||
#endregion
|
||||
#region Find/Replace and Search
|
||||
|
||||
@@ -615,11 +511,11 @@ namespace VEPROMS
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnFindRplDlg_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
FindReplace frmFindRepl = new FindReplace();
|
||||
frmFindRepl.Show();
|
||||
}
|
||||
//private void btnFindRplDlg_Click_1(object sender, EventArgs e)
|
||||
//{
|
||||
// FindReplace frmFindRepl = new FindReplace();
|
||||
// frmFindRepl.Show();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Global Search button on the ribbon
|
||||
@@ -627,11 +523,11 @@ namespace VEPROMS
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnGlbSrch_Click(object sender, EventArgs e)
|
||||
{
|
||||
toolsPanel.Expanded = true;
|
||||
toolsTabs.SelectedTab = toolstabResults;
|
||||
}
|
||||
//private void btnGlbSrch_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// toolsPanel.Expanded = true;
|
||||
// toolsTabs.SelectedTab = toolstabResults;
|
||||
//}
|
||||
|
||||
#endregion
|
||||
#region Similar Steps
|
||||
@@ -727,24 +623,7 @@ namespace VEPROMS
|
||||
// All other types are handled with sub-menus.
|
||||
|
||||
}
|
||||
// TODO: DeleteMe
|
||||
//private void OpenNode(VETreeNode tn)
|
||||
//{
|
||||
// if (tn != null)
|
||||
// {
|
||||
// if (tn.VEObject.GetType() == typeof(FolderInfo) || tn.VEObject.GetType() == typeof(DocVersionInfo))
|
||||
// {
|
||||
// if (tn.Nodes.Count > 0)
|
||||
// {
|
||||
// tn.Expand();
|
||||
// tv.SelectedNode = tn.Nodes[0];
|
||||
// tv.Focus();
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// SetupNodes(tn);
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Options button on the dialog that appears when the V icon is clicked (top left of application window)
|
||||
/// note that the "V icon" is also called the Office 2007 Start Button
|
||||
@@ -757,7 +636,6 @@ namespace VEPROMS
|
||||
VeSysOpts.ShowDialog();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exit button on the dialog that appears when the V icon is clicked (top left of application window)
|
||||
/// note that the "V icon" is also called the Office 2007 Start Button
|
||||
@@ -792,15 +670,6 @@ namespace VEPROMS
|
||||
displayTransition.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
|
||||
displayTransition.CurTrans = null;
|
||||
}
|
||||
private void btnInsTrans_Click(object sender, EventArgs e)
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
infoTabs.SelectedTab = infotabTransition;
|
||||
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
|
||||
if (SelectedStepTabPanel == null) return;
|
||||
displayTransition.MyRTB = (SelectedStepTabPanel == null) ? null : dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
|
||||
displayTransition.CurTrans = null;
|
||||
}
|
||||
#endregion
|
||||
#region InfoTabLibDocs
|
||||
private void tabItemLibDocs_Click(object sender, EventArgs e)
|
||||
@@ -828,6 +697,36 @@ namespace VEPROMS
|
||||
displayTags.MyRTB = (SelectedStepTabPanel == null) ? null : SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
|
||||
}
|
||||
#endregion
|
||||
#region PanelSupport
|
||||
private void tc_PanelTabDisplay(object sender, StepPanelTabDisplayEventArgs args)
|
||||
{
|
||||
if (args.PanelTabName == "Bookmarks")
|
||||
{
|
||||
toolsPanel.Expanded = true;
|
||||
toolsTabs.SelectedTab = toolsTabBookMarks;
|
||||
if (_CurrentItem != null) displayBookMarks.AddBookMark(_CurrentItem);
|
||||
}
|
||||
else if (args.PanelTabName == "Global Search")
|
||||
{
|
||||
toolsPanel.Expanded = true;
|
||||
toolsTabs.SelectedTab = toolstabResults;
|
||||
}
|
||||
else if (args.PanelTabName == "LibDocs")
|
||||
{
|
||||
toolsPanel.Expanded = true;
|
||||
toolsTabs.SelectedTab = tabItemLibDocs;
|
||||
}
|
||||
else if (args.PanelTabName == "Annots")
|
||||
{
|
||||
epAnnotations.Expanded = true;
|
||||
}
|
||||
else if (args.PanelTabName == "Change Step Type")
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
infoTabs.SelectedTab = infotabTags;
|
||||
displayTags.HighlightChangeStep();
|
||||
}
|
||||
}
|
||||
private void tc_StepPanelModeChange(object sender, StepRTBModeChangeEventArgs args)
|
||||
{
|
||||
this.lblEditView.Text = args.ViewMode == E_ViewMode.Edit ? "Edit" : "View";
|
||||
@@ -846,7 +745,6 @@ namespace VEPROMS
|
||||
// When infotabTags is set to InVisible, the matching panel also needs to be set to invisible
|
||||
infotabControlPanelTags.Visible = false;
|
||||
SelectedStepTabPanel = null;
|
||||
btnGetRoVals.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -855,13 +753,11 @@ namespace VEPROMS
|
||||
//vlnStackTrace.ShowStack("enter tc_ItemSelectedChanged {0}", _CurrentItem);
|
||||
if (args.MyStepItem == null)
|
||||
{
|
||||
//infotabRO.Visible = infotabTransition.Visible = false;
|
||||
infotabTransition.Visible = false;
|
||||
infotabRO.Visible = true;
|
||||
displayRO.MyRTB = null;
|
||||
infotabTags.Visible = true;
|
||||
displayBookMarks.MyRTB = null;
|
||||
btnGetRoVals.Enabled = false;
|
||||
//vlnStackTrace.ShowStack("enter tc_ItemSelectedChanged {0}", _CurrentItem);
|
||||
}
|
||||
else
|
||||
@@ -886,7 +782,6 @@ namespace VEPROMS
|
||||
displayBookMarks.MyRTB = args.MyStepItem.MyStepRTB;
|
||||
displayRO.ProgressBar = bottomProgBar;
|
||||
lblEditView.Text = args.MyStepItem.MyStepRTB.ViewRTB ? "View" : "Edit";
|
||||
btnGetRoVals.Enabled = true;
|
||||
}
|
||||
if(tc.SelectedDisplayTabItem != null)
|
||||
SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
|
||||
@@ -894,7 +789,7 @@ namespace VEPROMS
|
||||
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem);
|
||||
AnnotationPanelView();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Annotations
|
||||
/// <summary>
|
||||
/// Display or hide the Annotation Details panel
|
||||
@@ -917,9 +812,6 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
#region LinkSupport
|
||||
private void tc_LinkActiveChanged(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
@@ -930,13 +822,6 @@ namespace VEPROMS
|
||||
displayTransition.CurTrans = null;
|
||||
}
|
||||
}
|
||||
private void tc_LinkInsertTran(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
infoTabs.SelectedTab = infotabTransition;
|
||||
displayTransition.CurTrans = null;
|
||||
}
|
||||
|
||||
private void tc_LinkModifyTran(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
@@ -959,7 +844,7 @@ namespace VEPROMS
|
||||
displayRO.TabControl = tc;
|
||||
}
|
||||
#endregion
|
||||
#region VButton_New
|
||||
#region VButton
|
||||
private void office2007StartButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
// If the V-Button is clicked, check to see what tree node is s selected
|
||||
@@ -1134,8 +1019,11 @@ namespace VEPROMS
|
||||
{
|
||||
tv.tv_NodeNew(vlnTreeView.MenuSelections.Folder);
|
||||
}
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PanelEvents
|
||||
private void infoPanel_Click(object sender, EventArgs e)
|
||||
{
|
||||
displayTags.MyRTB = (SelectedStepTabPanel == null) ? null : SelectedStepTabPanel.MyStepPanel.SelectedStepItem.MyStepRTB;
|
||||
@@ -1149,23 +1037,22 @@ namespace VEPROMS
|
||||
{
|
||||
toolsPanel.Expanded = true;
|
||||
InitiateSearch(true);
|
||||
}
|
||||
|
||||
private void InitiateSearch(bool searchFocus)
|
||||
{
|
||||
if (toolsPanel.Expanded)
|
||||
}
|
||||
private void InitiateSearch(bool searchFocus)
|
||||
{
|
||||
if (toolsPanel.Expanded)
|
||||
{
|
||||
if (displaySearch1.Mydocversion == null)//!displaySearch1.OpenDocFromSearch)
|
||||
{
|
||||
if (SelectedDVI != null)
|
||||
{
|
||||
if (displaySearch1.Mydocversion == null)//!displaySearch1.OpenDocFromSearch)
|
||||
{
|
||||
if (SelectedDVI != null)
|
||||
{
|
||||
displaySearch1.Mydocversion = SelectedDVI;
|
||||
displaySearch1.advTreeStepTypesFillIn();
|
||||
}
|
||||
displaySearch1.advTreeProcSetsFillIn(searchFocus);
|
||||
}
|
||||
displaySearch1.Mydocversion = SelectedDVI;
|
||||
displaySearch1.advTreeStepTypesFillIn();
|
||||
}
|
||||
}
|
||||
displaySearch1.advTreeProcSetsFillIn(searchFocus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void toolsPanel_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
@@ -1184,64 +1071,10 @@ namespace VEPROMS
|
||||
frmPropGrid pg = new frmPropGrid(tc.SelectedDisplayTabItem.SelectedItemInfo, tc.SelectedDisplayTabItem.SelectedItemInfo.Path);
|
||||
pg.Show();
|
||||
}
|
||||
|
||||
private void btnGetRoVals_Click(object sender, EventArgs e)
|
||||
private void expandablePanel2_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
if (_CurrentItem == null)
|
||||
{
|
||||
MessageBox.Show("A step item is not selected, cannot update the RO Values.");
|
||||
return;
|
||||
}
|
||||
ItemInfo pi = _CurrentItem.MyProcedure as ItemInfo;
|
||||
if (pi == null)
|
||||
{
|
||||
MessageBox.Show("Cannot find the procedure that this step item is assocaited with, cannot update the RO Values.");
|
||||
return;
|
||||
}
|
||||
DocVersionInfo mydocversion = pi.ActiveParent as DocVersionInfo;
|
||||
if (mydocversion == null)
|
||||
{
|
||||
MessageBox.Show("Cannot find document version for this selection, cannot update the RO Values.");
|
||||
return;
|
||||
}
|
||||
|
||||
// use rodb directory path of the first rofst for the this document version. Bring up a file
|
||||
// selection dialog starting with this path. The user can select another path.
|
||||
// RHM question - we talked about just using the current path, but what is the current path when
|
||||
// a docversion can have more than one rofst (for now, just use first?) - should I bring up a dialog?
|
||||
if (mydocversion.DocVersionAssociations.Count < 1)
|
||||
{
|
||||
MessageBox.Show("Error Updating ro.fst. No associated ro.fst");
|
||||
return;
|
||||
}
|
||||
using (DocVersion dv = DocVersion.Get(mydocversion.VersionID))
|
||||
{
|
||||
foreach (DocVersionAssociation dva in dv.DocVersionAssociations)
|
||||
{
|
||||
RODbInfo rdi = RODbInfo.Get(dva.ROFst_RODbID);
|
||||
|
||||
string rofstPath = rdi.FolderPath + @"\ro.fst";
|
||||
if (!File.Exists(rofstPath))
|
||||
{
|
||||
MessageBox.Show("No existing ro.fst in path " + rdi.FolderPath + ". Check for invalid path");
|
||||
break;
|
||||
}
|
||||
FileInfo fiRofst = new FileInfo(rofstPath);
|
||||
if (SelectedROFst.DTS == fiRofst.LastWriteTime)
|
||||
{
|
||||
MessageBox.Show("ro.fst files are same for path " + rdi.FolderPath + ", import of that ro.fst will not be done");
|
||||
break;
|
||||
}
|
||||
if (SelectedROFst.DTS > fiRofst.LastWriteTime)
|
||||
{
|
||||
MessageBox.Show("Cannot copy older ro.fst from " + rdi.FolderPath + ", import of that ro.fst will not be done");
|
||||
break;
|
||||
}
|
||||
Cursor = Cursors.WaitCursor;
|
||||
ROFst newrofst = ROFstInfo.UpdateRoFst(rdi, dva, dv, SelectedROFst);
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
expandableSplitter1.Enabled = expandablePanel2.Expanded;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user