Browse Source

Merge branch 'OTSRelease3_0' of http://36.129.163.148:30080/gogsadmin/OTS into OTSRelease3_0

gsp 1 year ago
parent
commit
588070db9c

+ 13 - 12
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/OTSPropertyWindow.Designer.cs

@@ -34,8 +34,8 @@
             this.TSSaveAs = new System.Windows.Forms.ToolStripButton();
             this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
             this.TSLoad = new System.Windows.Forms.ToolStripButton();
-            this.PropGrid = new SourceGrid.Grid();
             this.toolStripButton_refresh = new System.Windows.Forms.ToolStripButton();
+            this.PropGrid = new SourceGrid.Grid();
             this.TSGridTitle.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -103,6 +103,17 @@
             this.TSLoad.Visible = false;
             this.TSLoad.Click += new System.EventHandler(this.TSLoad_Click);
             // 
+            // toolStripButton_refresh
+            // 
+            this.toolStripButton_refresh.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.toolStripButton_refresh.Enabled = false;
+            this.toolStripButton_refresh.Image = global::OTSMeasureApp.Properties.Resources.Recover16;
+            this.toolStripButton_refresh.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.toolStripButton_refresh.Name = "toolStripButton_refresh";
+            this.toolStripButton_refresh.Size = new System.Drawing.Size(28, 23);
+            this.toolStripButton_refresh.Text = "toolStripButton1";
+            this.toolStripButton_refresh.Click += new System.EventHandler(this.toolStripButton_refresh_Click);
+            // 
             // PropGrid
             // 
             this.PropGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
@@ -119,16 +130,6 @@
             this.PropGrid.ToolTipText = "";
             this.PropGrid.Click += new System.EventHandler(this.PropGrid_Click_1);
             // 
-            // toolStripButton_refresh
-            // 
-            this.toolStripButton_refresh.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
-            this.toolStripButton_refresh.Image = global::OTSMeasureApp.Properties.Resources.Recover16;
-            this.toolStripButton_refresh.ImageTransparentColor = System.Drawing.Color.Magenta;
-            this.toolStripButton_refresh.Name = "toolStripButton_refresh";
-            this.toolStripButton_refresh.Size = new System.Drawing.Size(28, 23);
-            this.toolStripButton_refresh.Text = "toolStripButton1";
-            this.toolStripButton_refresh.Click += new System.EventHandler(this.toolStripButton_refresh_Click);
-            // 
             // OTSPropertyWindow
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -162,6 +163,6 @@
         public SourceGrid.Grid PropGrid;
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
         public System.Windows.Forms.ToolStripButton TSLoad;
-        private System.Windows.Forms.ToolStripButton toolStripButton_refresh;
+        public System.Windows.Forms.ToolStripButton toolStripButton_refresh;
     }
 }

+ 1 - 0
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/OTSPropertyWindow.cs

@@ -62,6 +62,7 @@ namespace OTSMeasureApp
                     PropGrid.Rows.ShowRow(i);
                 }
             }
+            toolStripButton_refresh.Enabled = true;
             PropGrid.Refresh();
             PropGrid.Invalidate();
         }

+ 26 - 26
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/OTSPropertyWindow.resx

@@ -134,32 +134,32 @@
   <data name="TSEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         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
-        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
+        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
 </value>
   </data>
   <data name="TSSaveAs.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

+ 2 - 0
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -658,6 +658,8 @@ namespace OTSMeasureApp
                 m_SamplepaceWindow.DeleteWorkSample(sDeleteWSampleName);
                 
                 m_SPropertyWindows.PropGrid.Hide();
+                m_SPropertyWindows.toolStripButton_refresh.Enabled = false;
+                m_SPropertyWindows.TSSaveAs.Enabled = false;
                 m_SolutionWindows.treeView1.Nodes.Clear();
                 m_MessureStatuWindow.HideXRayTable();
 

+ 54 - 63
OTSIncAReportApp/1-UI/ElementSubscript.cs

