B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function
This commit is contained in:
+2
-10
@@ -1,4 +1,4 @@
|
|||||||
//using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
|
|
||||||
@@ -24,7 +24,6 @@ namespace Volian.Controls.Library
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
#region Component Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -49,7 +48,7 @@ namespace Volian.Controls.Library
|
|||||||
this.btnApplicabilitychg.Size = new System.Drawing.Size(87, 22);
|
this.btnApplicabilitychg.Size = new System.Drawing.Size(87, 22);
|
||||||
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2);
|
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Set All at Level", "", "When clicked, all steps at that level of the current step will be set to the selected applicability. Note that the Set All at Level button is disabled for RNO step types unless they are substeps off of a RNO step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Set All at Level", "", "When clicked, all steps at that level of the current step will be set to the selected applicability. Note that the Set All at Level button is disabled for RNO step types unless they are substeps off of a RNO step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); // C2026-034 fix tool tip text.
|
||||||
this.btnApplicabilitychg.TabIndex = 0;
|
this.btnApplicabilitychg.TabIndex = 0;
|
||||||
this.btnApplicabilitychg.Text = "Set All at Level";
|
this.btnApplicabilitychg.Text = "Set All at Level";
|
||||||
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
||||||
@@ -86,13 +85,7 @@ namespace Volian.Controls.Library
|
|||||||
this.gpMode.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
this.gpMode.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||||
this.gpMode.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
this.gpMode.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||||
this.gpMode.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
|
this.gpMode.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
this.gpMode.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.gpMode.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
this.gpMode.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.gpMode.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.gpMode.TabIndex = 0;
|
this.gpMode.TabIndex = 0;
|
||||||
this.gpMode.Text = "Viewing Mode";
|
this.gpMode.Text = "Viewing Mode";
|
||||||
@@ -103,7 +96,6 @@ namespace Volian.Controls.Library
|
|||||||
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
//this.gpItem.Controls.Add(this.btnApplicabilitychg);
|
|
||||||
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
||||||
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
||||||
|
|||||||
@@ -32,10 +32,13 @@ namespace Volian.Controls.Library
|
|||||||
_MyDisplayTabItem = value;
|
_MyDisplayTabItem = value;
|
||||||
gpMode.Controls.Clear();
|
gpMode.Controls.Clear();
|
||||||
gpItem.Controls.Clear();
|
gpItem.Controls.Clear();
|
||||||
gpSubItem.Controls.Clear();
|
|
||||||
MyCheckBoxes.Clear();
|
MyCheckBoxes.Clear();
|
||||||
if (_MyDisplayTabItem != null)
|
if (_MyDisplayTabItem != null)
|
||||||
{
|
{
|
||||||
|
//B2026-043 Fix "Set All At Level" button.
|
||||||
|
DevComponents.DotNetBar.Controls.GroupPanel gpSubItem = InitializegpSubItem();
|
||||||
|
gpSubItem.Controls.Clear();
|
||||||
|
|
||||||
DocVersionConfig dcfg = _MyDisplayTabItem.MyItemInfo.MyDocVersion.MyConfig as DocVersionConfig;
|
DocVersionConfig dcfg = _MyDisplayTabItem.MyItemInfo.MyDocVersion.MyConfig as DocVersionConfig;
|
||||||
List<string> names = new List<string>();
|
List<string> names = new List<string>();
|
||||||
for (int n = 1; n <= dcfg.Unit_Count; n++)
|
for (int n = 1; n <= dcfg.Unit_Count; n++)
|
||||||
@@ -56,11 +59,11 @@ namespace Volian.Controls.Library
|
|||||||
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddItemMode("All", "-1");
|
AddItemMode("All", "-1", ref gpSubItem);
|
||||||
i = 0;
|
i = 0;
|
||||||
foreach (string name in names)
|
foreach (string name in names)
|
||||||
AddItemMode(name.Trim(), (++i).ToString());
|
AddItemMode(name.Trim(), (++i).ToString(), ref gpSubItem);
|
||||||
AddItemMode("None", "0");
|
AddItemMode("None", "0", ref gpSubItem);
|
||||||
gpItem.Controls.Add(gpSubItem);
|
gpItem.Controls.Add(gpSubItem);
|
||||||
gpSubItem.BringToFront();
|
gpSubItem.BringToFront();
|
||||||
gpItem.Controls.Add(btnApplicabilitychg);
|
gpItem.Controls.Add(btnApplicabilitychg);
|
||||||
@@ -89,25 +92,26 @@ namespace Volian.Controls.Library
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void InitializegpSubItem() //B2026-043 Fix "Set All At Level" button.
|
private DevComponents.DotNetBar.Controls.GroupPanel InitializegpSubItem() //B2026-043 Fix "Set All At Level" button.
|
||||||
|
{
|
||||||
|
DevComponents.DotNetBar.Controls.GroupPanel gpSubItem;
|
||||||
|
gpSubItem = new DevComponents.DotNetBar.Controls.GroupPanel
|
||||||
{
|
{
|
||||||
this.gpSubItem = new DevComponents.DotNetBar.Controls.GroupPanel();
|
|
||||||
//
|
//
|
||||||
// gpSubItem
|
// gpSubItem
|
||||||
//
|
//
|
||||||
gpSubItem.AutoSize = true;
|
AutoSize = true,
|
||||||
gpSubItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink,
|
||||||
gpSubItem.CanvasColor = System.Drawing.SystemColors.Control;
|
CanvasColor = System.Drawing.SystemColors.Control,
|
||||||
gpSubItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007,
|
||||||
gpSubItem.DisabledBackColor = System.Drawing.Color.Empty;
|
DisabledBackColor = System.Drawing.Color.Empty,
|
||||||
gpSubItem.Dock = System.Windows.Forms.DockStyle.Top;
|
Dock = System.Windows.Forms.DockStyle.Top,
|
||||||
gpSubItem.Location = new System.Drawing.Point(0, 49);
|
Location = new System.Drawing.Point(0, 49),
|
||||||
gpSubItem.Margin = new System.Windows.Forms.Padding(4);
|
Margin = new System.Windows.Forms.Padding(4),
|
||||||
gpSubItem.Name = "gpSubItem";
|
Name = "gpSubItem",
|
||||||
gpSubItem.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
|
Padding = new System.Windows.Forms.Padding(13, 12, 13, 37)
|
||||||
gpSubItem.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
|
};
|
||||||
gpSubItem.Style.BackColorGradientAngle = 90;
|
gpSubItem.BackColor = Color.Transparent;
|
||||||
gpSubItem.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
|
||||||
gpSubItem.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
gpSubItem.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||||
gpSubItem.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
gpSubItem.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||||
gpSubItem.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
|
gpSubItem.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
|
||||||
@@ -117,10 +121,8 @@ namespace Volian.Controls.Library
|
|||||||
gpSubItem.Text = "";
|
gpSubItem.Text = "";
|
||||||
gpSubItem.Location = new System.Drawing.Point(0, 49);
|
gpSubItem.Location = new System.Drawing.Point(0, 49);
|
||||||
gpSubItem.Size = new System.Drawing.Size(400, 250);
|
gpSubItem.Size = new System.Drawing.Size(400, 250);
|
||||||
//
|
return gpSubItem;
|
||||||
|
|
||||||
}
|
}
|
||||||
private DevComponents.DotNetBar.Controls.GroupPanel gpSubItem;
|
|
||||||
private Dictionary<int, CheckBox> MyCheckBoxes = new Dictionary<int, CheckBox>();
|
private Dictionary<int, CheckBox> MyCheckBoxes = new Dictionary<int, CheckBox>();
|
||||||
private string _MyApplicability = string.Empty;
|
private string _MyApplicability = string.Empty;
|
||||||
public string MyApplicability
|
public string MyApplicability
|
||||||
@@ -164,7 +166,7 @@ namespace Volian.Controls.Library
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
//}
|
//}
|
||||||
private void AddItemMode(string name, string value)
|
private void AddItemMode(string name, string value, ref DevComponents.DotNetBar.Controls.GroupPanel gpSubItem)
|
||||||
{
|
{
|
||||||
CheckBox cb = new CheckBox();
|
CheckBox cb = new CheckBox();
|
||||||
cb.BackColor = Color.Transparent;
|
cb.BackColor = Color.Transparent;
|
||||||
@@ -181,6 +183,8 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private void cb_CheckedChanged(object sender, EventArgs e)
|
private void cb_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
|
ei.SaveCurrentAndContents(); // C2026-035 save unsaved step text.
|
||||||
UnwireCheckboxes(false);
|
UnwireCheckboxes(false);
|
||||||
CheckBox cb = sender as CheckBox;
|
CheckBox cb = sender as CheckBox;
|
||||||
CheckState cs = cb.CheckState;
|
CheckState cs = cb.CheckState;
|
||||||
@@ -326,6 +330,10 @@ namespace Volian.Controls.Library
|
|||||||
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
|
ei.SaveCurrentAndContents(); // C2026-035 save unsaved step text.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ItemInfo startitm = MyItemInfo.FirstSibling;
|
ItemInfo startitm = MyItemInfo.FirstSibling;
|
||||||
while (startitm != null)
|
while (startitm != null)
|
||||||
@@ -537,7 +545,7 @@ namespace Volian.Controls.Library
|
|||||||
public DisplayApplicability()
|
public DisplayApplicability()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
InitializegpSubItem(); //B2026-043 Fix "Set All At Level" button.
|
//InitializegpSubItem(); //B2026-043 Fix "Set All At Level" button.
|
||||||
this.VisibleChanged += new EventHandler(DisplayApplicability_VisibleChanged);
|
this.VisibleChanged += new EventHandler(DisplayApplicability_VisibleChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user