Organized with #Regions and added comments
This commit is contained in:
parent
c2272ce7e3
commit
9d594d0470
36
PROMS/VEPROMS_UI/frmVEPROMS.Designer.cs
generated
36
PROMS/VEPROMS_UI/frmVEPROMS.Designer.cs
generated
@ -295,9 +295,9 @@ namespace VEPROMS
|
||||
//
|
||||
this.ribbonControl1.CaptionVisible = true;
|
||||
this.ribbonControl1.Controls.Add(this.ribbonPanel1);
|
||||
this.ribbonControl1.Controls.Add(this.ribbonPanel2);
|
||||
this.ribbonControl1.Controls.Add(this.ribbonPanel3);
|
||||
this.ribbonControl1.Controls.Add(this.ribbonPanel4);
|
||||
this.ribbonControl1.Controls.Add(this.ribbonPanel3);
|
||||
this.ribbonControl1.Controls.Add(this.ribbonPanel2);
|
||||
this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.ribbonControl1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
|
||||
this.rtabHome,
|
||||
@ -2316,7 +2316,7 @@ namespace VEPROMS
|
||||
this.infoPanel.Controls.Add(this.infoTabs);
|
||||
this.infoPanel.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.infoPanel.Expanded = false;
|
||||
this.infoPanel.ExpandedBounds = new System.Drawing.Rectangle(1058, 147, 230, 768);
|
||||
this.infoPanel.ExpandedBounds = new System.Drawing.Rectangle(1058, 147, 230, 766);
|
||||
this.infoPanel.ExpandOnTitleClick = true;
|
||||
this.infoPanel.Location = new System.Drawing.Point(1258, 147);
|
||||
this.infoPanel.Name = "infoPanel";
|
||||
@ -2342,15 +2342,15 @@ namespace VEPROMS
|
||||
//
|
||||
this.infoTabs.BackColor = System.Drawing.Color.Transparent;
|
||||
this.infoTabs.CanReorderTabs = true;
|
||||
this.infoTabs.Controls.Add(this.tabControlPanel2);
|
||||
this.infoTabs.Controls.Add(this.tabControlPanel1);
|
||||
this.infoTabs.Controls.Add(this.tabControlPanel3);
|
||||
this.infoTabs.Controls.Add(this.tabControlPanel2);
|
||||
this.infoTabs.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.infoTabs.Location = new System.Drawing.Point(0, 26);
|
||||
this.infoTabs.Name = "infoTabs";
|
||||
this.infoTabs.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold);
|
||||
this.infoTabs.SelectedTabIndex = 0;
|
||||
this.infoTabs.Size = new System.Drawing.Size(30, 742);
|
||||
this.infoTabs.Size = new System.Drawing.Size(30, 740);
|
||||
this.infoTabs.TabAlignment = DevComponents.DotNetBar.eTabStripAlignment.Right;
|
||||
this.infoTabs.TabIndex = 1;
|
||||
this.infoTabs.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox;
|
||||
@ -2366,7 +2366,7 @@ namespace VEPROMS
|
||||
this.tabControlPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControlPanel1.Name = "tabControlPanel1";
|
||||
this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.tabControlPanel1.Size = new System.Drawing.Size(4, 742);
|
||||
this.tabControlPanel1.Size = new System.Drawing.Size(204, 740);
|
||||
this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(142)))), ((int)(((byte)(179)))), ((int)(((byte)(231)))));
|
||||
this.tabControlPanel1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(237)))), ((int)(((byte)(254)))));
|
||||
this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
@ -2388,7 +2388,7 @@ namespace VEPROMS
|
||||
this.panelEx1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelEx1.Location = new System.Drawing.Point(1, 1);
|
||||
this.panelEx1.Name = "panelEx1";
|
||||
this.panelEx1.Size = new System.Drawing.Size(2, 740);
|
||||
this.panelEx1.Size = new System.Drawing.Size(202, 738);
|
||||
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.Transparent;
|
||||
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.SlateGray;
|
||||
@ -2405,7 +2405,7 @@ namespace VEPROMS
|
||||
this.groupPanel4.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupPanel4.Location = new System.Drawing.Point(0, 362);
|
||||
this.groupPanel4.Name = "groupPanel4";
|
||||
this.groupPanel4.Size = new System.Drawing.Size(2, 100);
|
||||
this.groupPanel4.Size = new System.Drawing.Size(202, 100);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -2450,7 +2450,7 @@ namespace VEPROMS
|
||||
this.groupPanel3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupPanel3.Location = new System.Drawing.Point(0, 262);
|
||||
this.groupPanel3.Name = "groupPanel3";
|
||||
this.groupPanel3.Size = new System.Drawing.Size(2, 100);
|
||||
this.groupPanel3.Size = new System.Drawing.Size(202, 100);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -2491,7 +2491,7 @@ namespace VEPROMS
|
||||
this.groupPanel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupPanel2.Location = new System.Drawing.Point(0, 122);
|
||||
this.groupPanel2.Name = "groupPanel2";
|
||||
this.groupPanel2.Size = new System.Drawing.Size(2, 140);
|
||||
this.groupPanel2.Size = new System.Drawing.Size(202, 140);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -2540,7 +2540,7 @@ namespace VEPROMS
|
||||
this.groupPanel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupPanel1.Name = "groupPanel1";
|
||||
this.groupPanel1.Size = new System.Drawing.Size(2, 122);
|
||||
this.groupPanel1.Size = new System.Drawing.Size(202, 122);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -2623,7 +2623,7 @@ namespace VEPROMS
|
||||
this.tabControlPanel3.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControlPanel3.Name = "tabControlPanel3";
|
||||
this.tabControlPanel3.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.tabControlPanel3.Size = new System.Drawing.Size(4, 742);
|
||||
this.tabControlPanel3.Size = new System.Drawing.Size(4, 740);
|
||||
this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(142)))), ((int)(((byte)(179)))), ((int)(((byte)(231)))));
|
||||
this.tabControlPanel3.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(237)))), ((int)(((byte)(254)))));
|
||||
this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
@ -2648,7 +2648,7 @@ namespace VEPROMS
|
||||
this.navpaneResults.Name = "navpaneResults";
|
||||
this.navpaneResults.NavigationBarHeight = 33;
|
||||
this.navpaneResults.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.navpaneResults.Size = new System.Drawing.Size(2, 740);
|
||||
this.navpaneResults.Size = new System.Drawing.Size(2, 738);
|
||||
this.navpaneResults.TabIndex = 0;
|
||||
//
|
||||
//
|
||||
@ -2675,7 +2675,7 @@ namespace VEPROMS
|
||||
this.navpanSrchRslts.Location = new System.Drawing.Point(1, 25);
|
||||
this.navpanSrchRslts.Name = "navpanSrchRslts";
|
||||
this.navpanSrchRslts.ParentItem = this.btnSrchRslt;
|
||||
this.navpanSrchRslts.Size = new System.Drawing.Size(0, 681);
|
||||
this.navpanSrchRslts.Size = new System.Drawing.Size(0, 679);
|
||||
this.navpanSrchRslts.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.navpanSrchRslts.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
|
||||
this.navpanSrchRslts.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
|
||||
@ -2701,7 +2701,7 @@ namespace VEPROMS
|
||||
this.navigationPanePanel2.Location = new System.Drawing.Point(1, 1);
|
||||
this.navigationPanePanel2.Name = "navigationPanePanel2";
|
||||
this.navigationPanePanel2.ParentItem = this.btnSimStpsRslt;
|
||||
this.navigationPanePanel2.Size = new System.Drawing.Size(0, 705);
|
||||
this.navigationPanePanel2.Size = new System.Drawing.Size(0, 703);
|
||||
this.navigationPanePanel2.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.navigationPanePanel2.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
|
||||
this.navigationPanePanel2.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
|
||||
@ -2732,7 +2732,7 @@ namespace VEPROMS
|
||||
this.tabControlPanel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControlPanel2.Name = "tabControlPanel2";
|
||||
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.tabControlPanel2.Size = new System.Drawing.Size(4, 742);
|
||||
this.tabControlPanel2.Size = new System.Drawing.Size(4, 740);
|
||||
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(142)))), ((int)(((byte)(179)))), ((int)(((byte)(231)))));
|
||||
this.tabControlPanel2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(237)))), ((int)(((byte)(254)))));
|
||||
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
@ -2755,7 +2755,7 @@ namespace VEPROMS
|
||||
this.panelEx4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelEx4.Location = new System.Drawing.Point(1, 1);
|
||||
this.panelEx4.Name = "panelEx4";
|
||||
this.panelEx4.Size = new System.Drawing.Size(2, 740);
|
||||
this.panelEx4.Size = new System.Drawing.Size(2, 738);
|
||||
this.panelEx4.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx4.Style.BackColor1.Color = System.Drawing.Color.Transparent;
|
||||
this.panelEx4.Style.BackColor2.Color = System.Drawing.Color.SlateGray;
|
||||
@ -2782,7 +2782,7 @@ namespace VEPROMS
|
||||
this.lbxBookMarks.FormattingEnabled = true;
|
||||
this.lbxBookMarks.HorizontalScrollbar = true;
|
||||
this.lbxBookMarks.ItemHeight = 16;
|
||||
this.lbxBookMarks.Location = new System.Drawing.Point(0, 128);
|
||||
this.lbxBookMarks.Location = new System.Drawing.Point(0, 126);
|
||||
this.lbxBookMarks.Name = "lbxBookMarks";
|
||||
this.lbxBookMarks.Size = new System.Drawing.Size(2, 612);
|
||||
this.lbxBookMarks.TabIndex = 2;
|
||||
|
@ -44,6 +44,7 @@ namespace VEPROMS
|
||||
|
||||
// set the color of the ribbon
|
||||
// - get the color selected by user if available
|
||||
// TO DO: set and read from Settings.settings
|
||||
//DevComponents.DotNetBar.RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable((Settings.Default["SystemColor"] != null) ? Settings.Default.SystemColor : (int)DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Black);
|
||||
|
||||
VETreeNode tn = VETreeNode.GetFolder(1);
|
||||
@ -54,7 +55,7 @@ namespace VEPROMS
|
||||
tv.NodeProperties += new Volian.Controls.Library.vlnTreeViewEvent(tv_NodeProperties);
|
||||
_CommentTitleBckColor = epComments.TitleStyle.BackColor1.Color;
|
||||
epComments.Expanded = false;
|
||||
// Need: load previously set bookmarks
|
||||
// TODO: load previously set bookmarks
|
||||
btnPrevPos.Enabled = false;
|
||||
btnClrBookMrks.Enabled = false;
|
||||
btnRmvCurBookMrk.Enabled = false;
|
||||
@ -62,6 +63,27 @@ namespace VEPROMS
|
||||
_PrevBookMark = null;
|
||||
}
|
||||
|
||||
private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#region Tree View
|
||||
|
||||
/// <summary>
|
||||
/// Get the selected tree node's properties
|
||||
/// </summary>
|
||||
/// <param name="node">VETreeNode</param>
|
||||
void SetupNodes(VETreeNode node)
|
||||
{
|
||||
if (!node.Equals(_LastTreeNode))
|
||||
@ -84,7 +106,7 @@ namespace VEPROMS
|
||||
_LastFolder = _LastFolderInfo.Get();
|
||||
break;
|
||||
case "DocVersionInfo":
|
||||
_LastDocVersionInfo = (DocVersionInfo)(node.VEObject); //(_LastTreeNode.VEObject);
|
||||
_LastDocVersionInfo = (DocVersionInfo)(node.VEObject);
|
||||
_LastDocVersion = _LastDocVersionInfo.Get();
|
||||
break;
|
||||
case "ProcedureInfo":
|
||||
@ -121,6 +143,7 @@ namespace VEPROMS
|
||||
itemAnnotationsBindingSource.DataSource = _LastStepInfo.ItemAnnotations;
|
||||
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))
|
||||
//{
|
||||
@ -137,6 +160,7 @@ namespace VEPROMS
|
||||
// frmFlexCell newtable4 = new frmFlexCell(_LastStepInfo.MyContent.Text);
|
||||
// newtable4.ShowDialog();
|
||||
//}
|
||||
#endregion
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -145,80 +169,6 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenItem(ItemInfo item)
|
||||
{
|
||||
DisplayPanel vlnCSLAPanel1;
|
||||
ItemInfo tmp = item;
|
||||
while (tmp.MyContent.Type >= 10000) tmp = (ItemInfo)tmp.ActiveParent;
|
||||
vlnCSLAPanel1 = AddProcedureTab(tmp);
|
||||
vlnCSLAPanel1.ItemSelect(item);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
void tv_NodeProperties(object sender, Volian.Controls.Library.vlnTreeEventArgs args)
|
||||
{
|
||||
DisplayProperties();
|
||||
}
|
||||
|
||||
// this is used by tv_NodeProperties() and by ribbonFilePropertes_Click()
|
||||
// the type of the args parameter for these two functions is different and
|
||||
// type casting didn't work, so I put the guts in this function.
|
||||
private void DisplayProperties()
|
||||
{
|
||||
// check the user's preference on the style of poperty dialogs "PropPageStyle"
|
||||
// 1 - Button dialog interface
|
||||
// 2 - Tab dialog interface
|
||||
// 3 - Property Grid interface
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
if ((int)Settings.Default["PropPageStyle"] == 3)
|
||||
DoPropertyGrid(); // Will display a Property Grid interface
|
||||
else
|
||||
DoPropertyPages(); // Will display either a Button or a Tab dialog
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
bool tv_NodeDelete(object sender, Volian.Controls.Library.vlnTreeEventArgs args)
|
||||
{
|
||||
SetupNodes((VETreeNode)args.Node);
|
||||
@ -247,7 +197,6 @@ namespace VEPROMS
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool IsFolder(VETreeNode veTreeNode)
|
||||
{
|
||||
return (veTreeNode.VEObject.GetType().Name == "FolderInfo");
|
||||
@ -295,6 +244,7 @@ namespace VEPROMS
|
||||
SaveIfChanged2(_LastStep);
|
||||
if (_LastTreeNode != null) _LastTreeNode.ResetNode();
|
||||
}
|
||||
|
||||
private void SaveIfChanged<T>(BusinessBase<T> tmp)
|
||||
where T : BusinessBase<T>
|
||||
{
|
||||
@ -310,6 +260,7 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveIfChanged2(Item tmp)
|
||||
{
|
||||
SaveIfChanged<Item>(tmp);
|
||||
@ -325,32 +276,6 @@ namespace VEPROMS
|
||||
tn.LoadChildren();
|
||||
|
||||
}
|
||||
|
||||
// Used for the status bar in the lower left corner of the main screen
|
||||
void tn_LoadingChildrenSQL(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
ProgBarText = "Loading SQL";
|
||||
}
|
||||
|
||||
// Used for the status bar in the lower left corner of the main screen
|
||||
void tn_LoadingChildernValue(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
ProgBarValue = args.Value;
|
||||
}
|
||||
|
||||
// Used for the status bar in the lower left corner of the main screen
|
||||
void tn_LoadingChildernMax(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
ProgBarMax = args.Value;
|
||||
ProgBarText = "Loading...";
|
||||
}
|
||||
|
||||
// Used for the status bar in the lower left corner of the main screen
|
||||
void tn_LoadingChildernDone(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
ProgBarText = args.Info + " Seconds";
|
||||
}
|
||||
|
||||
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
SaveIfChanged();
|
||||
@ -359,6 +284,39 @@ namespace VEPROMS
|
||||
|
||||
}
|
||||
|
||||
void tv_NodeProperties(object sender, Volian.Controls.Library.vlnTreeEventArgs args)
|
||||
{
|
||||
DisplayProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property Page and Grid
|
||||
|
||||
/// <summary>
|
||||
// this is used by tv_NodeProperties() and by ribbonFilePropertes_Click()
|
||||
// the type of the args parameter for these two functions is different and
|
||||
// type casting didn't work, so I put the guts in this function.
|
||||
/// </summary>
|
||||
private void DisplayProperties()
|
||||
{
|
||||
// check the user's preference on the style of poperty dialogs "PropPageStyle"
|
||||
// 1 - Button dialog interface
|
||||
// 2 - Tab dialog interface
|
||||
// 3 - Property Grid interface
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
if ((int)Settings.Default["PropPageStyle"] == 3)
|
||||
DoPropertyGrid(); // Will display a Property Grid interface
|
||||
else
|
||||
DoPropertyPages(); // Will display either a Button or a Tab dialog
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Button from the Ribbon Bar
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void btnProperties_Click(object sender, EventArgs e)
|
||||
{
|
||||
DisplayProperties();
|
||||
@ -423,6 +381,9 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display a Property Page for the current tree node
|
||||
/// </summary>
|
||||
private void DoPropertyPages()
|
||||
{
|
||||
// Display a property page. (this does either a tabbed or button interface)
|
||||
@ -452,6 +413,9 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display a property grid for the current tree node
|
||||
/// </summary>
|
||||
private void DoPropertyGrid()
|
||||
{
|
||||
// Display a property grid
|
||||
@ -490,13 +454,9 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
private void btnVlnWeb_Click(object sender, EventArgs e)
|
||||
{
|
||||
VlnWeb veWWW = new VlnWeb();
|
||||
veWWW.Show();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Table Insert Sample Code
|
||||
private void btnInsTable_Click(object sender, EventArgs e)
|
||||
{
|
||||
Point loc = btnInsTable.DisplayRectangle.Location;
|
||||
@ -525,87 +485,118 @@ namespace VEPROMS
|
||||
// newtable.Show();
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Edit/View Modes
|
||||
/// <summary>
|
||||
/// Edit Mode button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnEditMode_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnEditView.Text = btnEditMode.Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// View Mode button on the bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnViewMode_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnEditView.Text = btnViewMode.Text;
|
||||
}
|
||||
|
||||
/// <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;
|
||||
}
|
||||
|
||||
private void btnMarkPrevPos_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnSetBookMrk_Click(sender, e);
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void btnPrevPos_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_PrevBookMark != null)
|
||||
{
|
||||
VETreeNode jumpToHere = _PrevBookMark; // save current previous
|
||||
btnSetBookMrk_Click(sender, e); // save current as the new previous
|
||||
tv.SelectedNode = jumpToHere; // jump to the saved previous
|
||||
}
|
||||
}
|
||||
#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";
|
||||
}
|
||||
|
||||
private void btnBold_Click(object sender, EventArgs e)
|
||||
#endregion
|
||||
|
||||
#region Progress Bar
|
||||
|
||||
/// <summary>
|
||||
/// Used for the status bar in the lower left corner of the main screen
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void tn_LoadingChildrenSQL(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
btnBold.Checked = !btnBold.Checked;
|
||||
ProgBarText = "Loading SQL";
|
||||
}
|
||||
|
||||
private void btnItalics_Click(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// Used for the status bar in the lower left corner of the main screen
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void tn_LoadingChildernValue(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
btnItalics.Checked = !btnItalics.Checked;
|
||||
ProgBarValue = args.Value;
|
||||
}
|
||||
|
||||
private void btnUline_Click(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// Used for the status bar in the lower left corner of the main screen
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void tn_LoadingChildernMax(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
btnUline.Checked = !btnUline.Checked;
|
||||
ProgBarMax = args.Value;
|
||||
ProgBarText = "Loading...";
|
||||
}
|
||||
|
||||
private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e)
|
||||
/// <summary>
|
||||
/// Used for the status bar in the lower left corner of the main screen
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void tn_LoadingChildernDone(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
Settings.Default.Location = this.Location;
|
||||
Settings.Default.Size = this.Size;
|
||||
Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void frmVEPROMS_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
|
||||
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
|
||||
}
|
||||
|
||||
private void btnFindRplDlg_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
FindReplace frmFindRepl = new FindReplace();
|
||||
frmFindRepl.Show();
|
||||
|
||||
ProgBarText = args.Info + " Seconds";
|
||||
}
|
||||
|
||||
public int ProgBarMax
|
||||
@ -613,13 +604,13 @@ namespace VEPROMS
|
||||
get { return bottomProgBar.Maximum; }
|
||||
set { bottomProgBar.Maximum = value; }
|
||||
}
|
||||
|
||||
public int ProgBarValue
|
||||
{
|
||||
get { return bottomProgBar.Value; }
|
||||
set { bottomProgBar.Value = value; }
|
||||
}
|
||||
|
||||
|
||||
public string ProgBarText
|
||||
{
|
||||
get { return bottomProgBar.Text; }
|
||||
@ -629,35 +620,72 @@ 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
|
||||
|
||||
private void btnGlbSrch_Click(object sender, EventArgs e)
|
||||
#region Bookmarks
|
||||
|
||||
/// <summary>
|
||||
/// Mark Position button on bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnMarkPrevPos_Click(object sender, EventArgs e)
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
infoTabs.SelectedTab = infotabResults;
|
||||
btnSrchRslt.Checked = true;
|
||||
btnSetBookMrk_Click(sender, e);
|
||||
}
|
||||
|
||||
private void btnSimStps_Click(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// Previous button on bottom tool bar
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnPrevPos_Click(object sender, EventArgs e)
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
infoTabs.SelectedTab = infotabResults;
|
||||
btnSimStpsRslt.Checked = true;
|
||||
if (_PrevBookMark != null)
|
||||
{
|
||||
VETreeNode jumpToHere = _PrevBookMark; // save current previous
|
||||
btnSetBookMrk_Click(sender, e); // save current as the new previous
|
||||
tv.SelectedNode = jumpToHere; // jump to the saved previous
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear Bookmarks button on Information pannel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnClrBookMrks_Click(object sender, EventArgs e)
|
||||
{
|
||||
lbxBookMarks.Items.Clear();
|
||||
@ -668,6 +696,11 @@ namespace VEPROMS
|
||||
_PrevBookMark = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove Bookmark button on Information pannel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnRmvCurBookMrk_Click(object sender, EventArgs e)
|
||||
{
|
||||
lbxBookMarks.Items.RemoveAt(lbxBookMarks.SelectedIndex);
|
||||
@ -681,13 +714,21 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the given tree node to the list of bookmarks
|
||||
/// </summary>
|
||||
/// <param name="bkmrk"></param>
|
||||
private void AddToBookMarkList(VETreeNode bkmrk)
|
||||
{
|
||||
if (!(lbxBookMarks.Items.Contains(bkmrk)))
|
||||
lbxBookMarks.Items.Add(bkmrk);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set Bookmark button on the Information pannel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSetBookMrk_Click(object sender, EventArgs e)
|
||||
{
|
||||
VETreeNode tn = (VETreeNode)(tv.SelectedNode);
|
||||
@ -699,17 +740,38 @@ namespace VEPROMS
|
||||
btnRmvCurBookMrk.Enabled = true;
|
||||
}
|
||||
|
||||
private void btnAbout_Click(object sender, EventArgs e)
|
||||
{
|
||||
AboutVEPROMS about = new AboutVEPROMS();
|
||||
about.ShowDialog();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bookmarks List item double click event
|
||||
/// Jump to slected bookmark
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void lbxBookMarks_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (lbxBookMarks.SelectedItem != null)
|
||||
tv.SelectedNode = (VETreeNode)lbxBookMarks.SelectedItem;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DisplayPanel
|
||||
|
||||
/// <summary>
|
||||
/// Jump to the location referenced by the transition
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
private void OpenTransition(ItemInfo item)
|
||||
{
|
||||
OpenItem(item);
|
||||
}
|
||||
|
||||
private void OpenItem(ItemInfo item)
|
||||
{
|
||||
DisplayPanel vlnCSLAPanel1;
|
||||
ItemInfo tmp = item;
|
||||
while (tmp.MyContent.Type >= 10000) tmp = (ItemInfo)tmp.ActiveParent;
|
||||
vlnCSLAPanel1 = AddProcedureTab(tmp);
|
||||
vlnCSLAPanel1.ItemSelect(item);
|
||||
}
|
||||
|
||||
private void vlnCSLAPanel1_LinkClicked(object sender, Volian.Controls.Library.DisplayLinkEventArgs args)
|
||||
{
|
||||
@ -724,11 +786,6 @@ namespace VEPROMS
|
||||
break;
|
||||
}
|
||||
}
|
||||
// -------------------------------------------------------
|
||||
private void OpenTransition(ItemInfo item)
|
||||
{
|
||||
OpenItem(item);
|
||||
}
|
||||
|
||||
private DisplayPanel GetPanelFromPage(TabPage tp)
|
||||
{
|
||||
@ -770,7 +827,170 @@ namespace VEPROMS
|
||||
return vlnCSLAPanel1;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Font
|
||||
|
||||
/// <summary>
|
||||
/// Bold button on the ribbon
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnBold_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnBold.Checked = !btnBold.Checked;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Italics button on the ribbon
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnItalics_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnItalics.Checked = !btnItalics.Checked;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Underline button on the ribbon
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnUline_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnUline.Checked = !btnUline.Checked;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Find/Replace and Search
|
||||
|
||||
/// <summary>
|
||||
/// Find/Replace button on the ribbon
|
||||
/// Display the Find/Replace dialog
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnFindRplDlg_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
FindReplace frmFindRepl = new FindReplace();
|
||||
frmFindRepl.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Global Search button on the ribbon
|
||||
/// Opens the Information Pannel and selects the Results tab
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnGlbSrch_Click(object sender, EventArgs e)
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
infoTabs.SelectedTab = infotabResults;
|
||||
btnSrchRslt.Checked = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Similar Steps
|
||||
|
||||
/// <summary>
|
||||
/// Similar Steps button on the ribbon
|
||||
/// Opens the Information Pannel and selects the Results tab
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSimStps_Click(object sender, EventArgs e)
|
||||
{
|
||||
infoPanel.Expanded = true;
|
||||
infoTabs.SelectedTab = infotabResults;
|
||||
btnSimStpsRslt.Checked = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Help/About
|
||||
|
||||
/// <summary>
|
||||
/// About button on the ribbon
|
||||
/// Display the About dialog
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnAbout_Click(object sender, EventArgs e)
|
||||
{
|
||||
AboutVEPROMS about = new AboutVEPROMS();
|
||||
about.ShowDialog();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Volian Web button on the ribbon
|
||||
/// display the Volian web site on a pop up form
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnVlnWeb_Click(object sender, EventArgs e)
|
||||
{
|
||||
VlnWeb veWWW = new VlnWeb();
|
||||
veWWW.Show();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Ribbon
|
||||
|
||||
/// <summary>
|
||||
/// Hide and Unhide ribbon tabs based on the type of tree node selected
|
||||
/// </summary>
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnOptions_Click(object sender, EventArgs e)
|
||||
{
|
||||
frmSysOptions VeSysOpts = new frmSysOptions();
|
||||
@ -778,10 +998,16 @@ namespace VEPROMS
|
||||
|
||||
}
|
||||
|
||||
/// <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
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user