@@ -112,69 +112,60 @@ namespace OTSIncAReportApp._1_UI
 
         public string Getsubscriptstring(string str)
         {
-            string[] strarray = str.Split('-');
-            string strSubscript = "";
-            for (int j=0;j< strarray.Length;j++)
-            {
-                char[] strCharArr = strarray[j].ToCharArray();
-                string Escape = "";
-                for (int i = 0; i < strCharArr.Length; i++)
-                {
-                    if (i < 2)
-                    {
-                        Escape = Escape + strCharArr[i];
-                        continue;
-                    }
-                    else
-                    {
-                        if (System.Text.RegularExpressions.Regex.IsMatch(strCharArr[i].ToString(), @"^[+-]?\d*[.]?\d*$"))
-                        {
-                            Escape = Escape + Getsubscript(strCharArr[i].ToString());
-                        }
-                        else
-                        {
-                            Escape = Escape + strCharArr[i];
-                        }
-                    }
-                }
-                strSubscript = strSubscript + Escape+"-";
-            }
-
-
-
-            string[] vs = strSubscript.Split('-');
-            string output = "";
-
-
-         
-
-            
-            if (vs.Length>2)
-            {
-                for (int i = 0; i < vs.Length - 1; i++)
-                {
-                    if (i == vs.Length - 2)
-                    {
-                        output = output + vs[i].ToString();
-                    }
-                    else
-                    {
-                        output = output + vs[i].ToString() + "-";
-                    }
-
-                }
-            }
-            else
-            {
-               
-                for (int i = 0; i < vs.Length - 1; i++)
-                {
-                    output = output + vs[i].ToString();
-                }
-            }
-
-
-            return output;
+            return str;
+
+            //下标转换
+            //string[] strarray = str.Split('-');
+            //string strSubscript = "";
+            //for (int j=0;j< strarray.Length;j++)
+            //{
+            //    char[] strCharArr = strarray[j].ToCharArray();
+            //    string Escape = "";
+            //    for (int i = 0; i < strCharArr.Length; i++)
+            //    {
+            //        if (i < 2)
+            //        {
+            //            Escape = Escape + strCharArr[i];
+            //            continue;
+            //        }
+            //        else
+            //        {
+            //            if (System.Text.RegularExpressions.Regex.IsMatch(strCharArr[i].ToString(), @"^[+-]?\d*[.]?\d*$"))
+            //            {
+            //                Escape = Escape + Getsubscript(strCharArr[i].ToString());
+            //            }
+            //            else
+            //            {
+            //                Escape = Escape + strCharArr[i];
+            //            }
+            //        }
+            //    }
+            //    strSubscript = strSubscript + Escape+"-";
+            //}
+            //string[] vs = strSubscript.Split('-');
+            //string output = "";
+            //if (vs.Length>2)
+            //{
+            //    for (int i = 0; i < vs.Length - 1; i++)
+            //    {
+            //        if (i == vs.Length - 2)
+            //        {
+            //            output = output + vs[i].ToString();
+            //        }
+            //        else
+            //        {
+            //            output = output + vs[i].ToString() + "-";
+            //        }
+            //    }
+            //}
+            //else
+            //{
+            //    for (int i = 0; i < vs.Length - 1; i++)
+            //    {
+            //        output = output + vs[i].ToString();
+            //    }
+            //}
+            //return output;
         }
     }
     public class subscript

+ 130 - 0
OTSIncAReportApp/1-UI/OTSReportExport/ClassificationOrderAdjuster.Designer.cs

