This commit is contained in:
Kathy Ruffing 2008-11-19 14:05:13 +00:00
parent ad658956bb
commit 183026d98d
3 changed files with 754 additions and 0 deletions

View File

@ -0,0 +1,353 @@
namespace Volian.Controls.Library
{
partial class DisplayTags
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupPanelMisc = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbCAS = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmbCheckoff = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.groupPanelCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.checkedListBoxApplic = new System.Windows.Forms.CheckedListBox();
this.groupPanelApplic = new DevComponents.DotNetBar.Controls.GroupPanel();
this.groupPanelChgBar = new DevComponents.DotNetBar.Controls.GroupPanel();
this.rbChgBarOff = new System.Windows.Forms.RadioButton();
this.rbChgBarOn = new System.Windows.Forms.RadioButton();
this.groupPanelChgStepType = new DevComponents.DotNetBar.Controls.GroupPanel();
this.lblNoTypeChgReason = new DevComponents.DotNetBar.LabelX();
this.cbChgAll = new System.Windows.Forms.CheckBox();
this.listBoxStepTypes = new System.Windows.Forms.ListBox();
this.groupPanelMisc.SuspendLayout();
this.groupPanelCheckoff.SuspendLayout();
this.groupPanelApplic.SuspendLayout();
this.groupPanelChgBar.SuspendLayout();
this.groupPanelChgStepType.SuspendLayout();
this.SuspendLayout();
//
// groupPanelMisc
//
this.groupPanelMisc.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelMisc.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelMisc.Controls.Add(this.cbCAS);
this.groupPanelMisc.Controls.Add(this.cbPageBreak);
this.groupPanelMisc.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelMisc.Location = new System.Drawing.Point(0, 0);
this.groupPanelMisc.Name = "groupPanelMisc";
this.groupPanelMisc.Size = new System.Drawing.Size(230, 86);
//
//
//
this.groupPanelMisc.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.groupPanelMisc.Style.BackColorGradientAngle = 90;
this.groupPanelMisc.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.groupPanelMisc.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelMisc.Style.BorderBottomWidth = 1;
this.groupPanelMisc.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.groupPanelMisc.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelMisc.Style.BorderLeftWidth = 1;
this.groupPanelMisc.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelMisc.Style.BorderRightWidth = 1;
this.groupPanelMisc.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelMisc.Style.BorderTopWidth = 1;
this.groupPanelMisc.Style.CornerDiameter = 4;
this.groupPanelMisc.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelMisc.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelMisc.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelMisc.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
this.groupPanelMisc.TabIndex = 11;
this.groupPanelMisc.Text = "Miscellaneous";
//
// cbCAS
//
this.cbCAS.Location = new System.Drawing.Point(0, 32);
this.cbCAS.Name = "cbCAS";
this.cbCAS.Size = new System.Drawing.Size(191, 23);
this.cbCAS.TabIndex = 1;
this.cbCAS.Text = "Continuous Action Summary";
this.cbCAS.CheckedChanged += new System.EventHandler(this.cbCAS_CheckedChanged);
//
// cbPageBreak
//
this.cbPageBreak.Location = new System.Drawing.Point(0, 3);
this.cbPageBreak.Name = "cbPageBreak";
this.cbPageBreak.Size = new System.Drawing.Size(191, 23);
this.cbPageBreak.TabIndex = 0;
this.cbPageBreak.Text = "Manual Page Break";
this.cbPageBreak.CheckedChanged += new System.EventHandler(this.cbPageBreak_CheckedChanged);
//
// cmbCheckoff
//
this.cmbCheckoff.DisplayMember = "Text";
this.cmbCheckoff.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbCheckoff.FormattingEnabled = true;
this.cmbCheckoff.ItemHeight = 17;
this.cmbCheckoff.Location = new System.Drawing.Point(4, 20);
this.cmbCheckoff.Name = "cmbCheckoff";
this.cmbCheckoff.Size = new System.Drawing.Size(189, 23);
this.cmbCheckoff.TabIndex = 0;
this.cmbCheckoff.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmbCheckoff.WatermarkText = "select signoff / checkoff";
//
// groupPanelCheckoff
//
this.groupPanelCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelCheckoff.Controls.Add(this.cmbCheckoff);
this.groupPanelCheckoff.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelCheckoff.Location = new System.Drawing.Point(0, 365);
this.groupPanelCheckoff.Name = "groupPanelCheckoff";
this.groupPanelCheckoff.Size = new System.Drawing.Size(230, 115);
//
//
//
this.groupPanelCheckoff.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.groupPanelCheckoff.Style.BackColorGradientAngle = 90;
this.groupPanelCheckoff.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.groupPanelCheckoff.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelCheckoff.Style.BorderBottomWidth = 1;
this.groupPanelCheckoff.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.groupPanelCheckoff.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelCheckoff.Style.BorderLeftWidth = 1;
this.groupPanelCheckoff.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelCheckoff.Style.BorderRightWidth = 1;
this.groupPanelCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelCheckoff.Style.BorderTopWidth = 1;
this.groupPanelCheckoff.Style.CornerDiameter = 4;
this.groupPanelCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelCheckoff.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelCheckoff.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
this.groupPanelCheckoff.TabIndex = 8;
this.groupPanelCheckoff.Text = "Signoff / Checkoff";
this.groupPanelCheckoff.VisibleChanged += new System.EventHandler(this.groupPanelCheckoff_VisibleChanged);
//
// checkedListBoxApplic
//
this.checkedListBoxApplic.CheckOnClick = true;
this.checkedListBoxApplic.FormattingEnabled = true;
this.checkedListBoxApplic.Items.AddRange(new object[] {
"Unit 1",
"Unit 2",
"Unit 3",
"Unit 4"});
this.checkedListBoxApplic.Location = new System.Drawing.Point(3, 3);
this.checkedListBoxApplic.Name = "checkedListBoxApplic";
this.checkedListBoxApplic.Size = new System.Drawing.Size(202, 89);
this.checkedListBoxApplic.TabIndex = 1;
//
// groupPanelApplic
//
this.groupPanelApplic.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelApplic.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelApplic.Controls.Add(this.checkedListBoxApplic);
this.groupPanelApplic.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelApplic.Location = new System.Drawing.Point(0, 480);
this.groupPanelApplic.Name = "groupPanelApplic";
this.groupPanelApplic.Size = new System.Drawing.Size(230, 140);
//
//
//
this.groupPanelApplic.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.groupPanelApplic.Style.BackColorGradientAngle = 90;
this.groupPanelApplic.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.groupPanelApplic.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelApplic.Style.BorderBottomWidth = 1;
this.groupPanelApplic.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.groupPanelApplic.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelApplic.Style.BorderLeftWidth = 1;
this.groupPanelApplic.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelApplic.Style.BorderRightWidth = 1;
this.groupPanelApplic.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelApplic.Style.BorderTopWidth = 1;
this.groupPanelApplic.Style.CornerDiameter = 4;
this.groupPanelApplic.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelApplic.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelApplic.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelApplic.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
this.groupPanelApplic.TabIndex = 17;
this.groupPanelApplic.Text = "Applicability";
this.groupPanelApplic.Visible = false;
//
// groupPanelChgBar
//
this.groupPanelChgBar.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelChgBar.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelChgBar.Controls.Add(this.rbChgBarOff);
this.groupPanelChgBar.Controls.Add(this.rbChgBarOn);
this.groupPanelChgBar.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelChgBar.Location = new System.Drawing.Point(0, 86);
this.groupPanelChgBar.Name = "groupPanelChgBar";
this.groupPanelChgBar.Size = new System.Drawing.Size(230, 100);
//
//
//
this.groupPanelChgBar.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.groupPanelChgBar.Style.BackColorGradientAngle = 90;
this.groupPanelChgBar.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.groupPanelChgBar.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgBar.Style.BorderBottomWidth = 1;
this.groupPanelChgBar.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.groupPanelChgBar.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgBar.Style.BorderLeftWidth = 1;
this.groupPanelChgBar.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgBar.Style.BorderRightWidth = 1;
this.groupPanelChgBar.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgBar.Style.BorderTopWidth = 1;
this.groupPanelChgBar.Style.CornerDiameter = 4;
this.groupPanelChgBar.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelChgBar.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelChgBar.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelChgBar.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
this.groupPanelChgBar.TabIndex = 18;
this.groupPanelChgBar.Text = "Change Bar";
//
// rbChgBarOff
//
this.rbChgBarOff.AutoSize = true;
this.rbChgBarOff.Location = new System.Drawing.Point(4, 43);
this.rbChgBarOff.Name = "rbChgBarOff";
this.rbChgBarOff.Size = new System.Drawing.Size(56, 21);
this.rbChgBarOff.TabIndex = 2;
this.rbChgBarOff.TabStop = true;
this.rbChgBarOff.Text = "OFF";
this.rbChgBarOff.UseVisualStyleBackColor = true;
this.rbChgBarOff.CheckedChanged += new System.EventHandler(this.rbChgBarOvrRideOff_CheckedChanged);
//
// rbChgBarOn
//
this.rbChgBarOn.AutoSize = true;
this.rbChgBarOn.Location = new System.Drawing.Point(4, 16);
this.rbChgBarOn.Name = "rbChgBarOn";
this.rbChgBarOn.Size = new System.Drawing.Size(50, 21);
this.rbChgBarOn.TabIndex = 1;
this.rbChgBarOn.TabStop = true;
this.rbChgBarOn.Text = "ON";
this.rbChgBarOn.UseVisualStyleBackColor = true;
this.rbChgBarOn.CheckedChanged += new System.EventHandler(this.rbChgBarOvrRideOn_CheckedChanged);
//
// groupPanelChgStepType
//
this.groupPanelChgStepType.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelChgStepType.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelChgStepType.Controls.Add(this.lblNoTypeChgReason);
this.groupPanelChgStepType.Controls.Add(this.cbChgAll);
this.groupPanelChgStepType.Controls.Add(this.listBoxStepTypes);
this.groupPanelChgStepType.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelChgStepType.Location = new System.Drawing.Point(0, 186);
this.groupPanelChgStepType.Name = "groupPanelChgStepType";
this.groupPanelChgStepType.Size = new System.Drawing.Size(230, 179);
//
//
//
this.groupPanelChgStepType.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.groupPanelChgStepType.Style.BackColorGradientAngle = 90;
this.groupPanelChgStepType.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.groupPanelChgStepType.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgStepType.Style.BorderBottomWidth = 1;
this.groupPanelChgStepType.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.groupPanelChgStepType.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgStepType.Style.BorderLeftWidth = 1;
this.groupPanelChgStepType.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgStepType.Style.BorderRightWidth = 1;
this.groupPanelChgStepType.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelChgStepType.Style.BorderTopWidth = 1;
this.groupPanelChgStepType.Style.CornerDiameter = 4;
this.groupPanelChgStepType.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelChgStepType.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelChgStepType.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelChgStepType.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
this.groupPanelChgStepType.TabIndex = 19;
this.groupPanelChgStepType.Text = "Change Step Type";
//
// lblNoTypeChgReason
//
this.lblNoTypeChgReason.Location = new System.Drawing.Point(3, 35);
this.lblNoTypeChgReason.Name = "lblNoTypeChgReason";
this.lblNoTypeChgReason.Size = new System.Drawing.Size(164, 118);
this.lblNoTypeChgReason.TabIndex = 5;
//
// cbChgAll
//
this.cbChgAll.AutoSize = true;
this.cbChgAll.Location = new System.Drawing.Point(3, 8);
this.cbChgAll.Name = "cbChgAll";
this.cbChgAll.Size = new System.Drawing.Size(153, 21);
this.cbChgAll.TabIndex = 4;
this.cbChgAll.Text = "Change All At Level";
this.cbChgAll.UseVisualStyleBackColor = true;
//
// listBoxStepTypes
//
this.listBoxStepTypes.FormattingEnabled = true;
this.listBoxStepTypes.ItemHeight = 16;
this.listBoxStepTypes.Location = new System.Drawing.Point(3, 35);
this.listBoxStepTypes.Name = "listBoxStepTypes";
this.listBoxStepTypes.Size = new System.Drawing.Size(164, 116);
this.listBoxStepTypes.TabIndex = 3;
this.listBoxStepTypes.SelectedIndexChanged += new System.EventHandler(this.listBoxStepTypes_SelectedIndexChanged);
//
// DisplayTags
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupPanelApplic);
this.Controls.Add(this.groupPanelCheckoff);
this.Controls.Add(this.groupPanelChgStepType);
this.Controls.Add(this.groupPanelChgBar);
this.Controls.Add(this.groupPanelMisc);
this.Name = "DisplayTags";
this.Size = new System.Drawing.Size(230, 630);
this.groupPanelMisc.ResumeLayout(false);
this.groupPanelCheckoff.ResumeLayout(false);
this.groupPanelApplic.ResumeLayout(false);
this.groupPanelChgBar.ResumeLayout(false);
this.groupPanelChgBar.PerformLayout();
this.groupPanelChgStepType.ResumeLayout(false);
this.groupPanelChgStepType.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelMisc;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbCheckoff;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelCheckoff;
private System.Windows.Forms.CheckedListBox checkedListBoxApplic;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelApplic;
private DevComponents.DotNetBar.Controls.CheckBoxX cbPageBreak;
private DevComponents.DotNetBar.Controls.CheckBoxX cbCAS;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelChgBar;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelChgStepType;
private DevComponents.DotNetBar.LabelX lblNoTypeChgReason;
private System.Windows.Forms.CheckBox cbChgAll;
private System.Windows.Forms.ListBox listBoxStepTypes;
private System.Windows.Forms.RadioButton rbChgBarOff;
private System.Windows.Forms.RadioButton rbChgBarOn;
}
}

