Added code to support conversion to text of invalid referenced objects
Added code to support the searching for transitions Added code to support refreshing of referenced objects and transitions Added interface code to support refreshing of referenced objects and transitions Added code to store the xml representation of the approved version of the procedure in the database for future support of temp mods, etc.
This commit is contained in:
parent
34bfdba7b2
commit
4e1eff4c4f
@ -601,6 +601,7 @@ namespace Volian.Controls.Library
|
||||
myVFG.Clear();
|
||||
MyEditItem.SetAllTabs();
|
||||
MyItemInfo.UpdateTransitionText();
|
||||
MyItemInfo.UpdateROText();
|
||||
}
|
||||
}
|
||||
if (tn.Tag is ItemAuditInfo)
|
||||
@ -707,6 +708,7 @@ namespace Volian.Controls.Library
|
||||
break;
|
||||
}
|
||||
ii.UpdateTransitionText();
|
||||
ii.UpdateROText();
|
||||
}
|
||||
if(MyEditItem.MyPreviousEditItem != null)
|
||||
MyEditItem.MyPreviousEditItem.SetAllTabs();
|
||||
|
190
PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs
generated
190
PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs
generated
@ -63,10 +63,12 @@ namespace Volian.Controls.Library
|
||||
this.cbxSrchTypeUsage = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.tabStepTypeSearch = new DevComponents.DotNetBar.TabItem(this.components);
|
||||
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
|
||||
this.tabControlPanel5 = new DevComponents.DotNetBar.TabControlPanel();
|
||||
this.gpFindROs = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
this.cbxFndUnLnkROVals = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.cmboTreeROs = new DevComponents.DotNetBar.Controls.ComboTree();
|
||||
this.tabROSearch = new DevComponents.DotNetBar.TabItem(this.components);
|
||||
this.tabTranSearch = new DevComponents.DotNetBar.TabItem(this.components);
|
||||
this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel();
|
||||
this.gpSrchAnnoText = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
@ -107,6 +109,10 @@ namespace Volian.Controls.Library
|
||||
this.panSearchButtons = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnClearSearchResults = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnCopySearchResults = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnSaveSearchResults = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnLoadSearchResults = new DevComponents.DotNetBar.ButtonX();
|
||||
this.sfdSearchResults = new System.Windows.Forms.SaveFileDialog();
|
||||
this.ofdSearchResults = new System.Windows.Forms.OpenFileDialog();
|
||||
this.labelX1 = new DevComponents.DotNetBar.LabelX();
|
||||
this.cmbResultsStyle = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.comboItem1 = new DevComponents.Editors.ComboItem();
|
||||
@ -120,6 +126,15 @@ namespace Volian.Controls.Library
|
||||
this.xpStepTypes = new DevComponents.DotNetBar.ExpandablePanel();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||
this.lblTranVersion = new System.Windows.Forms.Label();
|
||||
this.cbxTranVersion = new System.Windows.Forms.ComboBox();
|
||||
this.pnlTranVersion = new System.Windows.Forms.Panel();
|
||||
this.lblTranFormat = new System.Windows.Forms.Label();
|
||||
this.cbxTranFormat = new System.Windows.Forms.ComboBox();
|
||||
this.pnlTranFormat = new System.Windows.Forms.Panel();
|
||||
this.lblTranCategory = new System.Windows.Forms.Label();
|
||||
this.cbxTranCategory = new System.Windows.Forms.ComboBox();
|
||||
this.pnlTranCategory = new System.Windows.Forms.Panel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tabSearchTypes)).BeginInit();
|
||||
this.tabSearchTypes.SuspendLayout();
|
||||
this.tabControlPanel4.SuspendLayout();
|
||||
@ -127,6 +142,7 @@ namespace Volian.Controls.Library
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.tabControlPanel2.SuspendLayout();
|
||||
this.tabControlPanel5.SuspendLayout();
|
||||
this.gpFindROs.SuspendLayout();
|
||||
this.tabControlPanel3.SuspendLayout();
|
||||
this.gpSrchAnnoText.SuspendLayout();
|
||||
@ -147,6 +163,7 @@ namespace Volian.Controls.Library
|
||||
this.tabSearchTypes.CloseButtonPosition = DevComponents.DotNetBar.eTabCloseButtonPosition.Right;
|
||||
this.tabSearchTypes.Controls.Add(this.tabControlPanel4);
|
||||
this.tabSearchTypes.Controls.Add(this.tabControlPanel2);
|
||||
this.tabSearchTypes.Controls.Add(this.tabControlPanel5);
|
||||
this.tabSearchTypes.Controls.Add(this.tabControlPanel3);
|
||||
this.tabSearchTypes.Controls.Add(this.contextMenuBar1);
|
||||
this.tabSearchTypes.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
@ -164,6 +181,7 @@ namespace Volian.Controls.Library
|
||||
this.tabSearchTypes.Tabs.Add(this.tabStepTypeSearch);
|
||||
this.tabSearchTypes.Tabs.Add(this.tabAnnotationSearch);
|
||||
this.tabSearchTypes.Tabs.Add(this.tabROSearch);
|
||||
this.tabSearchTypes.Tabs.Add(this.tabTranSearch);
|
||||
this.tabSearchTypes.Text = "tabControl1";
|
||||
this.tabSearchTypes.ThemeAware = true;
|
||||
//
|
||||
@ -409,6 +427,29 @@ namespace Volian.Controls.Library
|
||||
this.tabControlPanel2.TabIndex = 2;
|
||||
this.tabControlPanel2.TabItem = this.tabROSearch;
|
||||
//
|
||||
// tabControlPanel5
|
||||
//
|
||||
this.tabControlPanel5.Controls.Add(this.pnlTranVersion);
|
||||
this.pnlTranVersion.BringToFront();
|
||||
this.tabControlPanel5.Controls.Add(this.pnlTranFormat);
|
||||
this.pnlTranFormat.BringToFront();
|
||||
this.tabControlPanel5.Controls.Add(this.pnlTranCategory);
|
||||
this.pnlTranCategory.BringToFront();
|
||||
this.tabControlPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControlPanel5.Location = new System.Drawing.Point(0, 24);
|
||||
this.tabControlPanel5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.tabControlPanel5.Name = "tabControlPanel5";
|
||||
this.tabControlPanel5.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.tabControlPanel5.Size = new System.Drawing.Size(369, 114);
|
||||
this.tabControlPanel5.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
|
||||
this.tabControlPanel5.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
|
||||
this.tabControlPanel5.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.tabControlPanel5.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
|
||||
this.tabControlPanel5.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
|
||||
| DevComponents.DotNetBar.eBorderSide.Bottom)));
|
||||
this.tabControlPanel5.Style.GradientAngle = 90;
|
||||
this.tabControlPanel5.TabItem = this.tabTranSearch;
|
||||
//
|
||||
// gpFindROs
|
||||
//
|
||||
this.gpFindROs.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
@ -496,6 +537,12 @@ namespace Volian.Controls.Library
|
||||
this.tabROSearch.Name = "tabROSearch";
|
||||
this.tabROSearch.Text = "Referenced Objects";
|
||||
//
|
||||
//// tabTranSearch
|
||||
//
|
||||
this.tabTranSearch.AttachedControl = this.tabControlPanel5;
|
||||
this.tabTranSearch.Name = "tabTranSearch";
|
||||
this.tabTranSearch.Text = "Transitions";
|
||||
//
|
||||
// tabControlPanel3
|
||||
//
|
||||
this.tabControlPanel3.Controls.Add(this.gpSrchAnnoText);
|
||||
@ -641,6 +688,77 @@ namespace Volian.Controls.Library
|
||||
this.label2.Size = new System.Drawing.Size(39, 23);
|
||||
this.label2.TabIndex = 7;
|
||||
this.label2.Text = "Find:";
|
||||
#region transsearchstuff
|
||||
//
|
||||
//lblTranVersion
|
||||
//
|
||||
this.lblTranVersion.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.lblTranVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblTranVersion.Text = "Formats";
|
||||
this.lblTranVersion.Width = 100;
|
||||
//
|
||||
//cbxTranVersion
|
||||
//
|
||||
this.cbxTranVersion.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cbxTranVersion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbxTranVersion.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
//
|
||||
//pnlTranVersion
|
||||
//
|
||||
this.pnlTranVersion.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pnlTranVersion.Height = 30;
|
||||
this.pnlTranVersion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pnlTranVersion.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.pnlTranVersion.Controls.Add(this.lblTranVersion);
|
||||
this.pnlTranVersion.Controls.Add(this.cbxTranVersion);
|
||||
this.cbxTranVersion.BringToFront();
|
||||
//
|
||||
//lblTranFormat
|
||||
//
|
||||
this.lblTranFormat.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.lblTranFormat.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblTranFormat.Text = "Select Format";
|
||||
this.lblTranFormat.Width = 100;
|
||||
//
|
||||
//cbxTranFormat
|
||||
//
|
||||
this.cbxTranFormat.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cbxTranFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbxTranFormat.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
//
|
||||
//pnlTranFormat
|
||||
//
|
||||
this.pnlTranFormat.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pnlTranFormat.Height = 30;
|
||||
this.pnlTranFormat.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pnlTranFormat.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.pnlTranFormat.Controls.Add(this.lblTranFormat);
|
||||
this.pnlTranFormat.Controls.Add(this.cbxTranFormat);
|
||||
this.cbxTranFormat.BringToFront();
|
||||
//
|
||||
//lblTranCategory
|
||||
//
|
||||
this.lblTranCategory.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.lblTranCategory.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblTranCategory.Text = "Select Category";
|
||||
this.lblTranCategory.Width = 110;
|
||||
//
|
||||
//cbxTranCategory
|
||||
//
|
||||
this.cbxTranCategory.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cbxTranCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbxTranCategory.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
//
|
||||
//pnlTranCategory
|
||||
//
|
||||
this.pnlTranCategory.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pnlTranCategory.Height = 30;
|
||||
this.pnlTranCategory.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pnlTranCategory.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.pnlTranCategory.Controls.Add(this.lblTranCategory);
|
||||
this.pnlTranCategory.Controls.Add(this.cbxTranCategory);
|
||||
this.cbxTranCategory.BringToFront();
|
||||
#endregion
|
||||
//
|
||||
// cbxAnnoTypes
|
||||
//
|
||||
@ -982,6 +1100,8 @@ namespace Volian.Controls.Library
|
||||
this.panSearchButtons.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.panSearchButtons.Controls.Add(this.btnClearSearchResults);
|
||||
this.panSearchButtons.Controls.Add(this.btnCopySearchResults);
|
||||
this.panSearchButtons.Controls.Add(this.btnSaveSearchResults);
|
||||
this.panSearchButtons.Controls.Add(this.btnLoadSearchResults);
|
||||
this.panSearchButtons.Controls.Add(this.labelX1);
|
||||
this.panSearchButtons.Controls.Add(this.cmbResultsStyle);
|
||||
this.panSearchButtons.Controls.Add(this.cbSorted);
|
||||
@ -1040,6 +1160,51 @@ namespace Volian.Controls.Library
|
||||
this.btnCopySearchResults.ThemeAware = true;
|
||||
this.btnCopySearchResults.Click += new System.EventHandler(this.btnCopySearchResults_Click);
|
||||
//
|
||||
// btnSaveSearchResults
|
||||
//
|
||||
this.btnSaveSearchResults.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnSaveSearchResults.ColorTable = DevComponents.DotNetBar.eButtonColor.Office2007WithBackground;
|
||||
this.btnSaveSearchResults.Enabled = false;
|
||||
this.btnSaveSearchResults.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnSaveSearchResults.Location = new System.Drawing.Point(290, 36);
|
||||
this.btnSaveSearchResults.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnSaveSearchResults.Name = "btnSaveSearchResults";
|
||||
this.btnSaveSearchResults.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.btnSaveSearchResults.Size = new System.Drawing.Size(57, 28);
|
||||
this.superTooltip1.SetSuperTooltip(this.btnSaveSearchResults, new DevComponents.DotNetBar.SuperTooltipInfo("Save Search Results", "", "This button saves the Search Results listed below into a named file in xml, csv, tab or basic format.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.btnSaveSearchResults.TabIndex = 10;
|
||||
this.btnSaveSearchResults.Text = "Save";
|
||||
this.btnSaveSearchResults.ThemeAware = true;
|
||||
this.btnSaveSearchResults.Click += new System.EventHandler(btnSaveSearchResults_Click);
|
||||
//
|
||||
// btnLoadSearchResults
|
||||
//
|
||||
this.btnLoadSearchResults.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnLoadSearchResults.ColorTable = DevComponents.DotNetBar.eButtonColor.Office2007WithBackground;
|
||||
this.btnLoadSearchResults.Enabled = true;
|
||||
this.btnLoadSearchResults.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnLoadSearchResults.Location = new System.Drawing.Point(354, 36);
|
||||
this.btnLoadSearchResults.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnLoadSearchResults.Name = "btnLoadSearchResults";
|
||||
this.btnLoadSearchResults.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.btnLoadSearchResults.Size = new System.Drawing.Size(57, 28);
|
||||
this.superTooltip1.SetSuperTooltip(this.btnLoadSearchResults, new DevComponents.DotNetBar.SuperTooltipInfo("Save Search Results", "", "This button loads saved Search Results from a named file in xml, csv, tab or basic format.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.btnLoadSearchResults.TabIndex = 10;
|
||||
this.btnLoadSearchResults.Text = "Load";
|
||||
this.btnLoadSearchResults.ThemeAware = true;
|
||||
this.btnLoadSearchResults.Click += new System.EventHandler(btnLoadSearchResults_Click);
|
||||
//
|
||||
//sfdSearchResults
|
||||
//
|
||||
sfdSearchResults.AddExtension = true;
|
||||
sfdSearchResults.InitialDirectory = System.Environment.SpecialFolder.MyDocuments + @"\VEPROMS";
|
||||
sfdSearchResults.Filter = "XML File (*.xml)|*.xml|Comma Separated Values (*.csv)|*.csv|Tab Separated Values (*.tsv)|*.tsv|Basic Style Format (*.bsf)|*.bsf";
|
||||
//
|
||||
//ofdSearchResults
|
||||
//
|
||||
ofdSearchResults.InitialDirectory = System.Environment.SpecialFolder.MyDocuments + @"\VEPROMS";
|
||||
ofdSearchResults.Filter = "XML File (*.xml)|*.xml|Comma Separated Values (*.csv)|*.csv|Tab Separated Values (*.tsv)|*.tsv|Basic Style Format (*.bsf)|*.bsf";
|
||||
//
|
||||
// labelX1
|
||||
//
|
||||
this.labelX1.AutoSize = true;
|
||||
@ -1111,7 +1276,7 @@ namespace Volian.Controls.Library
|
||||
this.cbSorted.Size = new System.Drawing.Size(93, 17);
|
||||
this.superTooltip1.SetSuperTooltip(this.cbSorted, new DevComponents.DotNetBar.SuperTooltipInfo("Sort Results", "", "Sorts results that are output into the Search Results list shown below.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.cbSorted.TabIndex = 7;
|
||||
this.cbSorted.Text = "Sort Results";
|
||||
this.cbSorted.Text = "Sort";
|
||||
this.cbSorted.CheckedChanged += new System.EventHandler(this.cbSorted_CheckedChanged);
|
||||
//
|
||||
// btnSearch
|
||||
@ -1239,6 +1404,7 @@ namespace Volian.Controls.Library
|
||||
this.panel1.PerformLayout();
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.tabControlPanel2.ResumeLayout(false);
|
||||
this.tabControlPanel5.ResumeLayout(false);
|
||||
this.gpFindROs.ResumeLayout(false);
|
||||
this.tabControlPanel3.ResumeLayout(false);
|
||||
this.tabControlPanel3.PerformLayout();
|
||||
@ -1261,7 +1427,9 @@ namespace Volian.Controls.Library
|
||||
|
||||
private DevComponents.DotNetBar.TabControl tabSearchTypes;
|
||||
private DevComponents.DotNetBar.TabControlPanel tabControlPanel2;
|
||||
private DevComponents.DotNetBar.TabItem tabROSearch;
|
||||
private DevComponents.DotNetBar.TabControlPanel tabControlPanel5;
|
||||
private DevComponents.DotNetBar.TabItem tabROSearch;
|
||||
private DevComponents.DotNetBar.TabItem tabTranSearch;
|
||||
private DevComponents.AdvTree.AdvTree advTreeProcSets;
|
||||
private DevComponents.AdvTree.Node node1;
|
||||
private DevComponents.AdvTree.NodeConnector nodeConnector1;
|
||||
@ -1330,6 +1498,20 @@ namespace Volian.Controls.Library
|
||||
private DevComponents.DotNetBar.ButtonX btnCopySearchResults;
|
||||
private DevComponents.DotNetBar.ButtonX btnPrnSrchRslts;
|
||||
private DevComponents.DotNetBar.ButtonX btnClearSearchResults;
|
||||
|
||||
}
|
||||
private DevComponents.DotNetBar.ButtonX btnSaveSearchResults;
|
||||
private DevComponents.DotNetBar.ButtonX btnLoadSearchResults;
|
||||
private System.Windows.Forms.SaveFileDialog sfdSearchResults;
|
||||
private System.Windows.Forms.OpenFileDialog ofdSearchResults;
|
||||
//transition search controls
|
||||
private System.Windows.Forms.Panel pnlTranVersion;
|
||||
private System.Windows.Forms.Label lblTranVersion;
|
||||
private System.Windows.Forms.ComboBox cbxTranVersion;
|
||||
private System.Windows.Forms.Panel pnlTranFormat;
|
||||
private System.Windows.Forms.Label lblTranFormat;
|
||||
private System.Windows.Forms.ComboBox cbxTranFormat;
|
||||
private System.Windows.Forms.Panel pnlTranCategory;
|
||||
private System.Windows.Forms.Label lblTranCategory;
|
||||
private System.Windows.Forms.ComboBox cbxTranCategory;
|
||||
//end transition search controls
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +143,81 @@ namespace Volian.Controls.Library
|
||||
rbtnSrchTxt.Checked = true;
|
||||
gpSrchAnnoText.Enabled = true;
|
||||
cmbResultsStyle.Enabled = false;
|
||||
tabSearchTypes.SelectedTabChanged += new TabStrip.SelectedTabChangedEventHandler(tabSearchTypes_SelectedTabChanged);
|
||||
}
|
||||
|
||||
void tabSearchTypes_SelectedTabChanged(object sender, TabStripTabChangedEventArgs e)
|
||||
{
|
||||
if (e.NewTab == tabTranSearch)
|
||||
{
|
||||
//setup transition format versions
|
||||
if (myFormatVersionList == null)
|
||||
{
|
||||
myFormatVersionList = FormatVersionList.GetFormatVersions();
|
||||
cbxTranVersion.DisplayMember = "Title";
|
||||
int lastLastFormatID = 0;
|
||||
foreach (FormatVersion fv in myFormatVersionList)
|
||||
{
|
||||
if (fv.FormatID != lastLastFormatID)
|
||||
{
|
||||
cbxTranVersion.Items.Add(fv);
|
||||
lastLastFormatID = fv.FormatID;
|
||||
}
|
||||
}
|
||||
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
||||
cbxTranFormat.SelectedIndexChanged += new EventHandler(cbxTranFormat_SelectedIndexChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cbxTranFormat_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
#region 1st cut
|
||||
//if (cbxTranFormat.SelectedItem.ToString() == "All")
|
||||
//{
|
||||
// cbxTranCategory.Items.Clear();
|
||||
// cbxTranCategory.Items.Add("All");
|
||||
// cbxTranCategory.Items.Add("Internal");
|
||||
// cbxTranCategory.Items.Add("External");
|
||||
// cbxTranCategory.Items.Add("Outside");
|
||||
// cbxTranCategory.SelectedIndex = 0;
|
||||
//}
|
||||
//else if (cbxTranFormat.SelectedItem.ToString().Contains("{Proc"))
|
||||
//{
|
||||
// cbxTranCategory.Items.Clear();
|
||||
// cbxTranCategory.Items.Add("All");
|
||||
// cbxTranCategory.Items.Add("External");
|
||||
// cbxTranCategory.Items.Add("Outside");
|
||||
// cbxTranCategory.SelectedIndex = 0;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// cbxTranCategory.Items.Clear();
|
||||
// cbxTranCategory.Items.Add("Internal");
|
||||
// cbxTranCategory.SelectedIndex = 0;
|
||||
//}
|
||||
#endregion
|
||||
#region 2nd cut
|
||||
if (cbxTranFormat.SelectedItem.ToString().Contains("{Proc"))
|
||||
{
|
||||
cbxTranCategory.Items.Clear();
|
||||
cbxTranCategory.Items.Add("All");
|
||||
cbxTranCategory.Items.Add("External");
|
||||
cbxTranCategory.Items.Add("Outside");
|
||||
cbxTranCategory.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cbxTranCategory.Items.Clear();
|
||||
cbxTranCategory.Items.Add("All");
|
||||
cbxTranCategory.Items.Add("Internal");
|
||||
cbxTranCategory.Items.Add("External");
|
||||
cbxTranCategory.Items.Add("Outside");
|
||||
cbxTranCategory.SelectedIndex = 0;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
FormatVersionList myFormatVersionList;
|
||||
private void LoadSearchTextListBox()
|
||||
{
|
||||
// Setup SearchText Combo
|
||||
@ -162,6 +236,39 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
|
||||
void cbxTranVersion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string versionList = string.Empty;
|
||||
string sep = string.Empty;
|
||||
FormatVersion sfv = cbxTranVersion.SelectedItem as FormatVersion;
|
||||
foreach (FormatVersion fv in myFormatVersionList)
|
||||
{
|
||||
if (fv.FormatID == sfv.FormatID)
|
||||
{
|
||||
versionList += sep + fv.VersionID;
|
||||
sep = ",";
|
||||
}
|
||||
}
|
||||
cbxTranVersion.Tag = versionList;
|
||||
cbxTranFormatFillIn(versionList);
|
||||
List<DevComponents.AdvTree.Node> uncheckNodes = new List<Node>();
|
||||
foreach (DevComponents.AdvTree.Node n in dicSelectedDocVersionNodes.Keys)
|
||||
{
|
||||
DocVersionInfo dvi = (DocVersionInfo)n.Tag;
|
||||
if (!versionList.Contains(dvi.VersionID.ToString()))
|
||||
uncheckNodes.Add(n);
|
||||
else
|
||||
n.Enabled = true;
|
||||
}
|
||||
while (uncheckNodes.Count > 0)
|
||||
{
|
||||
uncheckNodes[0].Checked = false;
|
||||
uncheckNodes[0].Enabled = false;
|
||||
uncheckNodes.Remove(uncheckNodes[0]);
|
||||
}
|
||||
lstCheckedDocVersions.Clear();
|
||||
}
|
||||
|
||||
private DevComponents.AdvTree.Node NewAdvTreeNode(string nodetext, bool selectable, bool chxbxvisable)
|
||||
{
|
||||
DevComponents.AdvTree.Node newnode;
|
||||
@ -344,7 +451,7 @@ namespace Volian.Controls.Library
|
||||
// }
|
||||
// vlnStackTrace.ShowStackLocal(e.Node.Text,1,10);
|
||||
//}
|
||||
|
||||
private Dictionary<DevComponents.AdvTree.Node, bool> dicSelectedDocVersionNodes = new Dictionary<DevComponents.AdvTree.Node, bool>();
|
||||
void advTreeProcSets_BeforeExpand(object sender, DevComponents.AdvTree.AdvTreeNodeCancelEventArgs e)
|
||||
{
|
||||
DevComponents.AdvTree.Node par = e.Node;
|
||||
@ -387,6 +494,9 @@ namespace Volian.Controls.Library
|
||||
newnode.CheckBoxStyle = eCheckBoxStyle.CheckBox;
|
||||
newnode.CheckBoxThreeState = false;
|
||||
newnode.CheckBoxVisible = true;
|
||||
if (!dicSelectedDocVersionNodes.ContainsKey(newnode)) dicSelectedDocVersionNodes.Add(newnode, false);
|
||||
|
||||
newnode.Enabled = cbxTranVersion.Tag != null ? cbxTranVersion.Tag.ToString().Contains(dv.VersionID.ToString()) : false;
|
||||
par.Nodes.Add(newnode);
|
||||
//}
|
||||
}
|
||||
@ -736,6 +846,7 @@ namespace Volian.Controls.Library
|
||||
btnPrnSrchRslts.Enabled = true;
|
||||
btnClearSearchResults.Enabled = true;
|
||||
btnCopySearchResults.Enabled = true;
|
||||
btnSaveSearchResults.Enabled = true;
|
||||
cmbResultsStyle.Enabled = true;
|
||||
}
|
||||
else
|
||||
@ -743,6 +854,7 @@ namespace Volian.Controls.Library
|
||||
btnPrnSrchRslts.Enabled = false;
|
||||
btnClearSearchResults.Enabled = false;
|
||||
btnCopySearchResults.Enabled = false;
|
||||
btnSaveSearchResults.Enabled = false;
|
||||
cmbResultsStyle.Enabled = false;
|
||||
}
|
||||
|
||||
@ -1113,6 +1225,24 @@ namespace Volian.Controls.Library
|
||||
cmbResultsStyleIndex = 3; // display step text in results
|
||||
}
|
||||
}
|
||||
else if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[3]) //Transition Search
|
||||
{
|
||||
ReportTitle = string.Format("Search For Transitions: Transition Type: {0}, Transition Category: {1}", cbxTranFormat.SelectedItem, cbxTranCategory.SelectedItem);
|
||||
string docVersionList = string.Empty;
|
||||
if (lstCheckedDocVersions.Count == 0)
|
||||
docVersionList = cbxTranVersion.Tag.ToString();
|
||||
else
|
||||
{
|
||||
string sep = string.Empty;
|
||||
foreach (DocVersionInfo dvi in lstCheckedDocVersions)
|
||||
{
|
||||
docVersionList += sep + dvi.VersionID.ToString();
|
||||
sep = ",";
|
||||
}
|
||||
}
|
||||
SearchResults = ItemInfoList.GetListFromTransitionSearch(docVersionList, cbxTranFormat.SelectedIndex - 1, cbxTranCategory.SelectedItem.ToString());
|
||||
cmbResultsStyleIndex = 3; // display step text in results
|
||||
}
|
||||
AddMessageForEmptyAnnotations();
|
||||
if (cmbResultsStyleIndex == 3 && cmbResultsStyle.Items.Count == 3) cmbResultsStyleIndex--;
|
||||
cmbResultsStyle.SelectedIndex = cmbResultsStyleIndex;
|
||||
@ -1246,6 +1376,7 @@ namespace Volian.Controls.Library
|
||||
private void advTreeProcSets_AfterCheck(object sender, DevComponents.AdvTree.AdvTreeCellEventArgs e)
|
||||
{
|
||||
DevComponents.AdvTree.Node n = advTreeProcSets.SelectedNode;
|
||||
dicSelectedDocVersionNodes[n] = n.Checked;
|
||||
if (n.Checked)
|
||||
{
|
||||
n.Style = DevComponents.AdvTree.NodeStyles.Apple;
|
||||
@ -1292,6 +1423,29 @@ namespace Volian.Controls.Library
|
||||
buildSetToSearchPanelTitle();
|
||||
}
|
||||
|
||||
private void cbxTranFormatFillIn(string vid)
|
||||
{
|
||||
vid = vid.IndexOf(",") < 0 ? vid : vid.Substring(0, cbxTranVersion.Tag.ToString().IndexOf(","));
|
||||
DocVersionInfo dvi = DocVersionInfo.Get(int.Parse(vid));
|
||||
TransTypeList ttl = dvi.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
|
||||
cbxTranFormat.Items.Clear();
|
||||
cbxTranFormat.Items.Add("All");
|
||||
for (int i = 0; i < ttl.Count; i++)
|
||||
cbxTranFormat.Items.Add(new TransItem(ttl[i].TransMenu.Replace("?.", ""), ttl[i].TransFormat.Replace("?.", "")));
|
||||
cbxTranFormat.SelectedIndex = 0;
|
||||
cbxTranCategory.Items.Clear();
|
||||
cbxTranCategory.Items.Add("All");
|
||||
cbxTranCategory.Items.Add("Internal");
|
||||
cbxTranCategory.Items.Add("External");
|
||||
cbxTranCategory.Items.Add("Outside");
|
||||
cbxTranCategory.SelectedIndex = 0;
|
||||
/*
|
||||
groupPanelTranFmt.Style.BackColor = (_CurTrans == null && _TranFmtIndx==0) ? Color.Yellow : Color.Orange;
|
||||
E_TransUI etm = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
|
||||
_DoingRange = (etm & E_TransUI.StepLast) == E_TransUI.StepLast;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
private void xpSetToSearch_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
@ -1633,6 +1787,204 @@ namespace Volian.Controls.Library
|
||||
_SearchResults = null;
|
||||
DisplayResults();
|
||||
}
|
||||
private void btnLoadSearchResults_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
if (ofdSearchResults.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
|
||||
lbSrchResults.DataSource = null;
|
||||
lbSrchResults.Items.Clear();
|
||||
toolTip1.SetToolTip(lbSrchResults, null);
|
||||
Cursor = Cursors.WaitCursor;
|
||||
SearchResults = ItemInfoList.GetByContentID(0);
|
||||
int k = ofdSearchResults.FilterIndex;
|
||||
switch (k)
|
||||
{
|
||||
case 1: //xml
|
||||
{
|
||||
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||
xd.Load(ofdSearchResults.FileName);
|
||||
int sti = int.Parse(xd.SelectSingleNode("search/criteria/@index").InnerText);
|
||||
switch (sti)
|
||||
{
|
||||
case 0: //text
|
||||
{
|
||||
cbxTextSearchText.Text = xd.SelectSingleNode("search/criteria/@text").InnerText;
|
||||
cbxCaseSensitive.Checked = bool.Parse(xd.SelectSingleNode("search/criteria/@case").InnerText);
|
||||
cbxIncROTextSrch.Checked = bool.Parse(xd.SelectSingleNode("search/criteria/@ro").InnerText);
|
||||
tabSearchTypes.SelectedTab = tabStepTypeSearch;
|
||||
//cmbResultsStyle.SelectedIndex = int.Parse(xd.SelectSingleNode("search/results/@style").InnerText);
|
||||
cmbResultsStyle.Text = xd.SelectSingleNode("search/results/@style").InnerText;
|
||||
System.Xml.XmlNodeList nl = xd.SelectNodes("search/results/item");
|
||||
foreach (System.Xml.XmlNode nd in nl)
|
||||
{
|
||||
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
||||
ItemInfo ii = ItemInfo.Get(itemID);
|
||||
SearchResults.AddItemInfo(ii);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: //annotation
|
||||
{
|
||||
cbxAnnoTypes.Text = xd.SelectSingleNode("search/criteria/@type").InnerText;
|
||||
cbxTextSearchAnnotation.Text = xd.SelectSingleNode("search/criteria/@text").InnerText;
|
||||
cbxCaseSensitiveAnnoText.Checked = bool.Parse(xd.SelectSingleNode("search/criteria/@case").InnerText);
|
||||
tabSearchTypes.SelectedTab = tabAnnotationSearch;
|
||||
cmbResultsStyle.Text = xd.SelectSingleNode("search/results/@style").InnerText;
|
||||
System.Xml.XmlNodeList nl = xd.SelectNodes("search/results/item");
|
||||
foreach (System.Xml.XmlNode nd in nl)
|
||||
{
|
||||
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
|
||||
ItemInfo ii = ItemInfo.Get(itemID);
|
||||
SearchResults.AddItemInfo(ii);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: //referenced object
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: //csv
|
||||
{
|
||||
break;
|
||||
}
|
||||
case 3: //tsv
|
||||
{
|
||||
break;
|
||||
}
|
||||
case 4: //bsf
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
DisplayResults();
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSaveSearchResults_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
ICollection<ItemInfo> myList = lbSrchResults.DataSource as ICollection<ItemInfo>;
|
||||
if (sfdSearchResults.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
int k = sfdSearchResults.FilterIndex;
|
||||
switch (k)
|
||||
{
|
||||
case 1: //xml
|
||||
{
|
||||
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||
System.Xml.XmlElement xe = xd.CreateElement("search");
|
||||
xd.AppendChild(xe);
|
||||
|
||||
int sti = tabSearchTypes.SelectedTabIndex;
|
||||
switch (sti)
|
||||
{
|
||||
case 0: //text
|
||||
{
|
||||
xe = xd.CreateElement("criteria");
|
||||
System.Xml.XmlAttribute xa = xd.CreateAttribute("index");
|
||||
xa.InnerText = sti.ToString();
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xa = xd.CreateAttribute("text");
|
||||
xa.InnerText = cbxTextSearchText.Text;
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xa = xd.CreateAttribute("case");
|
||||
xa.InnerText = cbxCaseSensitive.Checked.ToString();
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xa = xd.CreateAttribute("ro");
|
||||
xa.InnerText = cbxIncROTextSrch.Checked.ToString();
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xd.DocumentElement.AppendChild(xe);
|
||||
xe = xd.CreateElement("results");
|
||||
xa = xd.CreateAttribute("style");
|
||||
//xa.InnerText = cmbResultsStyle.SelectedIndex.ToString();
|
||||
xa.InnerText = cmbResultsStyle.Text;
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
foreach (ItemInfo ii in myList)
|
||||
{
|
||||
System.Xml.XmlElement xee = xd.CreateElement("item");
|
||||
xa = xd.CreateAttribute("id");
|
||||
xa.InnerText = ii.ItemID.ToString();
|
||||
xee.Attributes.SetNamedItem(xa);
|
||||
xe.AppendChild(xee);
|
||||
}
|
||||
xd.DocumentElement.AppendChild(xe);
|
||||
xd.Save(sfdSearchResults.FileName);
|
||||
break;
|
||||
}
|
||||
case 1: //annotation
|
||||
{
|
||||
xe = xd.CreateElement("criteria");
|
||||
System.Xml.XmlAttribute xa = xd.CreateAttribute("index");
|
||||
xa.InnerText = sti.ToString();
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xa = xd.CreateAttribute("type");
|
||||
xa.InnerText = cbxAnnoTypes.Text;
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xa = xd.CreateAttribute("text");
|
||||
xa.InnerText = cbxTextSearchAnnotation.Text;
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xa = xd.CreateAttribute("case");
|
||||
xa.InnerText = cbxCaseSensitiveAnnoText.Checked.ToString();
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
xd.DocumentElement.AppendChild(xe);
|
||||
xe = xd.CreateElement("results");
|
||||
xa = xd.CreateAttribute("style");
|
||||
//xa.InnerText = cmbResultsStyle.SelectedIndex.ToString();
|
||||
xa.InnerText = cmbResultsStyle.Text;
|
||||
xe.Attributes.SetNamedItem(xa);
|
||||
foreach (ItemInfo ii in myList)
|
||||
{
|
||||
System.Xml.XmlElement xee = xd.CreateElement("item");
|
||||
xa = xd.CreateAttribute("id");
|
||||
xa.InnerText = ii.ItemID.ToString();
|
||||
xee.Attributes.SetNamedItem(xa);
|
||||
xe.AppendChild(xee);
|
||||
}
|
||||
xd.DocumentElement.AppendChild(xe);
|
||||
xd.Save(sfdSearchResults.FileName);
|
||||
break;
|
||||
}
|
||||
case 2: //referenced object
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: //csv
|
||||
{
|
||||
break;
|
||||
}
|
||||
case 3: //tsv
|
||||
{
|
||||
break;
|
||||
}
|
||||
case 4: //bsf
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
//string fn = sfdSearchResults.FileName;
|
||||
//StringBuilder sb = new StringBuilder();
|
||||
//sb.Append("\"Location\"\t\"Type\"\t\"Text\"\t\"High-Level\"\t\"Annotations\"");
|
||||
//foreach (ItemInfo myItem in myList)
|
||||
//{
|
||||
// sb.Append(string.Format("\r\n\"{0}\"\t\"{1}\"\t\"{2}\"\t\"{3}\"", myItem.ShortPath, myItem.ToolTip,
|
||||
// myItem.DisplayText, !myItem.IsSection && !myItem.IsHigh ? (myItem.MyHLS == null ? "" : myItem.MyHLS.DisplayText) : ""));
|
||||
// if (myItem.ItemAnnotationCount > 0)
|
||||
// foreach (AnnotationInfo myAnnotation in myItem.ItemAnnotations)
|
||||
// sb.Append(string.Format("\t\"{0}\"", myAnnotation.SearchText));
|
||||
//}
|
||||
//Clipboard.Clear();
|
||||
//Clipboard.SetText(sb.ToString());
|
||||
MessageBox.Show("Results Copied to Clipboard", "Copy Results", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCopySearchResults_Click(object sender, EventArgs e)
|
||||
{
|
||||
ICollection<ItemInfo> myList = lbSrchResults.DataSource as ICollection<ItemInfo>;
|
||||
|
@ -819,7 +819,10 @@ namespace Volian.Controls.Library
|
||||
OriginalText = modtext;
|
||||
}
|
||||
if (!_MyItemInfo.IsStep)
|
||||
{
|
||||
_MyItemInfo.UpdateTransitionText();
|
||||
_MyItemInfo.UpdateROText();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -451,7 +451,7 @@ namespace Volian.Controls.Library
|
||||
btnCMInsNote.Enabled = btnCMInsTable.Enabled = btnCMInsFigure.Enabled = allow;
|
||||
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse;
|
||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse;
|
||||
}
|
||||
|
||||
void MyFlexGrid_SelChange(object sender, EventArgs e)
|
||||
@ -881,7 +881,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = setting && !MyItemInfo.IsInCalvertConditionResponse;
|
||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = setting && !MyItemInfo.IsInCalvertConditionResponse;
|
||||
}
|
||||
private void SetButtonAndMenuEnabling(bool docontextmenus)
|
||||
{
|
||||
@ -1211,7 +1211,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = !MyItemInfo.IsInCalvertConditionResponse;
|
||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = !MyItemInfo.IsInCalvertConditionResponse;
|
||||
|
||||
_RibbonControl.Refresh(); // jsj- added this because Table Design ribbon tab grouping was not going away when not on a table step type
|
||||
}
|
||||
@ -1557,6 +1557,7 @@ namespace Volian.Controls.Library
|
||||
Control ctrl = FindActiveControl();
|
||||
if (ctrl == null) return; // null if on property page for procedure & section number/title
|
||||
Clipboard.Clear();
|
||||
//if (_MyStepRTB == null) return;
|
||||
if (_MyStepRTB.SelectedText == null || _MyStepRTB.SelectedText == "")
|
||||
return; // nothing to copy onto clipboard, just return
|
||||
DataObject myDO = new DataObject(); ;
|
||||
@ -2199,7 +2200,25 @@ namespace Volian.Controls.Library
|
||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("SpellChecker");
|
||||
MyEditItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||
}
|
||||
//private FindReplace dlgFindReplace = null;
|
||||
private void btnTranRefresh_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
ProcedureInfo.ResetTranCounters();
|
||||
ProcedureInfo.RefreshTransitions(MyItemInfo.MyProcedure as ProcedureInfo);
|
||||
this.Cursor = Cursors.Default;
|
||||
MessageBox.Show(this, string.Format("Checked {0} transitions, fixed {1} transitions", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void btnRefObjRefresh_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
ProcedureInfo.ResetROCounters();
|
||||
ProcedureInfo.RefreshReferenceObjects(MyItemInfo.MyProcedure as ProcedureInfo);
|
||||
this.Cursor = Cursors.Default;
|
||||
MessageBox.Show(this, string.Format("Checked {0} referenced objects, fixed {1} referenced objects", ProcedureInfo.ROCheckCount, ProcedureInfo.ROFixCount), "Results of Refresh Referenced Objects", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
|
||||
//private FindReplace dlgFindReplace = null;
|
||||
private void btnFindRplDlg_Click(object sender, EventArgs e)
|
||||
{
|
||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl");
|
||||
|
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
Binary file not shown.
@ -959,8 +959,12 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
MenuItem mir = mi.MenuItems.Add(ri.ToString());
|
||||
mir.Tag = ri;
|
||||
bool addImportMI = false;
|
||||
if (ri.LatestVersion.MyStage.IsApproved > 0 && (ri.RevisionID > lastApprovedRevisionID))
|
||||
{
|
||||
lastApprovedRevisionID = ri.RevisionID;
|
||||
addImportMI = true;
|
||||
}
|
||||
//mir.Click += new EventHandler(ApprovedRevision_Click);
|
||||
//added jcb 20111031
|
||||
if (ri.LatestVersion.PDF != null)
|
||||
@ -975,11 +979,25 @@ namespace Volian.Controls.Library
|
||||
mirs.Tag = ri;
|
||||
mirs.Click += new EventHandler(SummaryOfChanges_Click);
|
||||
}
|
||||
if (addImportMI && ri.LatestVersion.ApprovedXML != null)
|
||||
{
|
||||
MenuItem miri = mir.MenuItems.Add("Import Procedure");
|
||||
miri.Tag = ri;
|
||||
miri.Click += new EventHandler(ImportProcedure_Click);
|
||||
}
|
||||
//end added jcb 20111031
|
||||
mi.Tag = lastApprovedRevisionID;
|
||||
}
|
||||
}
|
||||
|
||||
void ImportProcedure_Click(object sender, EventArgs e)
|
||||
{
|
||||
RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo;
|
||||
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||
xd.LoadXml(ri.LatestVersion.ApprovedXML);
|
||||
MessageBox.Show(xd.SelectSingleNode("procedure/content/@number").InnerText);
|
||||
}
|
||||
|
||||
void ApprovedRevision_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool superceded = false;
|
||||
@ -1077,9 +1095,9 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
#region MenuPaste
|
||||
// Find what's in paste buffer & determine whether the paste can occur for the selected node.
|
||||
ItemInfo iiClipboard = OnClipboardStatus(this, new vlnTreeEventArgs(tn));
|
||||
if (iiClipboard != null)
|
||||
{
|
||||
ItemInfo iiClipboard = OnClipboardStatus(this,new vlnTreeEventArgs(tn));
|
||||
if(iiClipboard != null)
|
||||
{
|
||||
// can it be pasted at current node.
|
||||
if (tn.VEObject as DocVersionInfo != null) // paste item must be a proc
|
||||
{
|
||||
@ -1088,15 +1106,15 @@ namespace Volian.Controls.Library
|
||||
else
|
||||
{
|
||||
ItemInfo iiPasteHere = tn.VEObject as ItemInfo;
|
||||
if (iiPasteHere == null) return;
|
||||
bool okToReplace = iiClipboard.ItemID != iiPasteHere.ItemID;
|
||||
if (iiPasteHere == null) return;
|
||||
bool okToReplace = iiClipboard.ItemID != iiPasteHere.ItemID;
|
||||
if (iiPasteHere != null)
|
||||
{
|
||||
SectionInfo si = (tn.VEObject as SectionInfo != null) ? tn.VEObject as SectionInfo : null;
|
||||
if (iiPasteHere.IsProcedure && iiClipboard.IsProcedure) // procedure can be pasted before/replace/after
|
||||
{
|
||||
cm.MenuItems.Add("Paste Procedure Before", new EventHandler(mi_Click));
|
||||
if (okToReplace) cm.MenuItems.Add("Replace Existing Procedure", new EventHandler(mi_Click));
|
||||
if (okToReplace) cm.MenuItems.Add("Replace Existing Procedure", new EventHandler(mi_Click));
|
||||
cm.MenuItems.Add("Paste Procedure After", new EventHandler(mi_Click));
|
||||
}
|
||||
else if (iiPasteHere.IsProcedure && iiClipboard.IsSection) // procedure must have sections only
|
||||
@ -1104,7 +1122,7 @@ namespace Volian.Controls.Library
|
||||
else if (iiPasteHere.IsSection && iiClipboard.IsSection)
|
||||
{
|
||||
cm.MenuItems.Add("Paste Section Before", new EventHandler(mi_Click));
|
||||
if (okToReplace) cm.MenuItems.Add("Replace Existing Section", new EventHandler(mi_Click));
|
||||
if (okToReplace) cm.MenuItems.Add("Replace Existing Section", new EventHandler(mi_Click));
|
||||
cm.MenuItems.Add("Paste Section After", new EventHandler(mi_Click));
|
||||
if (si.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections && iiPasteHere.IsStepSection && iiClipboard.IsStepSection)
|
||||
{
|
||||
@ -1119,7 +1137,7 @@ namespace Volian.Controls.Library
|
||||
else if (iiPasteHere.IsStep && iiClipboard.IsStep)
|
||||
{
|
||||
if (AddToInsertMenu(iiPasteHere, 0)) cm.MenuItems.Add("Paste Step Before", new EventHandler(mi_Click));
|
||||
if (okToReplace) cm.MenuItems.Add("Replace Existing Step", new EventHandler(mi_Click));
|
||||
if (okToReplace) cm.MenuItems.Add("Replace Existing Step", new EventHandler(mi_Click));
|
||||
if (AddToInsertMenu(iiPasteHere, 1)) cm.MenuItems.Add("Paste Step After", new EventHandler(mi_Click));
|
||||
}
|
||||
}
|
||||
@ -1496,8 +1514,8 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private void tv_NodePaste(string p)
|
||||
{
|
||||
ItemInfo iiClipboard = OnClipboardStatus(this, null);
|
||||
if (iiClipboard == null) return;
|
||||
ItemInfo iiClipboard = OnClipboardStatus(this, null);
|
||||
if (iiClipboard == null) return;
|
||||
string message = string.Empty;
|
||||
if (iiClipboard.MyContent.MyEntry == null)
|
||||
{
|
||||
@ -1539,23 +1557,23 @@ namespace Volian.Controls.Library
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
PasteAsDocVersionChild(tn, iiClipboard.ItemID);
|
||||
this.Cursor = Cursors.Default;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ItemInfo iiPaste = tn.VEObject as ItemInfo;
|
||||
if (iiPaste == null) return;
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
if (p.IndexOf("Before") > -1)
|
||||
PasteBeforeOrAfter(MenuSelections.StepBefore, tn, iiClipboard.ItemID);
|
||||
else if (p.IndexOf("After") > -1)
|
||||
PasteBeforeOrAfter(MenuSelections.StepAfter, tn, iiClipboard.ItemID);
|
||||
else if (p.IndexOf("Replace") > -1)
|
||||
PasteReplace(tn, iiClipboard.ItemID);
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
if (p.IndexOf("Before") > -1)
|
||||
PasteBeforeOrAfter(MenuSelections.StepBefore, tn, iiClipboard.ItemID);
|
||||
else if (p.IndexOf("After") > -1)
|
||||
PasteBeforeOrAfter(MenuSelections.StepAfter, tn, iiClipboard.ItemID);
|
||||
else if (p.IndexOf("Replace") > -1)
|
||||
PasteReplace(tn, iiClipboard.ItemID);
|
||||
else // paste as child
|
||||
PasteAsChild(tn, iiClipboard.ItemID);
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
private void PasteAsDocVersionChild(VETreeNode tn, int copyStartID)
|
||||
{
|
||||
@ -2054,6 +2072,7 @@ namespace Volian.Controls.Library
|
||||
SetLastValues(StepInfo.Get(step.ItemID));
|
||||
tn = new VETreeNode(_LastStepInfo);
|
||||
_LastStepInfo.UpdateTransitionText();
|
||||
_LastStepInfo.UpdateROText();
|
||||
TreeNode par = SelectedNode.Parent;
|
||||
par.Nodes.Insert(tvindex + ((newtype == MenuSelections.StepBefore) ? 0 : 1), tn);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user