@@ -0,0 +1,130 @@
+
+namespace OTSIncAReportApp._1_UI.OTSReportExport
+{
+    partial class ClassificationOrderAdjuster
+    {
+        /// <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 Windows Form 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.listView_select = new System.Windows.Forms.ListView();
+            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.button_up = new System.Windows.Forms.Button();
+            this.button_down = new System.Windows.Forms.Button();
+            this.button4 = new System.Windows.Forms.Button();
+            this.button3 = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // listView_select
+            // 
+            this.listView_select.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader2});
+            this.listView_select.HideSelection = false;
+            this.listView_select.Location = new System.Drawing.Point(35, 12);
+            this.listView_select.Name = "listView_select";
+            this.listView_select.Size = new System.Drawing.Size(226, 426);
+            this.listView_select.TabIndex = 20;
+            this.listView_select.UseCompatibleStateImageBehavior = false;
+            this.listView_select.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader2
+            // 
+            this.columnHeader2.Text = "";
+            this.columnHeader2.Width = 210;
+            // 
+            // button_up
+            // 
+            this.button_up.Font = new System.Drawing.Font("宋体", 9F);
+            this.button_up.Location = new System.Drawing.Point(10, 108);
+            this.button_up.Name = "button_up";
+            this.button_up.Size = new System.Drawing.Size(19, 98);
+            this.button_up.TabIndex = 18;
+            this.button_up.Text = "▲";
+            this.button_up.UseVisualStyleBackColor = true;
+            this.button_up.Click += new System.EventHandler(this.button_up_Click);
+            // 
+            // button_down
+            // 
+            this.button_down.Font = new System.Drawing.Font("宋体", 9F);
+            this.button_down.Location = new System.Drawing.Point(10, 212);
+            this.button_down.Name = "button_down";
+            this.button_down.Size = new System.Drawing.Size(19, 98);
+            this.button_down.TabIndex = 19;
+            this.button_down.Text = "▼";
+            this.button_down.UseVisualStyleBackColor = true;
+            this.button_down.Click += new System.EventHandler(this.button_down_Click);
+            // 
+            // button4
+            // 
+            this.button4.Location = new System.Drawing.Point(186, 444);
+            this.button4.Name = "button4";
+            this.button4.Size = new System.Drawing.Size(75, 23);
+            this.button4.TabIndex = 25;
+            this.button4.Text = "取消";
+            this.button4.UseVisualStyleBackColor = true;
+            this.button4.Click += new System.EventHandler(this.button4_Click);
+            // 
+            // button3
+            // 
+            this.button3.Location = new System.Drawing.Point(105, 444);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(75, 23);
+            this.button3.TabIndex = 24;
+            this.button3.Text = "确定";
+            this.button3.UseVisualStyleBackColor = true;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
+            // 
+            // ClassificationOrderAdjuster
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(276, 478);
+            this.Controls.Add(this.button4);
+            this.Controls.Add(this.button3);
+            this.Controls.Add(this.listView_select);
+            this.Controls.Add(this.button_up);
+            this.Controls.Add(this.button_down);
+            this.MaximizeBox = false;
+            this.MaximumSize = new System.Drawing.Size(292, 517);
+            this.MinimizeBox = false;
+            this.MinimumSize = new System.Drawing.Size(292, 517);
+            this.Name = "ClassificationOrderAdjuster";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "排序修改";
+            this.Load += new System.EventHandler(this.ClassificationOrderAdjuster_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ListView listView_select;
+        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.Button button_up;
+        private System.Windows.Forms.Button button_down;
+        private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button button3;
+    }
+}

+ 130 - 0
OTSIncAReportApp/1-UI/OTSReportExport/ClassificationOrderAdjuster.cs

