This commit is contained in:
parent
5d975e0f8e
commit
ad2e39dc4d
@ -1431,7 +1431,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string number = DisplayNumber;
|
string number = DisplayNumber;
|
||||||
//if (cont.Type >= 20000) number = Ordinal.ToString() + ".";
|
//if (cont.Type >= 20000) number = Ordinal.ToString() + ".";
|
||||||
if (cont.Type >= 20000) number = MyTab==null?"":MyTab.CleanText;
|
if (cont.Type >= 20000) number = MyTab==null?"":MyTab.CleanText;
|
||||||
return string.Format("{0} {1}", number, DisplayText).Trim();
|
return string.Format("{0} {1}", number, DisplayText).Trim(); // Need TrimEnd(); for IP3
|
||||||
//return string.Format("{0} {1}", number, cont.Text).Trim();
|
//return string.Format("{0} {1}", number, cont.Text).Trim();
|
||||||
//return string.Format("{0} {1}", cont.Number, cont.Text);
|
//return string.Format("{0} {1}", cont.Number, cont.Text);
|
||||||
//return "Now is the time for all good men to come to the aid of their country!";
|
//return "Now is the time for all good men to come to the aid of their country!";
|
||||||
@ -2426,6 +2426,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
_MyTab.CleanText = ((ItemInfo)ActiveParent).MyTab.CleanText;
|
_MyTab.CleanText = ((ItemInfo)ActiveParent).MyTab.CleanText;
|
||||||
_MyTab.Text = ((ItemInfo)ActiveParent).MyTab.Text;
|
_MyTab.Text = ((ItemInfo)ActiveParent).MyTab.Text;
|
||||||
|
_MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize??0;
|
||||||
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros)
|
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros)
|
||||||
_MyTab.Text = Regex.Replace(_MyTab.Text, "{!.+?}", " ");
|
_MyTab.Text = Regex.Replace(_MyTab.Text, "{!.+?}", " ");
|
||||||
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOIdentPrint.Contains("{asterisk}"))
|
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOIdentPrint.Contains("{asterisk}"))
|
||||||
@ -3290,6 +3291,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
MyFont = font;
|
MyFont = font;
|
||||||
}
|
}
|
||||||
public int Offset;
|
public int Offset;
|
||||||
|
private float _RNOTabWidthAdjust = 0;
|
||||||
|
public float RNOTabWidthAdjust
|
||||||
|
{
|
||||||
|
get { return _RNOTabWidthAdjust; }
|
||||||
|
set { _RNOTabWidthAdjust = value; }
|
||||||
|
}
|
||||||
public int AsteriskOffset;
|
public int AsteriskOffset;
|
||||||
private static Regex _ReplaceSymbols = new Regex("^[^0-9A-Za-z]*"); // trim anything that isn't an ascii alpha/numeric from the beginning
|
private static Regex _ReplaceSymbols = new Regex("^[^0-9A-Za-z]*"); // trim anything that isn't an ascii alpha/numeric from the beginning
|
||||||
public string CleanTextNoSymbols
|
public string CleanTextNoSymbols
|
||||||
|
@ -4600,6 +4600,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _IdentWidth, "TabData/@IdentWidth");
|
return LazyLoad(ref _IdentWidth, "TabData/@IdentWidth");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private LazyLoad<float?> _RNOAdjustTabSize;
|
||||||
|
public float? RNOAdjustTabSize
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _RNOAdjustTabSize, "TabData/@RNOAdjustTabSize");
|
||||||
|
}
|
||||||
|
}
|
||||||
private LazyLoad<float?> _MacroTabAdjust;
|
private LazyLoad<float?> _MacroTabAdjust;
|
||||||
public float? MacroTabAdjust
|
public float? MacroTabAdjust
|
||||||
{
|
{
|
||||||
|
@ -31,13 +31,13 @@ namespace Volian.Controls.Library
|
|||||||
this.groupFoldouts = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.groupFoldouts = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
this.listBoxFoldouts = new System.Windows.Forms.ListBox();
|
this.listBoxFoldouts = new System.Windows.Forms.ListBox();
|
||||||
this.groupSteps = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.groupSteps = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
this.btnSave = new DevComponents.DotNetBar.ButtonX();
|
|
||||||
this.lblStepSelect = new DevComponents.DotNetBar.LabelX();
|
this.lblStepSelect = new DevComponents.DotNetBar.LabelX();
|
||||||
this.lvSteps = new System.Windows.Forms.ListView();
|
this.btnSave = new DevComponents.DotNetBar.ButtonX();
|
||||||
this.btnClear = new DevComponents.DotNetBar.ButtonX();
|
this.pnlButtons = new DevComponents.DotNetBar.PanelEx();
|
||||||
this.btnClearAll = new DevComponents.DotNetBar.ButtonX();
|
this.lstCBSteps = new System.Windows.Forms.CheckedListBox();
|
||||||
this.groupFoldouts.SuspendLayout();
|
this.groupFoldouts.SuspendLayout();
|
||||||
this.groupSteps.SuspendLayout();
|
this.groupSteps.SuspendLayout();
|
||||||
|
this.pnlButtons.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// groupFoldouts
|
// groupFoldouts
|
||||||
@ -47,6 +47,7 @@ namespace Volian.Controls.Library
|
|||||||
this.groupFoldouts.Controls.Add(this.listBoxFoldouts);
|
this.groupFoldouts.Controls.Add(this.listBoxFoldouts);
|
||||||
this.groupFoldouts.Dock = System.Windows.Forms.DockStyle.Top;
|
this.groupFoldouts.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.groupFoldouts.Location = new System.Drawing.Point(0, 0);
|
this.groupFoldouts.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.groupFoldouts.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.groupFoldouts.Name = "groupFoldouts";
|
this.groupFoldouts.Name = "groupFoldouts";
|
||||||
this.groupFoldouts.Size = new System.Drawing.Size(340, 154);
|
this.groupFoldouts.Size = new System.Drawing.Size(340, 154);
|
||||||
//
|
//
|
||||||
@ -86,6 +87,7 @@ namespace Volian.Controls.Library
|
|||||||
this.listBoxFoldouts.FormattingEnabled = true;
|
this.listBoxFoldouts.FormattingEnabled = true;
|
||||||
this.listBoxFoldouts.ItemHeight = 16;
|
this.listBoxFoldouts.ItemHeight = 16;
|
||||||
this.listBoxFoldouts.Location = new System.Drawing.Point(0, 0);
|
this.listBoxFoldouts.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.listBoxFoldouts.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.listBoxFoldouts.Name = "listBoxFoldouts";
|
this.listBoxFoldouts.Name = "listBoxFoldouts";
|
||||||
this.listBoxFoldouts.Size = new System.Drawing.Size(334, 116);
|
this.listBoxFoldouts.Size = new System.Drawing.Size(334, 116);
|
||||||
this.listBoxFoldouts.TabIndex = 0;
|
this.listBoxFoldouts.TabIndex = 0;
|
||||||
@ -93,16 +95,17 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
// groupSteps
|
// groupSteps
|
||||||
//
|
//
|
||||||
|
this.groupSteps.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.groupSteps.CanvasColor = System.Drawing.SystemColors.Control;
|
this.groupSteps.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.groupSteps.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.groupSteps.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
this.groupSteps.Controls.Add(this.btnClearAll);
|
this.groupSteps.Controls.Add(this.lstCBSteps);
|
||||||
this.groupSteps.Controls.Add(this.btnClear);
|
|
||||||
this.groupSteps.Controls.Add(this.btnSave);
|
|
||||||
this.groupSteps.Controls.Add(this.lblStepSelect);
|
this.groupSteps.Controls.Add(this.lblStepSelect);
|
||||||
this.groupSteps.Controls.Add(this.lvSteps);
|
this.groupSteps.Location = new System.Drawing.Point(0, 217);
|
||||||
this.groupSteps.Location = new System.Drawing.Point(0, 142);
|
this.groupSteps.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.groupSteps.Name = "groupSteps";
|
this.groupSteps.Name = "groupSteps";
|
||||||
this.groupSteps.Size = new System.Drawing.Size(337, 476);
|
this.groupSteps.Size = new System.Drawing.Size(340, 487);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@ -134,11 +137,24 @@ namespace Volian.Controls.Library
|
|||||||
this.groupSteps.TabIndex = 1;
|
this.groupSteps.TabIndex = 1;
|
||||||
this.groupSteps.Text = "Steps";
|
this.groupSteps.Text = "Steps";
|
||||||
//
|
//
|
||||||
|
// lblStepSelect
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
this.lblStepSelect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
|
this.lblStepSelect.Location = new System.Drawing.Point(3, 2);
|
||||||
|
this.lblStepSelect.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
|
this.lblStepSelect.Name = "lblStepSelect";
|
||||||
|
this.lblStepSelect.Size = new System.Drawing.Size(296, 23);
|
||||||
|
this.lblStepSelect.TabIndex = 1;
|
||||||
|
//
|
||||||
// btnSave
|
// btnSave
|
||||||
//
|
//
|
||||||
this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||||
this.btnSave.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
this.btnSave.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||||
this.btnSave.Location = new System.Drawing.Point(3, 42);
|
this.btnSave.Location = new System.Drawing.Point(21, 22);
|
||||||
|
this.btnSave.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.btnSave.Name = "btnSave";
|
this.btnSave.Name = "btnSave";
|
||||||
this.btnSave.Size = new System.Drawing.Size(101, 23);
|
this.btnSave.Size = new System.Drawing.Size(101, 23);
|
||||||
this.btnSave.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
this.btnSave.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
@ -146,63 +162,50 @@ namespace Volian.Controls.Library
|
|||||||
this.btnSave.Text = "Save Selection";
|
this.btnSave.Text = "Save Selection";
|
||||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||||
//
|
//
|
||||||
// lblStepSelect
|
// pnlButtons
|
||||||
//
|
//
|
||||||
|
this.pnlButtons.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.pnlButtons.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
|
this.pnlButtons.Controls.Add(this.btnSave);
|
||||||
|
this.pnlButtons.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.pnlButtons.Location = new System.Drawing.Point(0, 154);
|
||||||
|
this.pnlButtons.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
|
this.pnlButtons.Name = "pnlButtons";
|
||||||
|
this.pnlButtons.Size = new System.Drawing.Size(340, 63);
|
||||||
|
this.pnlButtons.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||||
|
this.pnlButtons.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
||||||
|
this.pnlButtons.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
|
||||||
|
this.pnlButtons.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||||
|
this.pnlButtons.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||||
|
this.pnlButtons.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||||
|
this.pnlButtons.Style.GradientAngle = 90;
|
||||||
|
this.pnlButtons.TabIndex = 2;
|
||||||
//
|
//
|
||||||
|
// lstCBSteps
|
||||||
//
|
//
|
||||||
//
|
this.lstCBSteps.CheckOnClick = true;
|
||||||
this.lblStepSelect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.lstCBSteps.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.lblStepSelect.Location = new System.Drawing.Point(3, 3);
|
this.lstCBSteps.FormattingEnabled = true;
|
||||||
this.lblStepSelect.Name = "lblStepSelect";
|
this.lstCBSteps.Location = new System.Drawing.Point(0, 0);
|
||||||
this.lblStepSelect.Size = new System.Drawing.Size(296, 23);
|
this.lstCBSteps.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.lblStepSelect.TabIndex = 1;
|
this.lstCBSteps.Name = "lstCBSteps";
|
||||||
//
|
this.lstCBSteps.ScrollAlwaysVisible = true;
|
||||||
// lvSteps
|
this.lstCBSteps.Size = new System.Drawing.Size(334, 463);
|
||||||
//
|
this.lstCBSteps.TabIndex = 1;
|
||||||
this.lvSteps.Dock = System.Windows.Forms.DockStyle.Bottom;
|
|
||||||
this.lvSteps.Location = new System.Drawing.Point(0, 140);
|
|
||||||
this.lvSteps.MultiSelect = false;
|
|
||||||
this.lvSteps.Name = "lvSteps";
|
|
||||||
this.lvSteps.Size = new System.Drawing.Size(331, 313);
|
|
||||||
this.lvSteps.TabIndex = 0;
|
|
||||||
this.lvSteps.UseCompatibleStateImageBehavior = false;
|
|
||||||
this.lvSteps.View = System.Windows.Forms.View.List;
|
|
||||||
this.lvSteps.SelectedIndexChanged += new System.EventHandler(this.lvSteps_SelectedIndexChanged);
|
|
||||||
//
|
|
||||||
// btnClear
|
|
||||||
//
|
|
||||||
this.btnClear.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
|
||||||
this.btnClear.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
|
||||||
this.btnClear.Location = new System.Drawing.Point(3, 71);
|
|
||||||
this.btnClear.Name = "btnClear";
|
|
||||||
this.btnClear.Size = new System.Drawing.Size(101, 23);
|
|
||||||
this.btnClear.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
|
||||||
this.btnClear.TabIndex = 3;
|
|
||||||
this.btnClear.Text = "Clear Selection";
|
|
||||||
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
|
|
||||||
//
|
|
||||||
// btnClearAll
|
|
||||||
//
|
|
||||||
this.btnClearAll.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
|
||||||
this.btnClearAll.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
|
||||||
this.btnClearAll.Location = new System.Drawing.Point(119, 56);
|
|
||||||
this.btnClearAll.Name = "btnClearAll";
|
|
||||||
this.btnClearAll.Size = new System.Drawing.Size(101, 23);
|
|
||||||
this.btnClearAll.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
|
||||||
this.btnClearAll.TabIndex = 4;
|
|
||||||
this.btnClearAll.Text = "Clear All";
|
|
||||||
this.btnClearAll.Click += new System.EventHandler(this.btnClearAll_Click);
|
|
||||||
//
|
//
|
||||||
// DisplayFoldoutMaint
|
// DisplayFoldoutMaint
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.Controls.Add(this.groupSteps);
|
this.Controls.Add(this.groupSteps);
|
||||||
|
this.Controls.Add(this.pnlButtons);
|
||||||
this.Controls.Add(this.groupFoldouts);
|
this.Controls.Add(this.groupFoldouts);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||||
this.Name = "DisplayFoldoutMaint";
|
this.Name = "DisplayFoldoutMaint";
|
||||||
this.Size = new System.Drawing.Size(340, 632);
|
this.Size = new System.Drawing.Size(340, 706);
|
||||||
this.groupFoldouts.ResumeLayout(false);
|
this.groupFoldouts.ResumeLayout(false);
|
||||||
this.groupSteps.ResumeLayout(false);
|
this.groupSteps.ResumeLayout(false);
|
||||||
|
this.pnlButtons.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -212,10 +215,9 @@ namespace Volian.Controls.Library
|
|||||||
private DevComponents.DotNetBar.Controls.GroupPanel groupFoldouts;
|
private DevComponents.DotNetBar.Controls.GroupPanel groupFoldouts;
|
||||||
private System.Windows.Forms.ListBox listBoxFoldouts;
|
private System.Windows.Forms.ListBox listBoxFoldouts;
|
||||||
private DevComponents.DotNetBar.Controls.GroupPanel groupSteps;
|
private DevComponents.DotNetBar.Controls.GroupPanel groupSteps;
|
||||||
private System.Windows.Forms.ListView lvSteps;
|
|
||||||
private DevComponents.DotNetBar.LabelX lblStepSelect;
|
private DevComponents.DotNetBar.LabelX lblStepSelect;
|
||||||
private DevComponents.DotNetBar.ButtonX btnSave;
|
private DevComponents.DotNetBar.ButtonX btnSave;
|
||||||
private DevComponents.DotNetBar.ButtonX btnClear;
|
private DevComponents.DotNetBar.PanelEx pnlButtons;
|
||||||
private DevComponents.DotNetBar.ButtonX btnClearAll;
|
private System.Windows.Forms.CheckedListBox lstCBSteps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,9 +57,9 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
ProcedureInfo pi = MyItemInfo.MyProcedure;
|
ProcedureInfo pi = MyItemInfo.MyProcedure;
|
||||||
listBoxFoldouts.Items.Clear();
|
listBoxFoldouts.Items.Clear();
|
||||||
lvSteps.Items.Clear();
|
lstCBSteps.Items.Clear();
|
||||||
foreach (SectionInfo si in pi.Sections)
|
foreach (SectionInfo si in pi.Sections)
|
||||||
if (si.DisplayText.ToUpper().StartsWith("FOLDOUT"))listBoxFoldouts.Items.Add(si);
|
if (si.DisplayText.ToUpper().StartsWith("FOLDOUT")) listBoxFoldouts.Items.Add(si);
|
||||||
if (listBoxFoldouts.Items.Count > 0) listBoxFoldouts.SelectedIndex = 0;
|
if (listBoxFoldouts.Items.Count > 0) listBoxFoldouts.SelectedIndex = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -68,158 +68,83 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find default step section & use its steps to fill in tree.
|
// find default step section & use its steps to fill in tree.
|
||||||
|
FillInSteps();
|
||||||
ItemInfo startitm = MainStepSection.Steps != null && MainStepSection.Steps.Count > 0 ? MainStepSection.Steps[0] : null;
|
|
||||||
while (startitm != null)
|
|
||||||
{
|
|
||||||
lvSteps.Items.Add(startitm.ToString());
|
|
||||||
lvSteps.Items[lvSteps.Items.Count - 1].Tag = startitm;
|
|
||||||
startitm = (startitm.NextItem != null && startitm.NextItems.Count > 0 ? startitm.NextItems[0] : null);
|
|
||||||
}
|
|
||||||
ColorFoldoutSelection();
|
|
||||||
_Initializing = false;
|
_Initializing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private void ReLoadTree()
|
private void FillInSteps()
|
||||||
{
|
{
|
||||||
lvSteps.Clear();
|
ItemInfo foldOutselected = listBoxFoldouts.SelectedItem as ItemInfo;
|
||||||
ItemInfo startitm = MainStepSection.Steps != null && MainStepSection.Steps.Count > 0 ? MainStepSection.Steps[0] : null;
|
ItemInfo startitm = MainStepSection.Steps != null && MainStepSection.Steps.Count > 0 ? MainStepSection.Steps[0] : null;
|
||||||
while (startitm != null)
|
while (startitm != null)
|
||||||
{
|
{
|
||||||
lvSteps.Items.Add(startitm.ToString());
|
StepConfig sc = startitm.MyConfig as StepConfig;
|
||||||
lvSteps.Items[lvSteps.Items.Count - 1].Tag = startitm;
|
|
||||||
startitm = (startitm.NextItem != null && startitm.NextItems.Count > 0 ? startitm.NextItems[0] : null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void ColorFoldoutSelection()
|
|
||||||
{
|
|
||||||
if (MyItemInfo == null) return;
|
|
||||||
if (listBoxFoldouts.Items[0].ToString() == "No Foldouts Exist") return;
|
|
||||||
if (!_Initializing)ReLoadTree(); // reload tree because the 'caching' was not updating changes.
|
|
||||||
SectionInfo foldOutselected = listBoxFoldouts.Items[listBoxFoldouts.SelectedIndex] as SectionInfo;
|
|
||||||
ItemInfo tmpStep = null; // keep track of previous step, so can set _lastStep;
|
|
||||||
_firstStep = null;
|
|
||||||
_lastStep = null;
|
|
||||||
for (int i = 0; i<lvSteps.Items.Count;i++)
|
|
||||||
{
|
|
||||||
ItemInfo ii = lvSteps.Items[i].Tag as ItemInfo;
|
|
||||||
StepConfig sc = ii.MyConfig as StepConfig;
|
|
||||||
if (sc != null)
|
if (sc != null)
|
||||||
{
|
{
|
||||||
if (sc.Step_FloatingFoldout == foldOutselected.ItemID)
|
if (sc.Step_FloatingFoldout == foldOutselected.ItemID)
|
||||||
{
|
{
|
||||||
if (_firstStep == null) _firstStep = ii;
|
lstCBSteps.Items.Add(startitm, CheckState.Checked);
|
||||||
tmpStep = ii;
|
|
||||||
lvSteps.Items[i].BackColor = Color.Aquamarine;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lvSteps.Items[i].BackColor = lvSteps.BackColor;
|
lstCBSteps.Items.Add(startitm, CheckState.Unchecked);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
lstCBSteps.Items.Add(startitm, CheckState.Unchecked);
|
||||||
|
startitm = (startitm.NextItem != null && startitm.NextItems.Count > 0 ? startitm.NextItems[0] : null);
|
||||||
}
|
}
|
||||||
_lastStep = tmpStep;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listBoxFoldouts_SelectedIndexChanged(object sender, EventArgs e)
|
private void listBoxFoldouts_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ColorFoldoutSelection();
|
ItemInfo foldOutselected = listBoxFoldouts.SelectedItem as ItemInfo;
|
||||||
lblStepSelect.Text = "Select First Step";
|
int itemInList = 0;
|
||||||
}
|
for (int i = 0; i < lstCBSteps.Items.Count; i++)
|
||||||
private int _firstIndexForSelect = -1;
|
|
||||||
private void lvSteps_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (lvSteps.SelectedIndices == null || lvSteps.SelectedIndices.Count == 0) return;
|
|
||||||
if (lblStepSelect.Text.Contains("Select First Step"))
|
|
||||||
{
|
{
|
||||||
// clear out background from list, and change label for instruct.,
|
ItemInfo startitm = lstCBSteps.Items[i] as ItemInfo;
|
||||||
// also set _firstStep to this one.
|
StepConfig sc = startitm.MyConfig as StepConfig;
|
||||||
for (int i = 0; i < lvSteps.Items.Count; i++) lvSteps.Items[i].BackColor = lvSteps.BackColor;
|
if (sc != null)
|
||||||
lblStepSelect.Text = "Select Last Step";
|
lstCBSteps.SetItemChecked(itemInList, sc.Step_FloatingFoldout == foldOutselected.ItemID);
|
||||||
_firstIndexForSelect = lvSteps.SelectedIndices[0];
|
else
|
||||||
_firstStep = (ItemInfo)lvSteps.Items[_firstIndexForSelect].Tag;
|
lstCBSteps.SetItemChecked(itemInList, false);
|
||||||
}
|
itemInList++;
|
||||||
else
|
|
||||||
{
|
|
||||||
int lastind = lvSteps.SelectedIndices[0];
|
|
||||||
_lastStep = (ItemInfo)lvSteps.Items[lastind].Tag;
|
|
||||||
for (int i = _firstIndexForSelect; i < lastind; i++)
|
|
||||||
lvSteps.Items[i].BackColor = Color.Aquamarine;
|
|
||||||
lblStepSelect.Text = "Save or ReSelect First Step";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnSave_Click(object sender, EventArgs e)
|
private void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
lblStepSelect.Text = "Select First Step";
|
SectionInfo foldOutselected = listBoxFoldouts.SelectedItem as SectionInfo;
|
||||||
// for all selected steps, set their config floating foldout item to
|
int itemInList = 0;
|
||||||
// the selected foldout.
|
for (int i = 0; i < lstCBSteps.Items.Count; i++)
|
||||||
bool sav = false;
|
|
||||||
SectionInfo foldOutselected = listBoxFoldouts.Items[listBoxFoldouts.SelectedIndex] as SectionInfo;
|
|
||||||
|
|
||||||
foreach (ItemInfo ii in MainStepSection.Steps)
|
|
||||||
{
|
{
|
||||||
if (ii.ItemID == _firstStep.ItemID)
|
bool savit = false;
|
||||||
sav = true;
|
ItemInfo startitm = lstCBSteps.Items[i] as ItemInfo;
|
||||||
if (sav)
|
StepConfig sc = startitm.MyConfig as StepConfig;
|
||||||
|
if (lstCBSteps.GetItemChecked(itemInList)) // associate with foldout (if not already)
|
||||||
{
|
{
|
||||||
StepConfig sc = ii.MyConfig as StepConfig;
|
if (sc == null || sc != null && sc.Step_FloatingFoldout != foldOutselected.ItemID)
|
||||||
sc.Step_FloatingFoldout = foldOutselected.ItemID;
|
{
|
||||||
using (Item itm = ii.Get())
|
sc.Step_FloatingFoldout = foldOutselected.ItemID;
|
||||||
|
savit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // remove association if exists
|
||||||
|
{
|
||||||
|
if (sc != null && sc.Step_FloatingFoldout == foldOutselected.ItemID)
|
||||||
|
{
|
||||||
|
sc.Step_FloatingFoldout = 0;
|
||||||
|
savit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
itemInList++;
|
||||||
|
if (savit)
|
||||||
|
{
|
||||||
|
using (Item itm = startitm.Get())
|
||||||
{
|
{
|
||||||
itm.MyContent.Config = sc.ToString();
|
itm.MyContent.Config = sc.ToString();
|
||||||
itm.MyContent.DTS = DateTime.Now;
|
itm.MyContent.DTS = DateTime.Now;
|
||||||
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
|
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
itm.Save();
|
itm.Save();
|
||||||
}
|
}
|
||||||
if (ii.ItemID == _lastStep.ItemID) sav = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnClear_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
lblStepSelect.Text = "Select First Step";
|
|
||||||
// for all selected steps, clear their config floating foldout item
|
|
||||||
bool sav = false;
|
|
||||||
SectionInfo foldOutselected = listBoxFoldouts.Items[listBoxFoldouts.SelectedIndex] as SectionInfo;
|
|
||||||
if (_firstStep == null || _lastStep == null) return;
|
|
||||||
foreach (ItemInfo ii in MainStepSection.Steps)
|
|
||||||
{
|
|
||||||
if (ii.ItemID == _firstStep.ItemID)
|
|
||||||
sav = true;
|
|
||||||
if (sav)
|
|
||||||
{
|
|
||||||
StepConfig sc = ii.MyConfig as StepConfig;
|
|
||||||
sc.Step_FloatingFoldout = 0;
|
|
||||||
using (Item itm = ii.Get())
|
|
||||||
{
|
|
||||||
itm.MyContent.Config = sc.ToString();
|
|
||||||
itm.MyContent.DTS = DateTime.Now;
|
|
||||||
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
|
|
||||||
itm.Save();
|
|
||||||
}
|
|
||||||
if (ii.ItemID == _lastStep.ItemID) sav = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ColorFoldoutSelection();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnClearAll_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
foreach (ItemInfo ii in MainStepSection.Steps)
|
|
||||||
{
|
|
||||||
StepConfig sc = ii.MyConfig as StepConfig;
|
|
||||||
sc.Step_FloatingFoldout = 0;
|
|
||||||
using (Item itm = ii.Get())
|
|
||||||
{
|
|
||||||
itm.MyContent.Config = sc.ToString();
|
|
||||||
itm.MyContent.DTS = DateTime.Now;
|
|
||||||
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
|
|
||||||
itm.Save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ColorFoldoutSelection();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,12 +82,12 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
if (bxIndx != null)
|
if (bxIndx != null)
|
||||||
{
|
{
|
||||||
if (box != null)
|
if (box != null)
|
||||||
{
|
{
|
||||||
box.Height = yoff - box.YOffset; // new height, with children
|
box.Height = yoff - box.YOffset; // new height, with children
|
||||||
if (childItemInfo.MyHeader != null)
|
//if (childItemInfo.MyHeader != null)
|
||||||
yoff += vlnPrintObject.SixLinesPerInch * 2;
|
// yoff += vlnPrintObject.SixLinesPerInch * 2;
|
||||||
}
|
}
|
||||||
box = new vlnBox();
|
box = new vlnBox();
|
||||||
box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
||||||
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
||||||
@ -698,8 +698,8 @@ namespace Volian.Print.Library
|
|||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
||||||
DebugText.WriteLine("Paginate2");
|
DebugText.WriteLine("Paginate2");
|
||||||
if (MyItemInfo.FoldoutIndex()>-1)
|
if (MyItemInfo.MyHLS.FoldoutIndex()>-1)
|
||||||
PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex()); // temporary foldout
|
PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.MyHLS.FoldoutIndex()); // temporary foldout
|
||||||
|
|
||||||
// if there is a 'container vlnbox' around the HLS, flag that the drawn box must also break:
|
// if there is a 'container vlnbox' around the HLS, flag that the drawn box must also break:
|
||||||
if (MyHighLevelParagraph != null && MyHighLevelParagraph.PartsContainer != null && MyHighLevelParagraph.PartsContainer.Count > 0)
|
if (MyHighLevelParagraph != null && MyHighLevelParagraph.PartsContainer != null && MyHighLevelParagraph.PartsContainer.Count > 0)
|
||||||
@ -782,6 +782,18 @@ namespace Volian.Print.Library
|
|||||||
// If the flag is 0 or 1, just put the end message out right below this vlnParagraph:
|
// If the flag is 0 or 1, just put the end message out right below this vlnParagraph:
|
||||||
float msg_yLocation = CalculateYLocation(yPageStart - YBottomMost, yTopMargin);
|
float msg_yLocation = CalculateYLocation(yPageStart - YBottomMost, yTopMargin);
|
||||||
|
|
||||||
|
// the following is for IP3 - it was commented out so that an update could be put on
|
||||||
|
// before this was tested.
|
||||||
|
// if end message has {par}, remove these but add a line for each.
|
||||||
|
//int parindx = myMsg.IndexOf("{par}");
|
||||||
|
//bool foundpar = false;
|
||||||
|
//while (parindx > -1)
|
||||||
|
//{
|
||||||
|
// foundpar = true;
|
||||||
|
// msg_yLocation += SixLinesPerInch;
|
||||||
|
// parindx = myMsg.IndexOf("{par}", parindx + 1);
|
||||||
|
//}
|
||||||
|
//if (foundpar) myMsg = myMsg.Replace("{par}", "");
|
||||||
// use the 'flag' to position the message.
|
// use the 'flag' to position the message.
|
||||||
if (docstyle.End.Flag > 2) // >2 position at an absolute location defined by docstyle.End.Flag.
|
if (docstyle.End.Flag > 2) // >2 position at an absolute location defined by docstyle.End.Flag.
|
||||||
{
|
{
|
||||||
@ -2197,6 +2209,7 @@ namespace Volian.Print.Library
|
|||||||
if (itemInfo.FormatStepData.NumberHighLevel && (itemInfo.MyHLS.RNOs == null || itemInfo.MyHLS.RNOs.Count<=0))
|
if (itemInfo.FormatStepData.NumberHighLevel && (itemInfo.MyHLS.RNOs == null || itemInfo.MyHLS.RNOs.Count<=0))
|
||||||
{
|
{
|
||||||
// add in the size that an RNO off HLS would take.
|
// add in the size that an RNO off HLS would take.
|
||||||
|
tabWidth += itemInfo.MyTab.RNOTabWidthAdjust;
|
||||||
XOffset += tabWidth;
|
XOffset += tabWidth;
|
||||||
if (myTab != null) myTab.XOffset += tabWidth;
|
if (myTab != null) myTab.XOffset += tabWidth;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user