From 2f7e917dc9032961335d506a689bfd30c709ba9e Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 03 四月 2025 11:01:52 +0800 Subject: [PATCH] 字典 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.resx | 3 /dev/null | 120 ------------------------------ DevApp/Gs.DevApp/UserControl/UcDictionary.Designer.cs | 4 DevApp/Gs.DevApp/Resources/statistical_16x16.png | 0 DevApp/Gs.DevApp/Gs.DevApp.csproj | 15 +-- DevApp/Gs.DevApp/App.config | 4 DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs | 16 ++- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs | 23 +++++ DevApp/Gs.DevApp/UserControl/UcDictionary.cs | 10 +- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.Designer.cs | 14 +++ DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 4 11 files changed, 60 insertions(+), 153 deletions(-) diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config index 673f1fc..729ea9d 100644 --- a/DevApp/Gs.DevApp/App.config +++ b/DevApp/Gs.DevApp/App.config @@ -28,8 +28,8 @@ </assemblyBinding> </runtime> <appSettings> - <add key="WebApiUrl" value="http://localhost:5263/" /> - <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />--> + <!--<add key="WebApiUrl" value="http://localhost:5263/" />--> + <add key="WebApiUrl" value="http://192.168.1.145:81/" /> <add key="LogPath" value="logs" /> <add key="ProductName" value="骞挎繁绉戞妧 G-MES V2.0" /> <add key="PageSize" value="50" /> diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.Designer.cs index 0ea60c3..c7145ba 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.Designer.cs @@ -45,6 +45,7 @@ this.toolStripMenuItemAdd = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemEdt = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemRoot = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); this.xtraTabControl1.SuspendLayout(); this.xtraTabPage1.SuspendLayout(); @@ -200,9 +201,10 @@ this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItemAdd, this.toolStripMenuItemEdt, - this.toolStripMenuItemDel}); + this.toolStripMenuItemDel, + this.toolStripMenuItemRoot}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(143, 82); + this.contextMenuStrip1.Size = new System.Drawing.Size(143, 108); // // toolStripMenuItemAdd // @@ -224,6 +226,13 @@ this.toolStripMenuItemDel.Name = "toolStripMenuItemDel"; this.toolStripMenuItemDel.Size = new System.Drawing.Size(142, 26); this.toolStripMenuItemDel.Text = "鍒犻櫎璇ラ」"; + // + // toolStripMenuItemRoot + // + this.toolStripMenuItemRoot.Image = global::Gs.DevApp.Properties.Resources.trackingchanges_allmarkup_16x16; + this.toolStripMenuItemRoot.Name = "toolStripMenuItemRoot"; + this.toolStripMenuItemRoot.Size = new System.Drawing.Size(142, 26); + this.toolStripMenuItemRoot.Text = "澧炲姞椤圭洰"; // // Frm_MesDefectCode // @@ -263,5 +272,6 @@ private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEdt; private DevExpress.XtraTreeList.Columns.TreeListColumn tl8; private DevExpress.XtraTreeList.Columns.TreeListColumn tl9; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemRoot; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs index 41d806c..2c871d0 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs @@ -41,12 +41,23 @@ { strUpGuid = tlMenu.FocusedNode.GetValue("guid").ToString(); } - Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, "澧炲姞鏂伴」", strUpGuid); + Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, "澧炲姞瀛愰」", strUpGuid); frm.UpdateParent += (s2, ee2) => { getPageList(1); }; frm.ShowDialog(); + }; + this.toolStripMenuItemRoot.Click += (s, ee) => + { + string strGuid = ""; + string strUpGuid = ""; + Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, "澧炲姞椤圭洰", strUpGuid); + frm.UpdateParent += (s2, ee2) => + { + getPageList(1); + }; + frm.ShowDialog(); }; this.toolStripMenuItemDel.Click += (s, ee) => { @@ -113,12 +124,18 @@ tlMenu.FocusedNode = node; if (node != null) { + toolStripMenuItemAdd.Visible = true; + toolStripMenuItemEdt.Visible = true; + toolStripMenuItemDel.Visible = true; + toolStripMenuItemRoot.Visible = false; tlMenu.ContextMenuStrip = contextMenuStrip1; } else { + toolStripMenuItemAdd.Visible = false; + toolStripMenuItemEdt.Visible = false; + toolStripMenuItemDel.Visible = false; + toolStripMenuItemRoot.Visible = true; tlMenu.ContextMenuStrip = contextMenuStrip1; - tlMenu.FocusedNode = null; - tlMenu.ClearSelection(); } } } diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.resx b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.resx index d58980a..15f75b3 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.resx +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.resx @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs index a05a993..8346cb0 100644 --- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs @@ -1,4 +1,6 @@ -锘縩amespace Gs.DevApp.DevFrm.Work +锘縰sing Gs.DevApp.UserControl; + +namespace Gs.DevApp.DevFrm.Work { partial class Frm_Repair { @@ -65,9 +67,9 @@ this.splitMx1 = new DevExpress.XtraEditors.SplitContainerControl(); this.splitTop1 = new DevExpress.XtraEditors.SplitContainerControl(); this.layoutMx1 = new DevExpress.XtraLayout.LayoutControl(); - this.txt_badReson = new Gs.DevApp.DevFrm.Work.textSelect(); - this.txt_remark = new Gs.DevApp.DevFrm.Work.textSelect(); - this.txt_repairMethd = new Gs.DevApp.DevFrm.Work.textSelect(); + this.txt_badReson = new UcDictionary(); + this.txt_remark = new UcDictionary(); + this.txt_repairMethd = new UcDictionary(); this.lbGuid = new System.Windows.Forms.Label(); this.txt_gdbh = new DevExpress.XtraEditors.TextEdit(); this.txt_gx = new DevExpress.XtraEditors.TextEdit(); @@ -1564,10 +1566,10 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn17; private System.Windows.Forms.Label lbGuid; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; - private textSelect txt_repairMethd; + private UcDictionary txt_repairMethd; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; - private textSelect txt_badReson; - private textSelect txt_remark; + private UcDictionary txt_badReson; + private UcDictionary txt_remark; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; diff --git a/DevApp/Gs.DevApp/DevFrm/Work/textSelect.resx b/DevApp/Gs.DevApp/DevFrm/Work/textSelect.resx deleted file mode 100644 index 1af7de1..0000000 --- a/DevApp/Gs.DevApp/DevFrm/Work/textSelect.resx +++ /dev/null @@ -1,120 +0,0 @@ -锘�<?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> \ No newline at end of file diff --git a/DevApp/Gs.DevApp/Gs.DevApp.csproj b/DevApp/Gs.DevApp/Gs.DevApp.csproj index d18db30..5c22d3f 100644 --- a/DevApp/Gs.DevApp/Gs.DevApp.csproj +++ b/DevApp/Gs.DevApp/Gs.DevApp.csproj @@ -755,12 +755,6 @@ <Compile Include="DevFrm\Work\SelectProcess.Designer.cs"> <DependentUpon>SelectProcess.cs</DependentUpon> </Compile> - <Compile Include="DevFrm\Work\textSelect.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="DevFrm\Work\textSelect.Designer.cs"> - <DependentUpon>textSelect.cs</DependentUpon> - </Compile> <Compile Include="DevFrm\WW\Frm_WwBlDj.cs"> <SubType>Form</SubType> </Compile> @@ -1009,6 +1003,12 @@ </Compile> <Compile Include="UserControl\UcComBox.Designer.cs"> <DependentUpon>UcComBox.cs</DependentUpon> + </Compile> + <Compile Include="UserControl\UcDictionary.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="UserControl\UcDictionary.Designer.cs"> + <DependentUpon>UcDictionary.cs</DependentUpon> </Compile> <Compile Include="UserControl\UcLookCk.cs"> <SubType>UserControl</SubType> @@ -1413,9 +1413,6 @@ </EmbeddedResource> <EmbeddedResource Include="DevFrm\Work\SelectProcess.resx"> <DependentUpon>SelectProcess.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DevFrm\Work\textSelect.resx"> - <DependentUpon>textSelect.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="DevFrm\WW\Frm_WwBlDj.resx"> <DependentUpon>Frm_WwBlDj.cs</DependentUpon> diff --git a/DevApp/Gs.DevApp/Resources/statistical_16x16.png b/DevApp/Gs.DevApp/Resources/statistical_16x16.png new file mode 100644 index 0000000..d17bdf1 --- /dev/null +++ b/DevApp/Gs.DevApp/Resources/statistical_16x16.png Binary files differ diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index 9d365b1..f65be3c 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -671,9 +671,9 @@ } //鑷畾涓嶈壇 - if (colType is textSelect) + if (colType is UcDictionary) { - var txt = colType as textSelect; + var txt = colType as UcDictionary; txt.TextTxt=(strVal); //if (txt.IsReadly == false) // txt.Enabled = !isEdt; diff --git a/DevApp/Gs.DevApp/DevFrm/Work/textSelect.Designer.cs b/DevApp/Gs.DevApp/UserControl/UcDictionary.Designer.cs similarity index 97% rename from DevApp/Gs.DevApp/DevFrm/Work/textSelect.Designer.cs rename to DevApp/Gs.DevApp/UserControl/UcDictionary.Designer.cs index faff3af..0d6f8d4 100644 --- a/DevApp/Gs.DevApp/DevFrm/Work/textSelect.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/UcDictionary.Designer.cs @@ -1,6 +1,6 @@ -锘縩amespace Gs.DevApp.DevFrm.Work +锘縩amespace Gs.DevApp.UserControl { - partial class textSelect + partial class UcDictionary { /// <summary> /// Required designer variable. diff --git a/DevApp/Gs.DevApp/DevFrm/Work/textSelect.cs b/DevApp/Gs.DevApp/UserControl/UcDictionary.cs similarity index 87% rename from DevApp/Gs.DevApp/DevFrm/Work/textSelect.cs rename to DevApp/Gs.DevApp/UserControl/UcDictionary.cs index f71be29..16095ff 100644 --- a/DevApp/Gs.DevApp/DevFrm/Work/textSelect.cs +++ b/DevApp/Gs.DevApp/UserControl/UcDictionary.cs @@ -1,7 +1,5 @@ 锘縰sing DevExpress.XtraEditors; -using Gs.DevApp.ToolBox; -using Gs.DevApp.UserControl; -using Newtonsoft.Json; +using Gs.DevApp.DevFrm.Work; using System; using System.Collections.Generic; using System.ComponentModel; @@ -12,11 +10,11 @@ using System.Threading.Tasks; using System.Windows.Forms; -namespace Gs.DevApp.DevFrm.Work +namespace Gs.DevApp.UserControl { - public partial class textSelect : DevExpress.XtraEditors.XtraUserControl + public partial class UcDictionary : DevExpress.XtraEditors.XtraUserControl { - public textSelect() + public UcDictionary() { InitializeComponent(); } -- Gitblit v1.9.3