@@ -0,0 +1,130 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace OTSIncAReportApp._1_UI.OTSReportExport
+{
+    public partial class ClassificationOrderAdjuster : Form
+    {
+        public List<string> OutElementList = new List<string>();
+        private List<string> OriginalClassificationSet = new List<string>();
+        public ClassificationOrderAdjuster(List<string> a_ElementList)
+        {
+            InitializeComponent();
+            for (int i = 0; i < a_ElementList.Count; i++)
+            {
+                ListViewItem item = new ListViewItem(a_ElementList[i]);
+                listView_select.Items.Add(item);
+            }
+            OriginalClassificationSet = a_ElementList;
+        }
+
+        private void ClassificationOrderAdjuster_Load(object sender, EventArgs e)
+        {
+            OutElementList.Clear();
+            OutElementList = OriginalClassificationSet;
+        }
+
+
+        private void MoveSelectedItemUp()
+        {
+            // 确保ListView中有选中的项,并且不是第一项  
+            if (listView_select.SelectedItems.Count > 0 && listView_select.SelectedIndices[0] > 0)
+            {
+                // 获取选中的项  
+                ListViewItem selectedItem = listView_select.SelectedItems[0];
+                // 在上一行的位置插入新的项(使用保存的数据)  
+                int newIndex = selectedItem.Index - 1; // 上一行的索引 
+                // 保存选中项的数据(这里只保存Text,如果有子项也需要保存)  
+                string text = selectedItem.Text;
+                ListViewItem.ListViewSubItem[] subItems = selectedItem.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray(); // 如果有子项  
+
+                // 移除选中的项  
+                listView_select.Items.Remove(selectedItem);
+
+                // 在上一行的位置插入新的项(使用保存的数据)  
+                //int newIndex = selectedItem.Index - 1; // 上一行的索引  
+                ListViewItem newItem = new ListViewItem(text); // 创建新的项  
+                newItem.SubItems.AddRange(subItems); // 如果有子项,则添加它们  
+                listView_select.Items.Insert(newIndex, newItem); // 插入新的项  
+
+                // 重新选择移动后的项(可选)  
+                listView_select.Items[newIndex].Selected = true;
+            }
+        }
+
+        private void MoveSelectedItemDown()
+        {
+            // 确保ListView中有选中的项,并且不是最后一项  
+            if (listView_select.SelectedItems.Count > 0 && listView_select.SelectedIndices[0] < listView_select.Items.Count - 1)
+            {
+                // 获取选中的项  
+                ListViewItem selectedItem = listView_select.SelectedItems[0];
+                int selectedIndex = selectedItem.Index;
+                // 在下一行的位置插入新的项(使用保存的数据)  
+                int newIndex = selectedIndex + 1; // 下一行的索引  
+                // 保存选中项的数据(包括文本和任何子项)  
+                string text = selectedItem.Text;
+                ListViewItem.ListViewSubItem[] subItems = selectedItem.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray();
+
+                // 移除选中的项  
+                listView_select.Items.RemoveAt(selectedIndex);
+
+                // 在下一行的位置插入新的项(使用保存的数据)  
+                //int newIndex = selectedIndex + 1; // 下一行的索引  
+                ListViewItem newItem = new ListViewItem(text);
+                newItem.SubItems.AddRange(subItems); // 如果有子项,则添加它们  
+                listView_select.Items.Insert(newIndex, newItem);
+
+                // 重新选择移动后的项(可选)  
+                listView_select.Items[newIndex].Selected = true;
+
+                // 如果需要,滚动到新的位置  
+                listView_select.EnsureVisible(newIndex);
+            }
+        }
+
+        private void UpdateSelectedCategories()
+        {
+            OutElementList.Clear();
+
+            foreach (ListViewItem item in listView_select.Items)
+            {
+
+                string secondColumnData = item.SubItems[0].Text; // 索引1代表第二列  
+                OutElementList.Add(secondColumnData);
+
+            }
+
+        }
+
+        private void button_up_Click(object sender, EventArgs e)
+        {
+            MoveSelectedItemUp();
+        }
+
+        private void button_down_Click(object sender, EventArgs e)
+        {
+            MoveSelectedItemDown();
+        }
+
+        private void button3_Click(object sender, EventArgs e)
+        {
+            UpdateSelectedCategories();
+            this.Close();
+        }
+
+        private void button4_Click(object sender, EventArgs e)
+        {
+            //OutElementList.Clear();
+            OutElementList = OriginalClassificationSet;
+            this.Close();
+        }
+    }
+}

+ 120 - 0
OTSIncAReportApp/1-UI/OTSReportExport/ClassificationOrderAdjuster.resx

@@ -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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 14 - 0
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Template_INCA.Designer.cs

