From 1ef722b9d4c26265982dcaf3bec63903fc1f4bc4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 21 Nov 2011 16:46:58 +0000 Subject: [PATCH] --- .../DisplayTags.Designer.cs | 32 ++++++++++++----- PROMS/Volian.Controls.Library/DisplayTags.cs | 34 ++++++++++++++----- 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTags.Designer.cs b/PROMS/Volian.Controls.Library/DisplayTags.Designer.cs index 77a6ca83..f1f4f2f4 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.Designer.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.Designer.cs @@ -86,10 +86,12 @@ namespace Volian.Controls.Library // // this.groupPanelMisc.StyleMouseDown.Class = ""; + this.groupPanelMisc.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // this.groupPanelMisc.StyleMouseOver.Class = ""; + this.groupPanelMisc.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelMisc.TabIndex = 11; this.groupPanelMisc.Text = "Miscellaneous"; // @@ -100,9 +102,10 @@ namespace Volian.Controls.Library // // this.cbCAS.BackgroundStyle.Class = ""; + this.cbCAS.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.cbCAS.Location = new System.Drawing.Point(0, 32); this.cbCAS.Name = "cbCAS"; - this.cbCAS.Size = new System.Drawing.Size(191, 23); + this.cbCAS.Size = new System.Drawing.Size(187, 17); this.superTooltipTags.SetSuperTooltip(this.cbCAS, new DevComponents.DotNetBar.SuperTooltipInfo("Continuous Action Summary", "", "Include this in the Continuous Action Summary section", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.cbCAS.TabIndex = 1; this.cbCAS.Text = "Continuous Action Summary"; @@ -115,9 +118,10 @@ namespace Volian.Controls.Library // // this.cbPageBreak.BackgroundStyle.Class = ""; + this.cbPageBreak.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.cbPageBreak.Location = new System.Drawing.Point(0, 3); this.cbPageBreak.Name = "cbPageBreak"; - this.cbPageBreak.Size = new System.Drawing.Size(191, 23); + this.cbPageBreak.Size = new System.Drawing.Size(140, 17); this.superTooltipTags.SetSuperTooltip(this.cbPageBreak, new DevComponents.DotNetBar.SuperTooltipInfo("Manual Page Break", "", "When set, starts this step at the top of a page.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.cbPageBreak.TabIndex = 0; this.cbPageBreak.Text = "Manual Page Break"; @@ -126,7 +130,7 @@ namespace Volian.Controls.Library // cmbCheckoff // this.cmbCheckoff.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + | System.Windows.Forms.AnchorStyles.Right))); this.cmbCheckoff.DisplayMember = "Text"; this.cmbCheckoff.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.cmbCheckoff.FormattingEnabled = true; @@ -137,6 +141,7 @@ namespace Volian.Controls.Library 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"; + this.cmbCheckoff.SelectedIndexChanged += new System.EventHandler(this.cmbCheckoff_SelectedIndexChanged); // // groupPanelCheckoff // @@ -172,10 +177,12 @@ namespace Volian.Controls.Library // // this.groupPanelCheckoff.StyleMouseDown.Class = ""; + this.groupPanelCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // this.groupPanelCheckoff.StyleMouseOver.Class = ""; + this.groupPanelCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelCheckoff.TabIndex = 8; this.groupPanelCheckoff.Text = "Signoff / Checkoff"; this.groupPanelCheckoff.VisibleChanged += new System.EventHandler(this.groupPanelCheckoff_VisibleChanged); @@ -183,7 +190,7 @@ namespace Volian.Controls.Library // checkedListBoxApplic // this.checkedListBoxApplic.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + | System.Windows.Forms.AnchorStyles.Right))); this.checkedListBoxApplic.CheckOnClick = true; this.checkedListBoxApplic.FormattingEnabled = true; this.checkedListBoxApplic.Items.AddRange(new object[] { @@ -230,10 +237,12 @@ namespace Volian.Controls.Library // // this.groupPanelApplic.StyleMouseDown.Class = ""; + this.groupPanelApplic.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // this.groupPanelApplic.StyleMouseOver.Class = ""; + this.groupPanelApplic.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelApplic.TabIndex = 17; this.groupPanelApplic.Text = "Applicability"; this.groupPanelApplic.Visible = false; @@ -274,10 +283,12 @@ namespace Volian.Controls.Library // // this.groupPanelChgBar.StyleMouseDown.Class = ""; + this.groupPanelChgBar.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // this.groupPanelChgBar.StyleMouseOver.Class = ""; + this.groupPanelChgBar.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelChgBar.TabIndex = 18; this.groupPanelChgBar.Text = "Change Bar"; // @@ -288,7 +299,7 @@ namespace Volian.Controls.Library this.rbChgBarOff.Name = "rbChgBarOff"; this.rbChgBarOff.Size = new System.Drawing.Size(56, 21); this.superTooltipTags.SetSuperTooltip(this.rbChgBarOff, new DevComponents.DotNetBar.SuperTooltipInfo("Change Bar OFF", "", "Turn change bar off. Note that \'OVERRIDE\' will turn off a change bar even though" + - " text is changed.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); + " text is changed.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.rbChgBarOff.TabIndex = 2; this.rbChgBarOff.TabStop = true; this.rbChgBarOff.Text = "OFF"; @@ -345,22 +356,25 @@ namespace Volian.Controls.Library // // this.groupPanelChgStepType.StyleMouseDown.Class = ""; + this.groupPanelChgStepType.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // this.groupPanelChgStepType.StyleMouseOver.Class = ""; + this.groupPanelChgStepType.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelChgStepType.TabIndex = 19; this.groupPanelChgStepType.Text = "Change Step Type"; // // lblNoTypeChgReason // this.lblNoTypeChgReason.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + | System.Windows.Forms.AnchorStyles.Right))); this.lblNoTypeChgReason.BackColor = System.Drawing.Color.Transparent; // // // this.lblNoTypeChgReason.BackgroundStyle.Class = ""; + this.lblNoTypeChgReason.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.lblNoTypeChgReason.ForeColor = System.Drawing.Color.Red; this.lblNoTypeChgReason.Location = new System.Drawing.Point(3, 35); this.lblNoTypeChgReason.Name = "lblNoTypeChgReason"; @@ -375,7 +389,7 @@ namespace Volian.Controls.Library this.cbChgAll.Name = "cbChgAll"; this.cbChgAll.Size = new System.Drawing.Size(153, 21); this.superTooltipTags.SetSuperTooltip(this.cbChgAll, new DevComponents.DotNetBar.SuperTooltipInfo("Change Step Type - All At Level", "", "When checked, all steps at the level of current step will have their step type ch" + - "anged to the selected type in list below...", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); + "anged to the selected type in list below...", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.cbChgAll.TabIndex = 4; this.cbChgAll.Text = "Change All At Level"; this.cbChgAll.UseVisualStyleBackColor = false; @@ -383,14 +397,14 @@ namespace Volian.Controls.Library // listBoxStepTypes // this.listBoxStepTypes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + | System.Windows.Forms.AnchorStyles.Right))); 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(218, 116); this.superTooltipTags.SetSuperTooltip(this.listBoxStepTypes, new DevComponents.DotNetBar.SuperTooltipInfo("Possible Step Types", "", "This list allows change of type showing all selections of any possible step type " + - "for the current step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); + "for the current step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.listBoxStepTypes.TabIndex = 3; this.listBoxStepTypes.SelectedIndexChanged += new System.EventHandler(this.listBoxStepTypes_SelectedIndexChanged); // diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index f9825b5a..532fdb75 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -164,15 +164,16 @@ namespace Volian.Controls.Library if (CurItemInfo.IsHigh) 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; - //} + + if (!(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0)) + { + cmbCheckoff.Items.Clear(); + foreach (CheckOff co in fmtdata.ProcData.CheckOffData.CheckOffList) + { + cmbCheckoff.Items.Add(co.MenuItem); + } + 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. @@ -375,6 +376,21 @@ namespace Volian.Controls.Library } } } + private void cmbCheckoff_SelectedIndexChanged(object sender, EventArgs e) + { + if (_Initalizing) return; + + // set selected index in the step's config. + int indx = cmbCheckoff.SelectedIndex; + StepConfig sc = CurItemInfo.MyConfig as StepConfig; + sc.Step_CheckOffIndex = indx; + using (Content cnt = Content.Get(CurItemInfo.MyContent.ContentID)) + { + cnt.DTS = CurItemInfo.MyProcedure.DTS; + cnt.UserID = CurItemInfo.MyProcedure.UserID; + cnt.Save(); + } + } #endregion } }