Merge branch 'Development' into C2022-003-Change-Textboxes-to-RTF-3
This commit is contained in:
@@ -31,25 +31,32 @@
|
||||
this.btn1 = new System.Windows.Forms.Button();
|
||||
this.btn2 = new System.Windows.Forms.Button();
|
||||
this.lblMessage = new System.Windows.Forms.Label();
|
||||
this.tableLP1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLP1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btn1
|
||||
//
|
||||
this.btn1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btn1.AutoSize = true;
|
||||
this.btn1.Location = new System.Drawing.Point(12, 99);
|
||||
this.btn1.Location = new System.Drawing.Point(18, 102);
|
||||
this.btn1.Margin = new System.Windows.Forms.Padding(10);
|
||||
this.btn1.MinimumSize = new System.Drawing.Size(60, 20);
|
||||
this.btn1.Name = "btn1";
|
||||
this.btn1.Size = new System.Drawing.Size(75, 23);
|
||||
this.btn1.Size = new System.Drawing.Size(60, 20);
|
||||
this.btn1.TabIndex = 0;
|
||||
this.btn1.UseVisualStyleBackColor = true;
|
||||
this.btn1.Click += new System.EventHandler(this.Btn1_Click);
|
||||
//
|
||||
// btn2
|
||||
//
|
||||
this.btn2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn2.AutoSize = true;
|
||||
this.btn2.Location = new System.Drawing.Point(322, 99);
|
||||
this.btn2.Location = new System.Drawing.Point(335, 102);
|
||||
this.btn2.Margin = new System.Windows.Forms.Padding(10);
|
||||
this.btn2.MinimumSize = new System.Drawing.Size(60, 20);
|
||||
this.btn2.Name = "btn2";
|
||||
this.btn2.Size = new System.Drawing.Size(75, 23);
|
||||
this.btn2.Size = new System.Drawing.Size(60, 20);
|
||||
this.btn2.TabIndex = 1;
|
||||
this.btn2.UseVisualStyleBackColor = true;
|
||||
this.btn2.Click += new System.EventHandler(this.Btn2_Click);
|
||||
@@ -57,24 +64,48 @@
|
||||
// lblMessage
|
||||
//
|
||||
this.lblMessage.AutoSize = true;
|
||||
this.lblMessage.Location = new System.Drawing.Point(33, 41);
|
||||
this.tableLP1.SetColumnSpan(this.lblMessage, 2);
|
||||
this.lblMessage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblMessage.Location = new System.Drawing.Point(11, 8);
|
||||
this.lblMessage.MaximumSize = new System.Drawing.Size(413, 0);
|
||||
this.lblMessage.Name = "lblMessage";
|
||||
this.lblMessage.Size = new System.Drawing.Size(0, 13);
|
||||
this.lblMessage.Size = new System.Drawing.Size(391, 84);
|
||||
this.lblMessage.TabIndex = 2;
|
||||
this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// tableLP1
|
||||
//
|
||||
this.tableLP1.AutoSize = true;
|
||||
this.tableLP1.ColumnCount = 2;
|
||||
this.tableLP1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLP1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLP1.Controls.Add(this.lblMessage, 0, 0);
|
||||
this.tableLP1.Controls.Add(this.btn1);
|
||||
this.tableLP1.Controls.Add(this.btn2);
|
||||
this.tableLP1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLP1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLP1.MaximumSize = new System.Drawing.Size(413, 0);
|
||||
this.tableLP1.MinimumSize = new System.Drawing.Size(413, 130);
|
||||
this.tableLP1.Name = "tableLP1";
|
||||
this.tableLP1.Padding = new System.Windows.Forms.Padding(8);
|
||||
this.tableLP1.RowCount = 2;
|
||||
this.tableLP1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLP1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||
this.tableLP1.Size = new System.Drawing.Size(413, 130);
|
||||
this.tableLP1.TabIndex = 0;
|
||||
//
|
||||
// CustomMessageBox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.ClientSize = new System.Drawing.Size(419, 130);
|
||||
this.Controls.Add(this.lblMessage);
|
||||
this.Controls.Add(this.btn2);
|
||||
this.Controls.Add(this.btn1);
|
||||
this.Controls.Add(this.tableLP1);
|
||||
this.Name = "CustomMessageBox";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "CustomMessageBox";
|
||||
this.tableLP1.ResumeLayout(false);
|
||||
this.tableLP1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -85,5 +116,6 @@
|
||||
private System.Windows.Forms.Button btn1;
|
||||
private System.Windows.Forms.Button btn2;
|
||||
private System.Windows.Forms.Label lblMessage;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLP1;
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
btn2.Text = button2Text;
|
||||
btn2.Visible = true;
|
||||
|
||||
//make buttons uniform
|
||||
btn1.Height = btn2.Height = btn1.Height > btn2.Height ? btn1.Height : btn2.Height;
|
||||
btn1.Width = btn2.Width = btn1.Width > btn2.Width ? btn1.Width : btn2.Width;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
using System.Security.Cryptography;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
partial class DisplayApplicability
|
||||
@@ -20,6 +23,7 @@ namespace Volian.Controls.Library
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
@@ -30,19 +34,41 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
this.gpItem = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
this.btnApplicabilitychg2 = new DevComponents.DotNetBar.ButtonItem();
|
||||
this.btnApplicabilitychg = new DevComponents.DotNetBar.ButtonX();
|
||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||
this.gpItem.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnApplicabilitychg
|
||||
//
|
||||
this.btnApplicabilitychg.Location = new System.Drawing.Point(60, 8);
|
||||
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnApplicabilitychg.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.btnApplicabilitychg.Name = "btnApplicabilitychg";
|
||||
this.btnApplicabilitychg.Size = new System.Drawing.Size(80, 22);
|
||||
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Change applicability settings - All At Level", "", "When clicked, all steps at the level of the current step will have their applicability settings changed.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.btnApplicabilitychg.TabIndex = 0;
|
||||
this.btnApplicabilitychg.Text = "Set All at Level";
|
||||
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
||||
this.btnApplicabilitychg.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnApplicabilitychg.Click += new System.EventHandler(this.BtnApplicabilitychg_Click);
|
||||
//
|
||||
// gpMode
|
||||
//
|
||||
this.gpMode.AutoSize = true;
|
||||
this.gpMode.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.gpMode.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.gpMode.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpMode.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpMode.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.gpMode.Location = new System.Drawing.Point(0, 0);
|
||||
this.gpMode.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gpMode.Name = "gpMode";
|
||||
this.gpMode.Padding = new System.Windows.Forms.Padding(10, 10, 10, 30);
|
||||
this.gpMode.Size = new System.Drawing.Size(324, 40);
|
||||
this.gpMode.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
|
||||
this.gpMode.Size = new System.Drawing.Size(432, 49);
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -58,7 +84,6 @@ namespace Volian.Controls.Library
|
||||
this.gpMode.Style.BorderRightWidth = 1;
|
||||
this.gpMode.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.gpMode.Style.BorderTopWidth = 1;
|
||||
this.gpMode.Style.Class = "";
|
||||
this.gpMode.Style.CornerDiameter = 4;
|
||||
this.gpMode.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||
this.gpMode.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||
@@ -67,12 +92,10 @@ namespace Volian.Controls.Library
|
||||
//
|
||||
//
|
||||
//
|
||||
this.gpMode.StyleMouseDown.Class = "";
|
||||
this.gpMode.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.gpMode.StyleMouseOver.Class = "";
|
||||
this.gpMode.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.gpMode.TabIndex = 0;
|
||||
this.gpMode.Text = "Viewing Mode";
|
||||
@@ -83,11 +106,14 @@ namespace Volian.Controls.Library
|
||||
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
//this.gpItem.Controls.Add(this.btnApplicabilitychg);
|
||||
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.gpItem.Location = new System.Drawing.Point(0, 40);
|
||||
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
||||
this.gpItem.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gpItem.Name = "gpItem";
|
||||
this.gpItem.Padding = new System.Windows.Forms.Padding(10, 10, 10, 30);
|
||||
this.gpItem.Size = new System.Drawing.Size(324, 40);
|
||||
this.gpItem.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
|
||||
this.gpItem.Size = new System.Drawing.Size(432, 85);
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -103,7 +129,6 @@ namespace Volian.Controls.Library
|
||||
this.gpItem.Style.BorderRightWidth = 1;
|
||||
this.gpItem.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.gpItem.Style.BorderTopWidth = 1;
|
||||
this.gpItem.Style.Class = "";
|
||||
this.gpItem.Style.CornerDiameter = 4;
|
||||
this.gpItem.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||
this.gpItem.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||
@@ -112,26 +137,31 @@ namespace Volian.Controls.Library
|
||||
//
|
||||
//
|
||||
//
|
||||
this.gpItem.StyleMouseDown.Class = "";
|
||||
this.gpItem.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.gpItem.StyleMouseOver.Class = "";
|
||||
this.gpItem.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.gpItem.TabIndex = 1;
|
||||
this.gpItem.Text = "Item Mode";
|
||||
//
|
||||
// DisplayApplicability
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.gpItem);
|
||||
this.Controls.Add(this.gpMode);
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Name = "DisplayApplicability";
|
||||
this.Size = new System.Drawing.Size(324, 656);
|
||||
this.Size = new System.Drawing.Size(432, 807);
|
||||
this.gpItem.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.PerformLayout();
|
||||
//
|
||||
// superTooltip1
|
||||
//
|
||||
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
|
||||
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
||||
|
||||
}
|
||||
|
||||
@@ -139,6 +169,9 @@ namespace Volian.Controls.Library
|
||||
|
||||
private DevComponents.DotNetBar.Controls.GroupPanel gpMode;
|
||||
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
|
||||
private DevComponents.DotNetBar.ButtonItem btnApplicabilitychg2;
|
||||
private DevComponents.DotNetBar.ButtonX btnApplicabilitychg;
|
||||
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using JR.Utils.GUI.Forms;
|
||||
using log4net.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
@@ -51,15 +52,22 @@ namespace Volian.Controls.Library
|
||||
i++;
|
||||
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
||||
}
|
||||
|
||||
AddItemMode("All", "-1");
|
||||
i = 0;
|
||||
foreach (string name in names)
|
||||
AddItemMode(name.Trim(), (++i).ToString());
|
||||
AddItemMode("None", "0");
|
||||
gpItem.Controls.Add(btnApplicabilitychg);
|
||||
btnApplicabilitychg.BringToFront();
|
||||
if (_MyDisplayTabItem.MyStepTabPanel != null)
|
||||
{
|
||||
MyItemInfo = _MyDisplayTabItem.MyStepTabPanel.MyStepPanel.SelectedItemInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
MyItemInfo = _MyDisplayTabItem.MyItemInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,7 +183,8 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
break;
|
||||
}
|
||||
WireCheckboxes();
|
||||
|
||||
WireCheckboxes();
|
||||
MyApplicability = string.Empty;
|
||||
string sep = string.Empty;
|
||||
foreach (int i in MyCheckBoxes.Keys)
|
||||
@@ -270,6 +279,29 @@ namespace Volian.Controls.Library
|
||||
// s.Save();
|
||||
//}
|
||||
}
|
||||
private void BtnApplicabilitychg_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
Volian.Base.Library.BigNum MasterSlave_ApplicabilityTmp;
|
||||
StepConfig sc = MyItemInfo.MyConfig as StepConfig;
|
||||
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
||||
|
||||
ItemInfo startitm = MyItemInfo.FirstSibling;
|
||||
while (startitm != null)
|
||||
{
|
||||
StepConfig sc2 = startitm.MyConfig as StepConfig;
|
||||
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
||||
{
|
||||
sc2.MasterSlave_Applicability = (MasterSlave_ApplicabilityTmp);
|
||||
cnt.Config = sc2.ToString();
|
||||
cnt.Save();
|
||||
}
|
||||
startitm = startitm.GetNext();
|
||||
}
|
||||
|
||||
_MyDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||
|
||||
}
|
||||
|
||||
// B2021-149: for procedure, only consider external transitions as invalid
|
||||
private bool IsProcWithNoExternalTrans(ItemInfo ii, List<InvalidTransition> invalidTrans)
|
||||
{
|
||||
|
||||
@@ -462,6 +462,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="CustomMessageBox.resx">
|
||||
<DependentUpon>CustomMessageBox.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DisplayBookMarks.resx">
|
||||
<DependentUpon>DisplayBookMarks.cs</DependentUpon>
|
||||
|
||||
@@ -1601,12 +1601,11 @@ namespace Volian.Controls.Library
|
||||
//B2024-024 create import file for parent/child procedure set
|
||||
void MultiUnitImportProcedure_Click(object sender, EventArgs e)
|
||||
{
|
||||
//RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo;
|
||||
RevisionInfo ri = RevisionInfo.Get(int.Parse((sender as MenuItem).Tag.ToString()));
|
||||
RevisionConfig rc = ri.MyConfig as RevisionConfig;
|
||||
// bug fix: B2016-183 - add the child's name (ex Unit 1) to the export file name for Parent/Child procedures.
|
||||
int applIdx = rc.Applicability_Index;
|
||||
string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to inlcude the export filename
|
||||
string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to include the export filename
|
||||
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||
xd.LoadXml(ri.LatestVersion.ApprovedXML);
|
||||
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
||||
@@ -1615,8 +1614,13 @@ namespace Volian.Controls.Library
|
||||
// B2022-048: Crash when creating Procedure to Import from versions. Couldn't handle '/' in proc number.
|
||||
string fNametmp = xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_").Replace("/", "-") + ".pxml";
|
||||
// B2022-112: If applicability, need to resolve the '<' and '>' characters. Just use the UnitNames, i.e. str, from above.
|
||||
if (applIdx > 0) fNametmp = Regex.Replace(fNametmp, @"\<U-ID\>", str, RegexOptions.IgnoreCase);
|
||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp;
|
||||
if (applIdx > 0)
|
||||
{
|
||||
fNametmp = Regex.Replace(fNametmp, @"\<U-ID\>", str, RegexOptions.IgnoreCase);
|
||||
fNametmp = Regex.Replace(fNametmp, @"\<U-NAME\>", str, RegexOptions.IgnoreCase);
|
||||
}
|
||||
|
||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp;
|
||||
xd.Save(fileName);
|
||||
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user