@@ -89,6 +89,7 @@
             this.groupBox5 = new System.Windows.Forms.GroupBox();
             this.textBox1 = new System.Windows.Forms.TextBox();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
+            this.button8 = new System.Windows.Forms.Button();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.numericMin)).BeginInit();
@@ -643,6 +644,7 @@
             // 
             // groupBox3
             // 
+            this.groupBox3.Controls.Add(this.button8);
             this.groupBox3.Controls.Add(this.label2);
             this.groupBox3.Controls.Add(this.groupBox_px);
             this.groupBox3.Controls.Add(this.lbv_syxt_mblb);
@@ -766,6 +768,17 @@
             this.groupBox6.TabStop = false;
             this.groupBox6.Text = "图标选择";
             // 
+            // button8
+            // 
+            this.button8.Location = new System.Drawing.Point(596, 119);
+            this.button8.Margin = new System.Windows.Forms.Padding(2);
+            this.button8.Name = "button8";
+            this.button8.Size = new System.Drawing.Size(72, 20);
+            this.button8.TabIndex = 68;
+            this.button8.Text = "顺序调整";
+            this.button8.UseVisualStyleBackColor = true;
+            this.button8.Click += new System.EventHandler(this.button8_Click);
+            // 
             // OTSReport_Template_INCA
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -877,5 +890,6 @@
         private System.Windows.Forms.GroupBox groupBox5;
         private System.Windows.Forms.TextBox textBox1;
         private System.Windows.Forms.GroupBox groupBox6;
+        private System.Windows.Forms.Button button8;
     }
 }

+ 29 - 0
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Template_INCA.cs

@@ -869,5 +869,34 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         {
 
         }
+
+        private void button8_Click(object sender, EventArgs e)
+        {
+            List<string> vs = new List<string>();
+            string[] MainPriority = tb_ysfx_xsys.Text.Split(new char[] { ',' });
+            for (int i = 0; i < MainPriority.Length; i++)
+            {
+                if (tb_ysfx_xsys.Text.Split(',')[i] != "")
+                    vs.Add(MainPriority[i]);
+            }
+
+            ClassificationOrderAdjuster category = new ClassificationOrderAdjuster(vs);
+            category.ShowDialog();
+            List<string> ls = category.OutElementList;
+            string str = "";
+            for (int i = 0; i < ls.Count; i++)
+            {
+                if (i == ls.Count - 1)
+                {
+                    str = str + ls[i];
+                }
+                else
+                {
+                    str = str + ls[i] + ",";
+                }
+
+            }
+            tb_ysfx_xsys.Text = str;
+        }
     }
 }

+ 9 - 0
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -455,6 +455,12 @@
     <Compile Include="1-UI\frmReMeasure.Designer.cs">
       <DependentUpon>frmReMeasure.cs</DependentUpon>
     </Compile>
+    <Compile Include="1-UI\OTSReportExport\ClassificationOrderAdjuster.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="1-UI\OTSReportExport\ClassificationOrderAdjuster.Designer.cs">
+      <DependentUpon>ClassificationOrderAdjuster.cs</DependentUpon>
+    </Compile>
     <Compile Include="1-UI\Purity.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -834,6 +840,9 @@
     <EmbeddedResource Include="1-UI\frmReMeasure.resx">
       <DependentUpon>frmReMeasure.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="1-UI\OTSReportExport\ClassificationOrderAdjuster.resx">
+      <DependentUpon>ClassificationOrderAdjuster.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="1-UI\Purity.resx">
       <DependentUpon>Purity.cs</DependentUpon>
     </EmbeddedResource>

+ 5 - 6
OTSPartA_STDEditor/UI/Form_Main.cs

@@ -3,12 +3,9 @@ using SourceGrid;
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Forms;
 using System.Xml;
 using System.Xml.Linq;
@@ -45,6 +42,8 @@ namespace OTSPartA_STDEditor
         public bool IsModified { set; get; }
         public bool Isoldversion { set; get; }
 
