Browse Source

编辑器判断内容格式优化

cxs 1 year ago
parent
commit
7c3109d596

+ 7 - 2
OTSPartA_STDEditor/Attributes.cs

@@ -75,7 +75,12 @@ namespace OTSPartA_STDEditor
         private void EditorEvent_EditEnded(object sender, EventArgs e)
         {
             SourceGrid.CellContext context = (SourceGrid.CellContext)sender;
-            m_MainForm.ChangeSTDRuleName(Grid_Attributes[context.Position.Row, context.Position.Column].Value.ToString());
+            //if(Grid_Attributes[context.Position.Row, context.Position.Column].Value==null)
+            //{
+            //    MessageBox.Show("The name of rule cannot be null!", "warnning");
+            //    return;
+            //}
+            m_MainForm.ChangeSTDRuleName(Convert.ToString( Grid_Attributes[context.Position.Row, context.Position.Column].Value));
         }
 
 
@@ -149,7 +154,7 @@ namespace OTSPartA_STDEditor
             Grid_Attributes[8, 1] = new SourceGrid.Cells.Cell("", typeof(int));
             Grid_Attributes[9, 1] = new SourceGrid.Cells.Cell("", typeof(string));
             Grid_Attributes[10, 1] = new SourceGrid.Cells.Cell("", typeof(string));
-            //Grid_Attributes[9, 1] = new SourceGrid.Cells.Cell("", typeof(string));
+            Grid_Attributes[11, 1] = new SourceGrid.Cells.Cell("", typeof(string));
 
             Grid_Attributes[0, 0].ColumnSpan = 2;
             Grid_Attributes.AutoStretchColumnsToFitWidth = true;

+ 5 - 14
OTSPartA_STDEditor/ReferenceLibrary.cs

