From 61bea1edc44c324371f8d5670fc2e166f4ff3f15 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 13 Nov 2009 14:14:10 +0000 Subject: [PATCH] --- PROMS/Volian.Controls.Library/StepItem.cs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepItem.cs b/PROMS/Volian.Controls.Library/StepItem.cs index 861b12e6..0c515d3a 100644 --- a/PROMS/Volian.Controls.Library/StepItem.cs +++ b/PROMS/Volian.Controls.Library/StepItem.cs @@ -132,7 +132,8 @@ namespace Volian.Controls.Library { // Update the text to reflect the content change MyStepRTB.MyItemInfo=MyStepRTB.MyItemInfo; // Reset Text - // TODO: Need code to update tabs. + // TODO: Need code to update tabs ? not sure what this is - maybe for + // transitions? } /// /// Used to connect the RichTextBox with the menus and toolbars @@ -931,7 +932,7 @@ namespace Volian.Controls.Library SetAllTabs(); } // clear tabs, clears then all so that next 'get' will calculate new. - private void SetAllTabs() + public void SetAllTabs() { TabFormat = null; // reset TabFormat SetupHeader(); @@ -1032,7 +1033,7 @@ namespace Volian.Controls.Library DialogResult ans = MessageBox.Show("Transitions exist to this step and cannot be adjusted automatically." + "\r\n\r\nDo you want to be placed on the " + (exTrans.Count > 1 ? "first " : "") + "substep with the problem Transition?" + "\r\n\r\nSubsteps with Problem Transitions" + - Summarize(exTrans) , + exTrans.Summarize(), "Cannot Delete This Step", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (ans == DialogResult.Yes) { @@ -1049,7 +1050,7 @@ namespace Volian.Controls.Library DialogResult ans = MessageBox.Show("Transitions exist to substeps of this step and cannot be adjusted automatically." + "\r\n\r\nDo you want to be placed on the " + (exTrans.Count > 1 ? "first " : "") + "substep with the problem Transition?" + "\r\n\r\nSubsteps with Problem Transitions:" + - Summarize(exTrans), + exTrans.Summarize(), "Cannot Delete This Step", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (ans == DialogResult.Yes) { @@ -1060,13 +1061,6 @@ namespace Volian.Controls.Library else MessageBox.Show(ex.Message, "SQL Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } - private string Summarize(TransitionInfoList exTrans) - { - StringBuilder sb = new StringBuilder(""); - foreach (TransitionInfo trans in exTrans) - sb.Append("\r\n" + trans.PathFrom); - return sb.ToString(); - } private void RemoveFromParentsChildList() { StepItem top = this; @@ -2095,9 +2089,5 @@ namespace Volian.Controls.Library return _MyItemInfo == null ? base.ToString() : string.Format("({0}) {1}", MyID, MyPath); // + "-" + MyItemInfo.MyContent.Text; } #endregion - private void _MyStepRTB_DoubleClick(object sender, EventArgs e) - { - RemoveItem(); - } } }