+
+        public static readonly string[] ColorGroup = { "#FFB6C1", "#FFC0CB", "#DC143C", "#FFF0F5", "#DB7093", "#FF69B4", "#FF1493", "#C71585", "#DA70D6", "#D8BFD8", "#DDA0DD", "#EE82EE", "#FF00FF", "#8B008B", "#800080", "#BA55D3", "#9400D3", "#9932CC", "#4B0082", "#8A2BE2", "#9370DB","#7B68EE", "#6A5ACD", "#483D8B", "#E6E6FA", "#F8F8FF", "#0000FF", "#0000CD", "#191970", "#00008B", "#000080", "#4169E1" , "#6495ED", "#B0C4DE", "#778899", "#708090", "#1E90FF", "#F0F8FF", "#00FFFF" };
         public Form_Main()
         {
             InitializeComponent();
@@ -82,7 +81,7 @@ namespace OTSPartA_STDEditor
                     if (m_importStandardLibraryTypeSelection.SelectEvent == "expression")
                     {
                         int STDId = AddSTDDictionaryItem();
-                        m_STDRuleslist.AddNewRow(STDId, "NewClassify", Color.Gray);
+                        m_STDRuleslist.AddNewRow(STDId, "NewClassify", Attributes.colorHx16toRGB(STDDictionary[STDId].Color));
                     }
                 }
             }
@@ -922,8 +921,8 @@ namespace OTSPartA_STDEditor
             new_STDdata.Expression = "false";
             new_STDdata.KeyElementList = "";
             new_STDdata.SubElementList = "";
-
-            new_STDdata.Color = colorRGBtoHx16(Color.Gray.R, Color.Gray.G, Color.Gray.B);
+            Random random = new Random();
+            new_STDdata.Color = ColorGroup[random.Next(ColorGroup.Length)];
 
             int STDId = 40000;
 

+ 1 - 0
OTSPartA_STDEditor/UI/Form_MaxEDSRules.Designer.cs

@@ -471,6 +471,7 @@
             this.textBox_MaxEDSTime.Name = "textBox_MaxEDSTime";
             this.textBox_MaxEDSTime.Size = new System.Drawing.Size(99, 21);
             this.textBox_MaxEDSTime.TabIndex = 21;
+            this.textBox_MaxEDSTime.Text = "200";
             this.textBox_MaxEDSTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // button_Recover

+ 3 - 2
OTSPartA_STDEditor/UI/Form_MaxEDSRules.cs

@@ -447,8 +447,9 @@ namespace OTSPartA_STDEditor
                         if (Number < tp) Number = tp;
                     }
                     new_child.Text = "Rule" + Number.ToString();
-                    new_child.Tag = "NewRules";
-                    textbox_STDEditor.Text = "NewRules";
+                    new_child.Tag = "false";
+                    textbox_STDEditor.Text = "false";
+                    textBox_MaxEDSTime.Text = "200";
                 }
                 
                 XmlTree.Nodes.Add(new_child);

+ 2 - 2
OTSPartA_STDEditor/UI/STDRuleslist.cs

@@ -180,7 +180,7 @@ namespace OTSPartA_STDEditor
                             m_MainForm.SaveDataOfSelRule(i, j);
 
                             int STDId = m_MainForm.AddSTDDictionaryItem();
-                            AddNewRow(STDId, "NewRuleName", Color.Gray);
+                            AddNewRow(STDId, "NewRuleName", Attributes.colorHx16toRGB(m_MainForm.STDDictionary[STDId].Color));
                             m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
                 //        }
                 //    }
@@ -189,7 +189,7 @@ namespace OTSPartA_STDEditor
             else
             {
                 int STDId = m_MainForm.AddSTDDictionaryItem();
-                AddNewRow(STDId, "NewRuleName", Color.Gray);
+                AddNewRow(STDId, "NewRuleName", Attributes.colorHx16toRGB(m_MainForm.STDDictionary[STDId].Color));
                 m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
             }
             //SetOrderButtonsStatus();