@@ -148,7 +148,7 @@ namespace OTSPartA_STDEditor
                 DataTable dtGroup = dsGroup.Tables[0];
                 if (dtGroup != null)
                 {
-                    if (dtGroup.Rows.Count > 0)
+                    if (dtGroup.Rows.Count >= 0)
                     {
                         foreach (DataRow item in dtGroup.Rows)
                         {
@@ -358,10 +358,7 @@ namespace OTSPartA_STDEditor
                 //规则名称不为空
                 if (m_SubMidWindow.m_MainForm.m_STDRuleslist.Grid_Minerals[i, 0].Value.ToString().Replace(" ", "").Trim() != "")
                 {
-                    if (m_SubMidWindow.m_MainForm.CheckAttributes())
-                    {
-                        if (m_SubMidWindow.m_MainForm.Checktextbox_STDEditor())
-                        {
+                    
                             m_SubMidWindow.m_MainForm.SaveDataOfSelRule(i, j);
 
                             PropGrid.Focus(true);
@@ -396,9 +393,7 @@ namespace OTSPartA_STDEditor
                             m_SubMidWindow.m_MainForm.m_STDRuleslist.Refresh();
 
                             m_SubMidWindow.m_MainForm.m_STDRuleslist.PreRow = i;
-                        }
-
-                    }
+                       
 
                 }
 
@@ -435,15 +430,11 @@ namespace OTSPartA_STDEditor
                 //规则名称不为空
                 if (m_SubMidWindow.m_MainForm.m_STDRuleslist.Grid_Minerals[i, j].Value.ToString().Replace(" ", "").Trim() != "")
                 {
-                    if (m_SubMidWindow.m_MainForm.CheckAttributes())
-                    {
-                        if (m_SubMidWindow.m_MainForm.Checktextbox_STDEditor())
-                        {
+                    
                             m_SubMidWindow.m_MainForm.SaveDataOfSelRule(i, j);
 
                             AddIntoMainLab();
-                        }
-                    }
+                        
                 }
             }
             else if(i==-1&&j==-1)

+ 28 - 13
OTSPartA_STDEditor/STDEditor.Designer.cs

@@ -37,6 +37,7 @@
             this.textbox_STDEditor = new System.Windows.Forms.TextBox();
             this.groupBox_Data = new System.Windows.Forms.GroupBox();
             this.groupBox_CalculatingSymbols = new System.Windows.Forms.GroupBox();
+            this.button_del = new System.Windows.Forms.Button();
             this.button_0 = new System.Windows.Forms.Button();
             this.button_4 = new System.Windows.Forms.Button();
             this.button_5 = new System.Windows.Forms.Button();
@@ -174,7 +175,6 @@
             this.textbox_STDEditor.Name = "textbox_STDEditor";
             this.textbox_STDEditor.Size = new System.Drawing.Size(1241, 189);
             this.textbox_STDEditor.TabIndex = 2;
-            this.textbox_STDEditor.MouseLeave += new System.EventHandler(this.textbox_STDEditor_MouseLeave);
             // 
             // groupBox_Data
             // 
@@ -189,6 +189,7 @@
             // 
             // groupBox_CalculatingSymbols
             // 
+            this.groupBox_CalculatingSymbols.Controls.Add(this.button_del);
             this.groupBox_CalculatingSymbols.Controls.Add(this.button_0);
             this.groupBox_CalculatingSymbols.Controls.Add(this.button_4);
             this.groupBox_CalculatingSymbols.Controls.Add(this.button_5);
@@ -218,6 +219,19 @@
             this.groupBox_CalculatingSymbols.TabStop = false;
             this.groupBox_CalculatingSymbols.Text = "运算符号";
             // 
+            // button_del
+            // 
+            this.button_del.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.button_del.Font = new System.Drawing.Font("楷体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button_del.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.button_del.Location = new System.Drawing.Point(468, 72);
+            this.button_del.Name = "button_del";
+            this.button_del.Size = new System.Drawing.Size(64, 35);
+            this.button_del.TabIndex = 27;
+            this.button_del.Text = "del";
+            this.button_del.UseVisualStyleBackColor = true;
+            this.button_del.Click += new System.EventHandler(this.button_del_Click);
+            // 
             // button_0
             // 
             this.button_0.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
@@ -270,9 +284,9 @@
             // 
             this.button_Divide.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.button_Divide.Font = new System.Drawing.Font("方正舒体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button_Divide.Location = new System.Drawing.Point(396, 20);
+            this.button_Divide.Location = new System.Drawing.Point(397, 21);
             this.button_Divide.Name = "button_Divide";
-            this.button_Divide.Size = new System.Drawing.Size(42, 35);
+            this.button_Divide.Size = new System.Drawing.Size(31, 35);
             this.button_Divide.TabIndex = 8;
             this.button_Divide.Text = "/";
             this.button_Divide.UseVisualStyleBackColor = true;
@@ -307,9 +321,9 @@
             this.button_Or.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.button_Or.Font = new System.Drawing.Font("楷体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.button_Or.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.button_Or.Location = new System.Drawing.Point(492, 20);
+            this.button_Or.Location = new System.Drawing.Point(434, 22);
             this.button_Or.Name = "button_Or";
-            this.button_Or.Size = new System.Drawing.Size(47, 35);
+            this.button_Or.Size = new System.Drawing.Size(46, 35);
             this.button_Or.TabIndex = 15;
             this.button_Or.Text = "or";
             this.button_Or.UseVisualStyleBackColor = true;
@@ -332,9 +346,9 @@
             this.button_And.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.button_And.Font = new System.Drawing.Font("楷体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.button_And.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.button_And.Location = new System.Drawing.Point(444, 72);
+            this.button_And.Location = new System.Drawing.Point(486, 22);
             this.button_And.Name = "button_And";
-            this.button_And.Size = new System.Drawing.Size(95, 35);
+            this.button_And.Size = new System.Drawing.Size(46, 35);
             this.button_And.TabIndex = 14;
             this.button_And.Text = "and";
             this.button_And.UseVisualStyleBackColor = true;
@@ -368,9 +382,9 @@
             // 
             this.button_Equal.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.button_Equal.Font = new System.Drawing.Font("方正舒体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button_Equal.Location = new System.Drawing.Point(444, 20);
+            this.button_Equal.Location = new System.Drawing.Point(424, 71);
             this.button_Equal.Name = "button_Equal";
-            this.button_Equal.Size = new System.Drawing.Size(42, 35);
+            this.button_Equal.Size = new System.Drawing.Size(39, 35);
             this.button_Equal.TabIndex = 16;
             this.button_Equal.Text = "=";
             this.button_Equal.UseVisualStyleBackColor = true;
@@ -380,7 +394,7 @@
             // 
             this.button_Multiply.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.button_Multiply.Font = new System.Drawing.Font("方正舒体", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button_Multiply.Location = new System.Drawing.Point(348, 20);
+            this.button_Multiply.Location = new System.Drawing.Point(348, 21);
             this.button_Multiply.Name = "button_Multiply";
             this.button_Multiply.Size = new System.Drawing.Size(42, 35);
             this.button_Multiply.TabIndex = 9;
@@ -428,9 +442,9 @@
             // 
             this.button_RightParenthesis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.button_RightParenthesis.Font = new System.Drawing.Font("方正舒体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button_RightParenthesis.Location = new System.Drawing.Point(396, 72);
+            this.button_RightParenthesis.Location = new System.Drawing.Point(386, 72);
             this.button_RightParenthesis.Name = "button_RightParenthesis";
-            this.button_RightParenthesis.Size = new System.Drawing.Size(42, 35);
+            this.button_RightParenthesis.Size = new System.Drawing.Size(32, 35);
             this.button_RightParenthesis.TabIndex = 13;
             this.button_RightParenthesis.Text = ")";
             this.button_RightParenthesis.UseVisualStyleBackColor = true;
@@ -442,7 +456,7 @@
             this.button_LeftParenthesis.Font = new System.Drawing.Font("方正舒体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.button_LeftParenthesis.Location = new System.Drawing.Point(348, 72);
             this.button_LeftParenthesis.Name = "button_LeftParenthesis";
-            this.button_LeftParenthesis.Size = new System.Drawing.Size(42, 35);
+            this.button_LeftParenthesis.Size = new System.Drawing.Size(32, 35);
             this.button_LeftParenthesis.TabIndex = 12;
             this.button_LeftParenthesis.Text = "(";
             this.button_LeftParenthesis.UseVisualStyleBackColor = true;
@@ -670,5 +684,6 @@
         public System.Windows.Forms.DataGridView dataGridView_KeyElements;
         public System.Windows.Forms.DataGridView dataGridView_SubElements;
         private System.Windows.Forms.Button button_PeriodicTableSwitch;
+        private System.Windows.Forms.Button button_del;
     }
 }

+ 26 - 98
OTSPartA_STDEditor/STDEditor.cs

@@ -23,9 +23,9 @@ namespace OTSPartA_STDEditor
 
         public enum Result
         {
-            NoMatched=0,
-            Success=1,
-            Fail=2
+            NoMatched = 0,
+            Success = 1,
+            Fail = 2
         }
 
         public STDEditor(SubMidWindow SubMidWindow)
@@ -38,7 +38,7 @@ namespace OTSPartA_STDEditor
             Y = this.Height;
             setTag(this);
         }
-        public STDEditor(SubMidWindow SubMidWindow,string STDDBaddress)
+        public STDEditor(SubMidWindow SubMidWindow, string STDDBaddress)
         {
             InitializeComponent();
             m_sc = new SqlLiteClass(STDDBaddress);
@@ -571,12 +571,12 @@ namespace OTSPartA_STDEditor
         }
 
 
-        private float X=1;
-        private float Y=1;
+        private float X = 1;
+        private float Y = 1;
         private void STDEditor_Resize(object sender, EventArgs e)
         {
             float newx = (this.Width) / X;
-            float newy = this.Height/ Y;
+            float newy = this.Height / Y;
             AmplificationFactor = newy;
             setControls(newx, newy, this.tabSTDStandrad.TabPages[0]);
             //button_Extend.BackColor = SystemColors.ControlDarkDark;
@@ -598,7 +598,7 @@ namespace OTSPartA_STDEditor
             {
                 if (false)
                 {
-                    
+
                 }
                 else
                 {
@@ -616,7 +616,7 @@ namespace OTSPartA_STDEditor
                     a = Convert.ToSingle(mytag[3]) * newy;
                     con.Top = (int)(a);
 
-                    Single currentSize ;
+                    Single currentSize;
 
                     if (con.Name == "button_Extend")
                     {
@@ -684,96 +684,7 @@ namespace OTSPartA_STDEditor
 
         private void textbox_STDEditor_MouseLeave(object sender, EventArgs e)
         {
-            dataGridView_KeyElements.Rows.Clear();
-            dataGridView_KeyElements.Columns.Clear();
-
-
-            string str_RemoveBlank = textbox_STDEditor.Text.ToString().Replace(" ", "");
-            str_RemoveBlank = str_RemoveBlank.Replace("\r\n", "");
-            str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
-            string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
-            List<string> str_Removeandor = new List<string>();
-            for (int i = 0; i < str_Removeand.Length; i++)
-            {
-                str_Removeandor.AddRange(System.Text.RegularExpressions.Regex.Split(str_Removeand[i], "or", System.Text.RegularExpressions.RegexOptions.None));
-            }
-            List<string> list_all = new List<string>();
-            for (int i = 0; i < str_Removeandor.Count; i++)
-            {
-                list_all.AddRange(str_Removeandor[i].Split(new char[] { '+', '-', '*', '/', '=', '>', '<', '(', ')' }));
-            }
-            List<string> UsingElementL = new List<string>();
-            for (int i = 0; i < list_all.Count; i++)
-            {
-                if (this.comboBox_PeriodicTable.Items.Contains(list_all[i]))
-                {
-                    if (!UsingElementL.Contains(list_all[i]))
-                    {
-                        UsingElementL.Add(list_all[i]);
-                    }
-                }
-            }
 
-            List<string> SubElements = new List<string>();
-            for (int i = 0; i < dataGridView_SubElements.ColumnCount; i++)
-            {
-                if (UsingElementL.Contains(dataGridView_SubElements.Rows[0].Cells[i].Value))
-                {
-                    SubElements.Add(dataGridView_SubElements.Rows[0].Cells[i].Value.ToString());
-                }
-            }
-
-            dataGridView_SubElements.Rows.Clear();
-            dataGridView_SubElements.Columns.Clear();
-
-            for (int i = 0; i < SubElements.Count; i++)
-            {
-                DataGridViewButtonColumn dataGridViewButtonColumn = new DataGridViewButtonColumn();
-                dataGridViewButtonColumn.Name = dataGridView_SubElements.Columns.Count.ToString();
-                dataGridView_SubElements.Columns.Add(dataGridViewButtonColumn);
-                if (dataGridView_SubElements.Rows.Count == 0)
-                {
-                    DataGridViewRow row = new DataGridViewRow();
-                    dataGridView_SubElements.Rows.Add(row);
-                }
-                dataGridView_SubElements.Rows[0].Cells[dataGridView_SubElements.ColumnCount - 1].Value = SubElements[i];
-            }
-
-            if (SubElements.Count > 0)
-            {
-                for (int i = 0; i < UsingElementL.Count; i++)
-                {
-                    if (!SubElements.Contains(UsingElementL[i]))
-                    {
-                        DataGridViewButtonColumn dataGridViewButtonColumn = new DataGridViewButtonColumn();
-                        dataGridViewButtonColumn.Name = dataGridView_KeyElements.Columns.Count.ToString();
-                        dataGridView_KeyElements.Columns.Add(dataGridViewButtonColumn);
-                        if (dataGridView_KeyElements.Rows.Count == 0)
-                        {
-                            DataGridViewRow row = new DataGridViewRow();
-                            dataGridView_KeyElements.Rows.Add(row);
-                        }
-                        dataGridView_KeyElements.Rows[0].Cells[dataGridView_KeyElements.ColumnCount - 1].Value = UsingElementL[i];
-                    }
-                }
-            }
-            else
-            {
-                for (int i = 0; i < UsingElementL.Count; i++)
-                {
-                    DataGridViewButtonColumn dataGridViewButtonColumn = new DataGridViewButtonColumn();
-                    dataGridViewButtonColumn.Name = dataGridView_KeyElements.Columns.Count.ToString();
-                    dataGridView_KeyElements.Columns.Add(dataGridViewButtonColumn);
-                    if (dataGridView_KeyElements.Rows.Count == 0)
-                    {
-                        DataGridViewRow row = new DataGridViewRow();
-                        dataGridView_KeyElements.Rows.Add(row);
-                    }
-                    dataGridView_KeyElements.Rows[0].Cells[i].Value = UsingElementL[i];
-                }
-            }
-            dataGridView_KeyElements.ClearSelection();
-            dataGridView_SubElements.ClearSelection();
         }
 
         public void ShowTabXray()
@@ -784,5 +695,22 @@ namespace OTSPartA_STDEditor
         {
             tabSTDStandrad.SelectedIndex = 0;
         }
+
+        private void button_del_Click(object sender, EventArgs e)
+        {
+            if (!string.IsNullOrEmpty(textbox_STDEditor.Text))
+            {
+                if (textbox_STDEditor.SelectionLength == 0)
+                {
+                    textbox_STDEditor.Text = textbox_STDEditor.Text.Remove(textbox_STDEditor.SelectionStart - 1, 1);
+                }
+                else
+                {
+                    textbox_STDEditor.Text = textbox_STDEditor.Text.Remove(textbox_STDEditor.SelectionStart, textbox_STDEditor.SelectionLength);
+                }
+            }
+            textbox_STDEditor.Focus();
+            textbox_STDEditor.SelectionStart = textbox_STDEditor.Text.Length;
+        }
     }
 }

+ 33 - 47
OTSPartA_STDEditor/STDRuleslist.cs

@@ -126,31 +126,31 @@ namespace OTSPartA_STDEditor
             /// 保证鼠标点击的GRID行和列是有效的
             if (i >= 0 && j >= 0)
             {
-                //规则名称不为空
-                if (Grid_Minerals[i, 0].Value.ToString().Replace(" ", "").Trim() != "")
-                {
-                    if (m_MainForm.CheckAttributes() && m_MainForm.Checktextbox_STDEditor())
-                    {
+                ////规则名称不为空
+                //if (Grid_Minerals[i, 0].Value.ToString().Replace(" ", "").Trim() != "")
+                //{
+                //    if (m_MainForm.CheckAttributes() && m_MainForm.Checktextbox_STDEditor())
+                //    {
 
                         m_MainForm.SaveDataOfSelRule(PreRow, 0);
                         m_MainForm.ChangeSTDEditorAndGrid_Attributes(int.Parse(Grid_Minerals[i, 0].Tag.ToString()));
                         m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
                         PreRow = i;
 
-                    }
-                    else
-                    {
-                        Position pos = new Position(PreRow, 0);
-                        Grid_Minerals.Selection.Focus(pos, true);
-                        m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
-                    }
-                }
-                else
-                {
-                    Position pos = new Position(PreRow, 0);
-                    Grid_Minerals.Selection.Focus(pos, true);
-                    m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
-                }
+                //    }
+                //    else
+                //    {
+                //        Position pos = new Position(PreRow, 0);
+                //        Grid_Minerals.Selection.Focus(pos, true);
+                //        m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
+                //    }
+                //}
+                //else
+                //{
+                //    Position pos = new Position(PreRow, 0);
+                //    Grid_Minerals.Selection.Focus(pos, true);
+                //    m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
+                //}
             }
 
             SetOrderButtonsStatus();
@@ -168,21 +168,21 @@ namespace OTSPartA_STDEditor
             /// 保证鼠标点击的GRID行和列是有效的
             if (i >= 0 && j >= 0)
             {
-                //规则名称不为空
-                if (Grid_Minerals[i, j].Value.ToString().Replace(" ", "").Trim() != "")
-                {
-                    if (m_MainForm.CheckAttributes())
-                    {
-                        if (m_MainForm.Checktextbox_STDEditor())
-                        {
+                ////规则名称不为空
+                //if (Grid_Minerals[i, j].Value.ToString().Replace(" ", "").Trim() != "")
+                //{
+                //    if (m_MainForm.CheckAttributes())
+                //    {
+                //        if (m_MainForm.Checktextbox_STDEditor())
+                //        {
                             m_MainForm.SaveDataOfSelRule(i, j);
 
                             int STDId = m_MainForm.AddSTDDictionaryItem();
                             AddNewRow(STDId, "NewRuleName", Color.Gray);
                             m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
-                        }
-                    }
-                }
+                //        }
+                //    }
+                //}
             }
             else
             {
@@ -306,8 +306,7 @@ namespace OTSPartA_STDEditor
                     //规则名称不为空
                     if (Grid_Minerals[i, 0].Value.ToString().Replace(" ", "").Trim() != "")
                     {
-                        if (m_MainForm.CheckAttributes() && m_MainForm.Checktextbox_STDEditor())
-                        {
+                        
 
                             m_MainForm.SaveDataOfSelRule(i, 0);
                             m_MainForm.ChangeSTDEditorAndGrid_Attributes(int.Parse(Grid_Minerals[i - 1, 0].Tag.ToString()));
@@ -321,13 +320,7 @@ namespace OTSPartA_STDEditor
                             {
                                 button_DownOrder.Enabled = true;
                             }
-                        }
-                        else
-                        {
-                            Position pos = new Position(i + 1, 0);
-                            Grid_Minerals.Selection.Focus(pos, true);
-                            m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
-                        }
+                        
                     }
                     else
                     {
@@ -345,8 +338,7 @@ namespace OTSPartA_STDEditor
                     //规则名称不为空
                     if (Grid_Minerals[i, 0].Value.ToString().Replace(" ", "").Trim() != "")
                     {
-                        if (m_MainForm.CheckAttributes()&& m_MainForm.Checktextbox_STDEditor())
-                        {
+                        
                            
                                 m_MainForm.SaveDataOfSelRule(i, 0);
                                 m_MainForm.ChangeSTDEditorAndGrid_Attributes(int.Parse(Grid_Minerals[i + 1, 0].Tag.ToString()));
@@ -361,13 +353,7 @@ namespace OTSPartA_STDEditor
                             {
                                 button_DownOrder.Enabled = false;
                             }
-                        }
-                        else
-                        {
-                            Position pos = new Position(i - 1, 0);
-                            Grid_Minerals.Selection.Focus(pos, true);
-                            m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
-                        }
+                        
                     }
                     else
                     {