View File

@ -0,0 +1,281 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
namespace Volian.Controls.Library
{
public partial class DisplayTags : UserControl
{
#region Properties
private ItemInfo _CurItemInfo=null;
private bool _Initalizing = false;
private IList<int> _MyStepTypeInd = null; // use to keep track of step types put in step type menu
private StepRTB _NotVisibleRTB = null;
private StepRTB _MyRTB;
public StepRTB MyRTB
{
get { return _MyRTB; }
set
{
if (!Visible)
{
_NotVisibleRTB = value;
return;
}
_NotVisibleRTB = null;
if (value == null)
{
ClearControls();
return;
}
if (_CurItemInfo != null && _CurItemInfo.ItemID == value.MyItemInfo.ItemID) return;
if (!value.MyItemInfo.IsStep)
{
ClearControls();
return;
}
_MyRTB = value;
_CurItemInfo = MyRTB.MyItemInfo;
TagsFillIn();
}
}
#endregion
#region Constructor
public DisplayTags()
{
InitializeComponent();
_MyStepTypeInd = new List<int>();
}
#endregion
#region Initialize Controls
private void ClearControls()
{
cmbCheckoff.Enabled = false;
cbPageBreak.Enabled = false;
cbCAS.Enabled = false;
rbChgBarOff.Enabled = false;
rbChgBarOn.Enabled = false;
listBoxStepTypes.Items.Clear();
_MyStepTypeInd.Clear();
}
private bool StepOverRide()
{
ItemInfo myparent = _CurItemInfo.MyActiveParent as ItemInfo;
if (_CurItemInfo.IsRNO && myparent !=null && myparent.IsHigh)
{
// does the high level step of an RNO have a checkoff, if so it
// can be overridden?
StepConfig sc = myparent.MyConfig as StepConfig;
if (sc != null && sc.Step_CheckOffIndex != -1) return true;
}
return false;
}
private void TagsFillIn()
{
_Initalizing = true;
cbPageBreak.Enabled = true; // these may have been set to false if non-step item was selected.
cbCAS.Enabled = true;
rbChgBarOff.Enabled = true;
rbChgBarOn.Enabled = true;
FormatData fmtdata = _CurItemInfo.ActiveFormat.PlantFormat.FormatData;
StepConfig sc = _CurItemInfo.MyConfig as StepConfig;
// in certain cases, the checkbox control should be disabled, check for this stuff now...
int formatSteptype = _CurItemInfo.FormatStepType;
cmbCheckoff.Enabled = true;
if ((_CurItemInfo.IsCaution || _CurItemInfo.IsNote) & !fmtdata.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
cmbCheckoff.Enabled = false;
if (_CurItemInfo.IsRNO && sc != null && sc.Step_CheckOffIndex != -1 && !fmtdata.StepDataList[formatSteptype].CheckoffSameAsParent)
cmbCheckoff.Enabled = false; // Checkoffs already assigned to RNO.
if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER
if (fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0)
cmbCheckoff.Enabled = false;
if (sc == null) // if there is no config data, Page Break and CAS check boxes are false
{
cbPageBreak.Checked = false;
cbCAS.Checked = false;
}
else // otherwise, get data from config
{
cbPageBreak.Checked = sc.Step_ManualPagebreak;
cbCAS.Checked = sc.Step_CAS;
}
if (!(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0))
{
foreach (CheckOff co in fmtdata.ProcData.CheckOffData.CheckOffList)
{
cmbCheckoff.Items.Add(co.RightCheckOffPrompt);
}
if (sc.Step_CheckOffIndex != -1) cmbCheckoff.SelectedIndex = sc.Step_CheckOffIndex;
}
// change bar setting depends on whether step has changed (dts) as compared to date/time off the
// procedure that it's in.
// There is also an override flag in the config for the step, used to override the change bar to 'off'
// if the date show it as having one, or allow a change bar to be 'on' if there the dates are
// not different. Note also that a user may edit data after the change bar is set to 'on'.
DateTime curDts;
using (Item itm = Item.Get(_CurItemInfo.ItemID))
{
curDts = itm.DTS;
}
// set change bar radio buttons for the default that there is no change
// bar & override sets it to On.
rbChgBarOff.Checked = true;
rbChgBarOn.Text = "ON (Override)";
rbChgBarOff.Text = "OFF";
// if there is no override & a change occurred to the text, there is a
// change bar & override sets it to Off.
if (sc.Step_CBOverride == null)
{
if (curDts > _CurItemInfo.MyProcedure.DTS)
{
rbChgBarOn.Checked = true;
rbChgBarOff.Text = "OFF (Override)";
rbChgBarOn.Text = "ON";
}
}
else
{
// there is override settings in the config... If the date time stamp says that text was changed
// so a change bar should exist - check override to see how change bar controls are set:
// if Override is 'Off' then
if (curDts > _CurItemInfo.MyProcedure.DTS)
{
rbChgBarOff.Checked = (sc.Step_CBOverride == "Off") ? true : false;
rbChgBarOn.Checked = (sc.Step_CBOverride == "On") ? true : false;
rbChgBarOff.Text = "OFF (Override)";
rbChgBarOn.Text = "ON";
}
else // if (curDts <= _CurItemInfo.MyProcedure.DTS && sc.Step_CBOverride == "On")
{
// date time stamp says no change bar should be displayed:
rbChgBarOff.Checked = (sc.Step_CBOverride == "On") ? true : false;
rbChgBarOn.Checked = (sc.Step_CBOverride == "Off") ? true : false;
rbChgBarOff.Text = "OFF";
rbChgBarOn.Text = "ON (Override)";
}
}
// Walk up tree until this step type's parentType is "Base". Start adding menuitems from this step type.
StepData top = fmtdata.StepDataList[formatSteptype];
//int tmpi = formatSteptype;
// RNO is a special case in that it has a parent type of high, for formatting, but does not walk
// up tree to define types that it can be changed into....
if (!_CurItemInfo.IsRNO) top = fmtdata.StepTopUnderBase(top, formatSteptype);
listBoxStepTypes.Items.Clear();
listBoxStepTypes.SelectedIndex = DoListStepTypes(fmtdata, top, fmtdata.StepDataList[formatSteptype].Type);
lblNoTypeChgReason.Visible = !(listBoxStepTypes.Items.Count>0);
listBoxStepTypes.Visible = (listBoxStepTypes.Items.Count>0);
_Initalizing = false;
}
private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType)
{
int cursel=-1;
List<StepDataRetval> sdl = fmtdata.StepGetLevelTypes(topType, ref cursel, curType, _CurItemInfo);
if (sdl==null || sdl.Count==0)
{
if (listBoxStepTypes.Items.Count==0)lblNoTypeChgReason.Text = topType.StepEditData.TypeMenu.NoChgReason;
}
else
{
foreach (StepDataRetval sdr in sdl)
{
listBoxStepTypes.Items.Add(sdr.Name);
_MyStepTypeInd.Add(sdr.Index);
}
}
return cursel;
}
//private void AddToGallery(StepData sd, string curType)
//{
// DevComponents.DotNetBar.ButtonItem bi = new DevComponents.DotNetBar.ButtonItem("btn" + sd.Type, sd.Type);
// bi.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
// bi.Image = this.imageListStepTypes.Images[0];
// bi.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
// bi.Checked = (sd.Type == curType);
// galleryContainerStepTypes.SubItems.Add(bi);
// listBoxStepTypes.Items.Add(sd.Type);
//}
#endregion
#region Events
private void cbPageBreak_CheckedChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
StepConfig sc = _CurItemInfo.MyConfig as StepConfig;
if (sc == null) return;
sc.Step_ManualPagebreak = cbPageBreak.Checked;
}
private void cbCAS_CheckedChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
StepConfig sc = _CurItemInfo.MyConfig as StepConfig;
if (sc == null) return;
sc.Step_CAS = cbCAS.Checked;
}
private void listBoxStepTypes_SelectedIndexChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
FormatData fmtdata = _CurItemInfo.ActiveFormat.PlantFormat.FormatData;
if (cbChgAll.Checked)
{
ItemInfo startitm = _CurItemInfo.FirstSibling;
while (startitm != null)
{
Content cnt = Content.Get(startitm.MyContent.ContentID);
cnt.Type = 20000 + fmtdata.StepDataList[_MyStepTypeInd[listBoxStepTypes.SelectedIndex]].Index;
cnt.Save();
startitm = (startitm.NextItemCount > 0 ? startitm.NextItems[0] : null);
}
cbChgAll.Checked = false;
}
else
{
Content cnt = Content.Get(_CurItemInfo.MyContent.ContentID);
cnt.Type = 20000 + fmtdata.StepDataList[_MyStepTypeInd[listBoxStepTypes.SelectedIndex]].Index;
cnt.Save();
}
}
private void groupPanelCheckoff_VisibleChanged(object sender, EventArgs e)
{
if (Visible==true && _NotVisibleRTB != null) MyRTB = _NotVisibleRTB;
}
private void rbChgBarOvrRideOn_CheckedChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
// if checked, set the config data to 'On'. Otherwise, the 'check' event
// handler for the other control sets the data appropriately.
if (rbChgBarOn.Checked)
{
StepConfig sc = _CurItemInfo.MyConfig as StepConfig;
sc.Step_CBOverride = "On";
}
}
private void rbChgBarOvrRideOff_CheckedChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
// if checked, set the config data to 'On'. Otherwise, the 'check' event
// handler for the other control sets the data appropriately.
if (rbChgBarOff.Checked)
{
StepConfig sc = _CurItemInfo.MyConfig as StepConfig;
sc.Step_CBOverride = "Off";
}
}
#endregion
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>