| DevApp/Gs.DevApp/DevFrm/Sys/DefectCodeKanban.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/DefectCodeKanban.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/DefectCodeKanban.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBan.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBan.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBan.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBanEdit.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBanEdit.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBanEdit.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/Gs.DevApp.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/SelectHz.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DevApp/Gs.DevApp/DevFrm/Sys/DefectCodeKanban.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,58 @@ namespace Gs.DevApp.DevFrm.Sys { partial class DefectCodeKanBan { /// <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.simpleKanBan1 = new Gs.DevApp.DevFrm.Sys.SimpleKanBan(); this.SuspendLayout(); // // simpleKanBan1 // this.simpleKanBan1.Dock = System.Windows.Forms.DockStyle.Fill; this.simpleKanBan1.Location = new System.Drawing.Point(0, 0); this.simpleKanBan1.Name = "simpleKanBan1"; this.simpleKanBan1.Size = new System.Drawing.Size(1001, 568); this.simpleKanBan1.TabIndex = 0; // // DefectCodeKanBan // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1001, 568); this.Controls.Add(this.simpleKanBan1); this.Name = "DefectCodeKanBan"; this.Text = "çæ¿ç®å½ç®¡ç"; this.ResumeLayout(false); } #endregion private SimpleKanBan simpleKanBan1; } } DevApp/Gs.DevApp/DevFrm/Sys/DefectCodeKanban.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ using DevExpress.XtraEditors; 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 Gs.DevApp.DevFrm.Sys { /// <summary> /// çæ¿ç®å½ç®¡ç - 主çªä½ /// </summary> public partial class DefectCodeKanBan : DevExpress.XtraEditors.XtraForm { public DefectCodeKanBan() { InitializeComponent(); } } } DevApp/Gs.DevApp/DevFrm/Sys/DefectCodeKanban.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,123 @@ <?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> <metadata name="cms1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root> DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBan.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,362 @@  namespace Gs.DevApp.DevFrm.Sys { partial class SimpleKanBan { /// <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 Component 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.components = new System.ComponentModel.Container(); this.toolStripMenuItemRoot = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemEdt = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemAdd = new System.Windows.Forms.ToolStripMenuItem(); this.cms1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem(); this.colId = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colParentId = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colCode = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colTitle = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colNodeType = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colUrl = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colIsEnabled = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colIsExpanded = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colSortOrder = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colCreatedBy = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.colCreatedAt = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.split1 = new DevExpress.XtraEditors.SplitContainerControl(); this.tlMenu = new DevExpress.XtraTreeList.TreeList(); this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); this.treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.cms1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.split1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).BeginInit(); this.split1.Panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).BeginInit(); this.split1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tlMenu)).BeginInit(); this.xtraTabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); this.xtraTabControl1.SuspendLayout(); this.SuspendLayout(); // // toolStripMenuItemRoot // this.toolStripMenuItemRoot.Image = global::Gs.DevApp.Properties.Resources.trackingchanges_allmarkup_16x16; this.toolStripMenuItemRoot.Name = "toolStripMenuItemRoot"; this.toolStripMenuItemRoot.Size = new System.Drawing.Size(156, 30); this.toolStripMenuItemRoot.Text = "å¢å 主项"; // // toolStripMenuItemEdt // this.toolStripMenuItemEdt.Image = global::Gs.DevApp.Properties.Resources.trackingchanges_trackchanges_16x16; this.toolStripMenuItemEdt.Name = "toolStripMenuItemEdt"; this.toolStripMenuItemEdt.Size = new System.Drawing.Size(156, 30); this.toolStripMenuItemEdt.Text = "ç¼è¾è¯¥é¡¹"; // // toolStripMenuItemAdd // this.toolStripMenuItemAdd.Image = global::Gs.DevApp.Properties.Resources.trackingchanges_allmarkup_16x16; this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; this.toolStripMenuItemAdd.Size = new System.Drawing.Size(156, 30); this.toolStripMenuItemAdd.Text = "å¢å å项"; // // cms1 // this.cms1.ImageScalingSize = new System.Drawing.Size(20, 20); this.cms1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItemAdd, this.toolStripMenuItemEdt, this.toolStripMenuItemDel, this.toolStripMenuItemRoot}); this.cms1.Name = "contextMenuStrip1"; this.cms1.Size = new System.Drawing.Size(157, 124); // // toolStripMenuItemDel // this.toolStripMenuItemDel.Image = global::Gs.DevApp.Properties.Resources.deletelist2_16x16; this.toolStripMenuItemDel.Name = "toolStripMenuItemDel"; this.toolStripMenuItemDel.Size = new System.Drawing.Size(156, 30); this.toolStripMenuItemDel.Text = "å é¤è¯¥é¡¹"; // // colId // this.colId.Caption = "ID"; this.colId.FieldName = "id"; this.colId.MinWidth = 25; this.colId.Name = "colId"; this.colId.Width = 94; // // colParentId // this.colParentId.Caption = "ç¶ID"; this.colParentId.FieldName = "parentId"; this.colParentId.MinWidth = 25; this.colParentId.Name = "colParentId"; this.colParentId.Width = 94; // // colCode // this.colCode.Caption = "ç¼ç "; this.colCode.FieldName = "code"; this.colCode.MinWidth = 29; this.colCode.Name = "colCode"; this.colCode.Visible = true; this.colCode.VisibleIndex = 0; this.colCode.Width = 150; // // colTitle // this.colTitle.Caption = "åç§°"; this.colTitle.FieldName = "title"; this.colTitle.MinWidth = 47; this.colTitle.Name = "colTitle"; this.colTitle.Visible = true; this.colTitle.VisibleIndex = 1; this.colTitle.Width = 250; // // colNodeType // this.colNodeType.Caption = "èç¹ç±»å"; this.colNodeType.FieldName = "nodeTypeTxt"; this.colNodeType.MinWidth = 29; this.colNodeType.Name = "colNodeType"; this.colNodeType.Visible = true; this.colNodeType.VisibleIndex = 2; this.colNodeType.Width = 100; // // colUrl // this.colUrl.Caption = "URLå°å"; this.colUrl.FieldName = "url"; this.colUrl.MinWidth = 29; this.colUrl.Name = "colUrl"; this.colUrl.Visible = true; this.colUrl.VisibleIndex = 3; this.colUrl.Width = 250; // // colIsEnabled // this.colIsEnabled.Caption = "å¯ç¨"; this.colIsEnabled.FieldName = "isEnabledTxt"; this.colIsEnabled.MinWidth = 29; this.colIsEnabled.Name = "colIsEnabled"; this.colIsEnabled.Visible = true; this.colIsEnabled.VisibleIndex = 5; // // colIsExpanded // this.colIsExpanded.Caption = "æ¯å¦å±å¼"; this.colIsExpanded.FieldName = "isExpandedTxt"; this.colIsExpanded.MinWidth = 29; this.colIsExpanded.Name = "colIsExpanded"; this.colIsExpanded.Visible = true; this.colIsExpanded.VisibleIndex = 6; this.colIsExpanded.Width = 100; // // colSortOrder // this.colSortOrder.Caption = "æåºå·"; this.colSortOrder.FieldName = "sortOrder"; this.colSortOrder.MinWidth = 29; this.colSortOrder.Name = "colSortOrder"; this.colSortOrder.Visible = true; this.colSortOrder.VisibleIndex = 7; this.colSortOrder.Width = 100; // // colCreatedBy // this.colCreatedBy.Caption = "å建人"; this.colCreatedBy.FieldName = "createdBy"; this.colCreatedBy.MinWidth = 29; this.colCreatedBy.Name = "colCreatedBy"; this.colCreatedBy.Visible = true; this.colCreatedBy.VisibleIndex = 8; this.colCreatedBy.Width = 125; // // colCreatedAt // this.colCreatedAt.Caption = "å建æ¶é´"; this.colCreatedAt.FieldName = "createdAt"; this.colCreatedAt.MinWidth = 29; this.colCreatedAt.Name = "colCreatedAt"; this.colCreatedAt.Visible = true; this.colCreatedAt.VisibleIndex = 9; this.colCreatedAt.Width = 187; // // split1 // this.split1.Dock = System.Windows.Forms.DockStyle.Fill; this.split1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; this.split1.Horizontal = false; this.split1.Location = new System.Drawing.Point(0, 0); this.split1.Margin = new System.Windows.Forms.Padding(4); this.split1.Name = "split1"; // // split1.Panel1 // this.split1.Panel1.Controls.Add(this.tlMenu); this.split1.Panel1.Text = "Panel1"; // // split1.Panel2 // this.split1.Panel2.Text = "Panel2"; this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; this.split1.Size = new System.Drawing.Size(1236, 831); this.split1.SplitterPosition = 0; this.split1.TabIndex = 0; // // tlMenu // this.tlMenu.Appearance.Row.Options.UseFont = true; this.tlMenu.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { this.colId, this.colParentId, this.colCode, this.colTitle, this.colNodeType, this.colUrl, this.colIsEnabled, this.colIsExpanded, this.colSortOrder, this.colCreatedBy, this.colCreatedAt, this.treeListColumn1}); this.tlMenu.Cursor = System.Windows.Forms.Cursors.Default; this.tlMenu.Dock = System.Windows.Forms.DockStyle.Fill; this.tlMenu.HorzScrollStep = 4; this.tlMenu.Location = new System.Drawing.Point(0, 0); this.tlMenu.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tlMenu.MinWidth = 29; this.tlMenu.Name = "tlMenu"; this.tlMenu.OptionsBehavior.Editable = false; this.tlMenu.OptionsFind.AlwaysVisible = true; this.tlMenu.OptionsMenu.EnableColumnMenu = false; this.tlMenu.OptionsMenu.EnableFooterMenu = false; this.tlMenu.OptionsMenu.EnableNodeMenu = false; this.tlMenu.OptionsMenu.ShowAddNodeItems = DevExpress.Utils.DefaultBoolean.False; this.tlMenu.OptionsMenu.ShowAutoFilterRowItem = false; this.tlMenu.OptionsView.ShowTreeLines = DevExpress.Utils.DefaultBoolean.True; this.tlMenu.OptionsView.TreeLineStyle = DevExpress.XtraTreeList.LineStyle.Solid; this.tlMenu.Size = new System.Drawing.Size(1236, 816); this.tlMenu.TabIndex = 3; this.tlMenu.TreeLevelWidth = 31; // // xtraTabPage1 // this.xtraTabPage1.Controls.Add(this.split1); this.xtraTabPage1.Margin = new System.Windows.Forms.Padding(4); this.xtraTabPage1.Name = "xtraTabPage1"; this.xtraTabPage1.Size = new System.Drawing.Size(1236, 831); this.xtraTabPage1.Text = "æ°æ®å表"; // // xtraTabControl1 // this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.xtraTabControl1.Location = new System.Drawing.Point(0, 98); this.xtraTabControl1.Margin = new System.Windows.Forms.Padding(4); this.xtraTabControl1.Name = "xtraTabControl1"; this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; this.xtraTabControl1.Size = new System.Drawing.Size(1238, 869); this.xtraTabControl1.TabIndex = 5; this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.xtraTabPage1}); // // toolBarMenu1 // this.toolBarMenu1.chkParameter = null; this.toolBarMenu1.currentAction = null; this.toolBarMenu1.defaultActions = null; this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; this.toolBarMenu1.guidKey = null; this.toolBarMenu1.isSetBtn = false; this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); this.toolBarMenu1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); this.toolBarMenu1.Name = "toolBarMenu1"; this.toolBarMenu1.rptParameter = null; this.toolBarMenu1.Size = new System.Drawing.Size(1238, 98); this.toolBarMenu1.TabIndex = 4; this.toolBarMenu1.xlsInService = null; this.toolBarMenu1.xlsOutParameter = null; // // treeListColumn1 // this.treeListColumn1.Caption = "è½®ææ¶é¿"; this.treeListColumn1.FieldName = "carouselDuration"; this.treeListColumn1.Name = "treeListColumn1"; this.treeListColumn1.Visible = true; this.treeListColumn1.VisibleIndex = 4; // // SimpleKanBan // this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.xtraTabControl1); this.Controls.Add(this.toolBarMenu1); this.Margin = new System.Windows.Forms.Padding(4); this.Name = "SimpleKanBan"; this.Size = new System.Drawing.Size(1238, 967); this.cms1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).EndInit(); this.split1.Panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.split1)).EndInit(); this.split1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.tlMenu)).EndInit(); this.xtraTabPage1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); this.xtraTabControl1.ResumeLayout(false); this.ResumeLayout(false); } #endregion private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemRoot; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEdt; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAdd; private System.Windows.Forms.ContextMenuStrip cms1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDel; private DevExpress.XtraTreeList.Columns.TreeListColumn colId; private DevExpress.XtraTreeList.Columns.TreeListColumn colParentId; private DevExpress.XtraTreeList.Columns.TreeListColumn colCode; private DevExpress.XtraTreeList.Columns.TreeListColumn colTitle; private DevExpress.XtraTreeList.Columns.TreeListColumn colNodeType; private DevExpress.XtraTreeList.Columns.TreeListColumn colUrl; private DevExpress.XtraTreeList.Columns.TreeListColumn colIsEnabled; private DevExpress.XtraTreeList.Columns.TreeListColumn colIsExpanded; private DevExpress.XtraTreeList.Columns.TreeListColumn colSortOrder; private DevExpress.XtraTreeList.Columns.TreeListColumn colCreatedBy; private DevExpress.XtraTreeList.Columns.TreeListColumn colCreatedAt; private DevExpress.XtraEditors.SplitContainerControl split1; private DevExpress.XtraTreeList.TreeList tlMenu; private DevExpress.XtraTab.XtraTabPage xtraTabPage1; private DevExpress.XtraTab.XtraTabControl xtraTabControl1; private UserControl.UcToolBarMenu toolBarMenu1; private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; } } DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBan.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,382 @@ using DevExpress.Data; using DevExpress.XtraTreeList; using DevExpress.XtraTreeList.Nodes; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Data; using System.Drawing; using System.Windows.Forms; namespace Gs.DevApp.DevFrm.Sys { /// <summary> /// çæ¿ç®å½ç®¡ç - æ å½¢ç»æç»´æ¤çé¢ï¼ç¨æ·æ§ä»¶ï¼ /// </summary> public partial class SimpleKanBan : DevExpress.XtraEditors.XtraUserControl { private string _webServiceName = "MesSimpleManager/"; public SimpleKanBan() { InitializeComponent(); // å·¥å ·æ äºä»¶ç»å® toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; // TreeList è¡å·æ¾ç¤º tlMenu.IndicatorWidth = 50; tlMenu.CustomDrawNodeIndicator += (s, ee) => { if (ee.IsNodeIndicator) { var index = ee.Node.TreeList.GetVisibleIndexByNode(ee.Node); ee.Info.DisplayText = (index + 1).ToString(); } }; // åå§åå è½½æ°æ® getPageList(); // å³é®èåäºä»¶ tlMenu.MouseDown += TlMenu_MouseDown; // å¢å å项 toolStripMenuItemAdd.Click += (s, ee) => { string strGuid = ""; string strUpGuid = ""; if (tlMenu.FocusedNode != null) { strUpGuid = tlMenu.FocusedNode.GetValue("id").ToString(); } SimpleKanBanEdit frm = new SimpleKanBanEdit(strGuid, strUpGuid); frm.UpdateParent += (s2, ee2) => { getPageList(); TreeListNode node = tlMenu.FindNodeByKeyID(long.Parse(strUpGuid)); if (node != null) { node.Expanded = true; tlMenu.MakeNodeVisible(node); } }; frm.ShowDialog(); }; // å¢å ä¸»é¡¹ï¼æ ¹èç¹ï¼ toolStripMenuItemRoot.Click += (s, ee) => { string strGuid = ""; string strUpGuid = ""; SimpleKanBanEdit frm = new SimpleKanBanEdit(strGuid, strUpGuid); frm.UpdateParent += (s2, ee2) => { getPageList(); }; frm.ShowDialog(); }; // å é¤èç¹ toolStripMenuItemDel.Click += (s, ee) => { if (tlMenu.FocusedNode != null) { string rowGuid = ""; string rowName = ""; rowGuid = tlMenu.FocusedNode.GetValue("id").ToString(); rowName = tlMenu.FocusedNode.GetValue("title").ToString(); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("请å éæ©ä½ è¦æä½çè¡ï¼"); return; } if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®å é¤åï¼")) return; List<dynamic> lst = new List<dynamic>(); lst.Add(rowGuid); try { string strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModel", JsonConvert.SerializeObject(lst)); ReturnModel<dynamic> _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { tlMenu.DeleteNode(tlMenu.FocusedNode); } else MsgHelper.ShowError("æç¤ºï¼" + _rtn.rtnMsg); } catch (Exception ex) { MsgHelper.ShowError("æç¤ºï¼" + ex.Message); } } }; // åå»ºå·æ°èå项 ToolStripMenuItem toolStripMenuItemRefresh = new ToolStripMenuItem(); toolStripMenuItemRefresh.Text = "å·æ°"; toolStripMenuItemRefresh.Click += ToolBarMenu1_btnLoadClick; // ç´æ¥è°ç¨å·²æå·æ°äºä»¶ // æ·»å å°å³é®èåï¼ä¸æ¸ ç©ºåæ Items cms1.Items.Add(toolStripMenuItemRefresh); // ç¼è¾èç¹ toolStripMenuItemEdt.Click += (s, ee) => { string strGuid = ""; string strUpGuid = ""; if (tlMenu.FocusedNode != null) { strGuid = tlMenu.FocusedNode.GetValue("id").ToString(); var fidValue = tlMenu.FocusedNode.GetValue("parentId"); strUpGuid = fidValue != null ? fidValue.ToString() : ""; } SimpleKanBanEdit frm = new SimpleKanBanEdit(strGuid, strUpGuid); frm.UpdateParent += (s2, ee2) => { getPageList(); TreeListNode node = tlMenu.FindNodeByKeyID(long.Parse(strGuid)); if (node != null) { node.Expanded = true; tlMenu.MakeNodeVisible(node); } }; frm.ShowDialog(); }; } /// <summary> /// æ¥è¯¢äºä»¶ /// </summary> private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) { MsgHelper.ShowInformation("该çªä½ä¸æ¯ææ¥è¯¢ï¼è¥æ³æ´æ°é¡µé¢ï¼è¯·ç¹å» å·æ°"); } /// <summary> /// å·æ°äºä»¶ /// </summary> private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) { getPageList(); MsgHelper.ShowInformation("å·æ°æåï¼"); } /// <summary> /// å³é®å¼¹åºèå /// </summary> private void TlMenu_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { TreeListHitInfo hInfo = tlMenu.CalcHitInfo(new Point(e.X, e.Y)); TreeListNode node = hInfo.Node; tlMenu.FocusedNode = node; if (hInfo.HitInfoType == HitInfoType.Cell || hInfo.HitInfoType == HitInfoType.Row || hInfo.HitInfoType == HitInfoType.RowIndent || hInfo.HitInfoType == HitInfoType.RowIndicator) { if (node != null) { toolStripMenuItemAdd.Visible = true; toolStripMenuItemEdt.Visible = true; toolStripMenuItemDel.Visible = true; toolStripMenuItemRoot.Visible = false; cms1.Show(tlMenu, e.Location); } } else { toolStripMenuItemAdd.Visible = false; toolStripMenuItemEdt.Visible = false; toolStripMenuItemDel.Visible = false; toolStripMenuItemRoot.Visible = true; cms1.Show(tlMenu, e.Location); } } } /// <summary> /// å è½½æ°æ®å表 - æ å½¢ç»ææ¾ç¤º /// </summary> private void getPageList() { var pgq = new PageQueryModel(1, 999999, "a.node_level", "asc", "", "");//sort_order var json = JsonConvert.SerializeObject(pgq); try { var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); var dd = UtilityHelper.ReturnToTablePage(strReturn); var dt = dd.rtnData.list; // è·ååå§ DataTable // â â â ç±»åä¿®å¤ä»£ç å¼å§ (æå ¥å¨è¿é) â â â // æ£æµ parentId æ¯å¦åå¨ä¸ç±»åä¸å¯¹ if (dt.Columns.Contains("parentId") && dt.Columns["parentId"].DataType != typeof(long)) { // 1. å建ä¸ä¸ªæ°ç Int64 ç±»åç临æ¶å DataColumn newCol = new DataColumn("parentId_Fixed", typeof(long)); dt.Columns.Add(newCol); // 2. éåææè¡ï¼æ String 转æ Long foreach (DataRow row in dt.Rows) { object oldVal = row["parentId"]; // åªæéç©ºå¼æè½¬æ¢ï¼ç©ºå¼ä¿æ DBNull (峿 ¹èç¹) if (oldVal != null && oldVal != DBNull.Value && !string.IsNullOrEmpty(oldVal.ToString())) { if (long.TryParse(oldVal.ToString(), out long val)) { row["parentId_Fixed"] = val; } } } // 3. ç§»é¤æ§ç String å dt.Columns.Remove("parentId"); // 4. ææ°åæ¹å为 parentId newCol.ColumnName = "parentId"; } // â â â ç±»åä¿®å¤ä»£ç ç»æ â â â tlMenu.BeginUpdate(); // 1. ç»å®å¤çè¿çæ°æ® tlMenu.DataSource = dt; // 2. ç»å®å段 (ç°å¨ç±»åå®å ¨ä¸è´äº) tlMenu.KeyFieldName = "id"; tlMenu.ParentFieldName = "parentId"; // è®¾ç½®æ ¹èç¹ (Int64 ç±»åçåï¼ç©ºå¼å°±æ¯ DBNull) tlMenu.RootValue = DBNull.Value; string sortColName = "sortOrder"; if (tlMenu.Columns[sortColName] != null) { tlMenu.ClearSorting(); tlMenu.Columns[sortColName].SortOrder = System.Windows.Forms.SortOrder.Ascending; tlMenu.Columns[sortColName].SortIndex = 0; } tlMenu.ForceInitialize(); // 4. è°ç¨å±å¼é»è¾ ApplyExpandState(); tlMenu.EndUpdate(); tlMenu.BestFitColumns(); } catch (Exception ex) { tlMenu.EndUpdate(); MsgHelper.Warning("å 载失败ï¼" + ex.Message); } } /// <summary> /// æ ¹æ® isExpanded (bool) åæ®µè®¾ç½®èç¹å±å¼ /// </summary> private void ApplyExpandState() { // 1. å å ¨é¨æå tlMenu.CollapseAll(); // 2. ä½¿ç¨ DevExpress 髿è¿ä»£å¨éå tlMenu.NodesIterator.DoOperation(node => { // è·åå¼ (注æï¼ååå¿ é¡»ä¸ DataTable ä¸ä¸è´ï¼éå¸¸æ¯ "isExpanded") object val = node.GetValue("isExpanded"); // 3. 夿并å±å¼ if (val != null && val != DBNull.Value) { if ((bool)val) { node.Expanded = true; } } }); } /// <summary> /// å°å¨ææ°æ®è½¬æ¢ä¸ºDataTable /// </summary> private DataTable ConvertToDataTable(dynamic sourceData) { DataTable dt = new DataTable(); if (sourceData == null) return dt; // å¦æå·²ç»æ¯DataTableï¼ç´æ¥è¿å if (sourceData is DataTable) return sourceData as DataTable; // å°è¯ä»JSONæ°ç»è½¬æ¢ string jsonStr = JsonConvert.SerializeObject(sourceData); dt = JsonConvert.DeserializeObject<DataTable>(jsonStr); return dt; } /// <summary> /// å¤çparentIdåæ®µï¼ç¡®ä¿æ å½¢ç»ææ£ç¡®æå»º /// æ ¹èç¹ï¼node_level=0 æ parentId为null/0ï¼çparentId设为DBNull /// </summary> private void ProcessParentIdForTreeStructure(DataTable dt) { if (dt == null || dt.Rows.Count == 0) return; foreach (DataRow row in dt.Rows) { // è·ånodeLevel int nodeLevel = 0; if (dt.Columns.Contains("nodeLevel") && row["nodeLevel"] != DBNull.Value) { nodeLevel = Convert.ToInt32(row["nodeLevel"]); } // è·åparentId object parentIdValue = null; if (dt.Columns.Contains("parentId")) { parentIdValue = row["parentId"]; } // å¦ææ¯æ ¹èç¹ï¼nodeLevel=0 æ parentId为null/0/空ï¼ï¼å°parentId设为DBNull bool isRootNode = nodeLevel == 0; bool hasNoParent = parentIdValue == null || parentIdValue == DBNull.Value || string.IsNullOrEmpty(parentIdValue.ToString()) || parentIdValue.ToString() == "0"; if (isRootNode || hasNoParent) { row["parentId"] = DBNull.Value; } } } /// <summary> /// å±å¼ç¬¬ä¸çº§èç¹ï¼æ ¹èç¹ï¼ /// </summary> private void ExpandFirstLevelNodes() { foreach (TreeListNode node in tlMenu.Nodes) { node.Expanded = true; } } } } DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBan.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,123 @@ <?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> <metadata name="cms1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root> DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBanEdit.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,415 @@ namespace Gs.DevApp.DevFrm.Sys { partial class SimpleKanBanEdit { /// <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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); this.txtCode = new DevExpress.XtraEditors.TextEdit(); this.txtTitle = new DevExpress.XtraEditors.TextEdit(); this.rgNodeType = new DevExpress.XtraEditors.RadioGroup(); this.txtUrl = new DevExpress.XtraEditors.TextEdit(); this.seCarouselDuration = new DevExpress.XtraEditors.SpinEdit(); this.seSortOrder = new DevExpress.XtraEditors.SpinEdit(); this.chkIsExpanded = new DevExpress.XtraEditors.CheckEdit(); this.chkIsEnabled = new DevExpress.XtraEditors.CheckEdit(); this.btnSave = new DevExpress.XtraEditors.SimpleButton(); this.btnCancel = new DevExpress.XtraEditors.SimpleButton(); this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); this.layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtCode.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txtTitle.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rgNodeType.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txtUrl.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.seCarouselDuration.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.seSortOrder.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chkIsExpanded.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chkIsEnabled.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); this.SuspendLayout(); // // layoutControl1 // this.layoutControl1.Controls.Add(this.txtCode); this.layoutControl1.Controls.Add(this.txtTitle); this.layoutControl1.Controls.Add(this.rgNodeType); this.layoutControl1.Controls.Add(this.txtUrl); this.layoutControl1.Controls.Add(this.seCarouselDuration); this.layoutControl1.Controls.Add(this.seSortOrder); this.layoutControl1.Controls.Add(this.chkIsExpanded); this.layoutControl1.Controls.Add(this.chkIsEnabled); this.layoutControl1.Controls.Add(this.btnSave); this.layoutControl1.Controls.Add(this.btnCancel); this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl1.Location = new System.Drawing.Point(0, 0); this.layoutControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.layoutControl1.Name = "layoutControl1"; this.layoutControl1.Root = this.layoutControlGroup1; this.layoutControl1.Size = new System.Drawing.Size(562, 464); this.layoutControl1.TabIndex = 0; this.layoutControl1.Text = "layoutControl1"; // // txtCode // this.txtCode.Location = new System.Drawing.Point(151, 14); this.txtCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtCode.Name = "txtCode"; this.txtCode.Properties.MaxLength = 50; this.txtCode.Size = new System.Drawing.Size(397, 28); this.txtCode.StyleController = this.layoutControl1; this.txtCode.TabIndex = 4; // // txtTitle // this.txtTitle.Location = new System.Drawing.Point(151, 46); this.txtTitle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtTitle.Name = "txtTitle"; this.txtTitle.Properties.MaxLength = 255; this.txtTitle.Size = new System.Drawing.Size(397, 28); this.txtTitle.StyleController = this.layoutControl1; this.txtTitle.TabIndex = 5; // // rgNodeType // this.rgNodeType.Location = new System.Drawing.Point(151, 78); this.rgNodeType.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.rgNodeType.Name = "rgNodeType"; this.rgNodeType.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] { new DevExpress.XtraEditors.Controls.RadioGroupItem(0, "æ ¹ç®å½"), new DevExpress.XtraEditors.Controls.RadioGroupItem(1, "çæ¿ç®å½"), new DevExpress.XtraEditors.Controls.RadioGroupItem(2, "çæ¿å 容")}); this.rgNodeType.Size = new System.Drawing.Size(397, 49); this.rgNodeType.StyleController = this.layoutControl1; this.rgNodeType.TabIndex = 6; // // txtUrl // this.txtUrl.Location = new System.Drawing.Point(151, 131); this.txtUrl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtUrl.Name = "txtUrl"; this.txtUrl.Properties.MaxLength = 500; this.txtUrl.Size = new System.Drawing.Size(397, 28); this.txtUrl.StyleController = this.layoutControl1; this.txtUrl.TabIndex = 7; // // seCarouselDuration // this.seCarouselDuration.EditValue = new decimal(new int[] { 10, 0, 0, 0}); this.seCarouselDuration.Location = new System.Drawing.Point(151, 163); this.seCarouselDuration.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.seCarouselDuration.Name = "seCarouselDuration"; this.seCarouselDuration.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.seCarouselDuration.Properties.MaxValue = new decimal(new int[] { 3600, 0, 0, 0}); this.seCarouselDuration.Properties.MinValue = new decimal(new int[] { 1, 0, 0, 0}); this.seCarouselDuration.Size = new System.Drawing.Size(397, 28); this.seCarouselDuration.StyleController = this.layoutControl1; this.seCarouselDuration.TabIndex = 8; // // seSortOrder // this.seSortOrder.EditValue = new decimal(new int[] { 0, 0, 0, 0}); this.seSortOrder.Location = new System.Drawing.Point(151, 195); this.seSortOrder.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.seSortOrder.Name = "seSortOrder"; this.seSortOrder.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.seSortOrder.Properties.MaxValue = new decimal(new int[] { 99999, 0, 0, 0}); this.seSortOrder.Size = new System.Drawing.Size(397, 28); this.seSortOrder.StyleController = this.layoutControl1; this.seSortOrder.TabIndex = 9; // // chkIsExpanded // this.chkIsExpanded.Location = new System.Drawing.Point(14, 227); this.chkIsExpanded.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.chkIsExpanded.Name = "chkIsExpanded"; this.chkIsExpanded.Properties.Caption = "é»è®¤å±å¼"; this.chkIsExpanded.Size = new System.Drawing.Size(534, 27); this.chkIsExpanded.StyleController = this.layoutControl1; this.chkIsExpanded.TabIndex = 10; // // chkIsEnabled // this.chkIsEnabled.EditValue = true; this.chkIsEnabled.Location = new System.Drawing.Point(14, 258); this.chkIsEnabled.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.chkIsEnabled.Name = "chkIsEnabled"; this.chkIsEnabled.Properties.Caption = "å¯ç¨"; this.chkIsEnabled.Size = new System.Drawing.Size(534, 27); this.chkIsEnabled.StyleController = this.layoutControl1; this.chkIsEnabled.TabIndex = 11; // // btnSave // this.btnSave.Location = new System.Drawing.Point(14, 418); this.btnSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnSave.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(399, 32); this.btnSave.StyleController = this.layoutControl1; this.btnSave.TabIndex = 12; this.btnSave.Text = "ä¿å"; // // btnCancel // this.btnCancel.Location = new System.Drawing.Point(417, 418); this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(131, 32); this.btnCancel.StyleController = this.layoutControl1; this.btnCancel.TabIndex = 13; this.btnCancel.Text = "åæ¶"; // // layoutControlGroup1 // this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; this.layoutControlGroup1.GroupBordersVisible = false; this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.layoutControlItem1, this.layoutControlItem2, this.layoutControlItem3, this.layoutControlItem4, this.layoutControlItem5, this.layoutControlItem6, this.layoutControlItem7, this.layoutControlItem8, this.emptySpaceItem1, this.layoutControlItem9, this.layoutControlItem10}); this.layoutControlGroup1.Name = "layoutControlGroup1"; this.layoutControlGroup1.Size = new System.Drawing.Size(562, 464); this.layoutControlGroup1.TextVisible = false; // // layoutControlItem1 // this.layoutControlItem1.Control = this.txtCode; this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); this.layoutControlItem1.Name = "layoutControlItem1"; this.layoutControlItem1.Size = new System.Drawing.Size(538, 32); this.layoutControlItem1.Text = "ç¼ç ï¼"; this.layoutControlItem1.TextSize = new System.Drawing.Size(122, 22); // // layoutControlItem2 // this.layoutControlItem2.Control = this.txtTitle; this.layoutControlItem2.Location = new System.Drawing.Point(0, 32); this.layoutControlItem2.Name = "layoutControlItem2"; this.layoutControlItem2.Size = new System.Drawing.Size(538, 32); this.layoutControlItem2.Text = "åç§°ï¼"; this.layoutControlItem2.TextSize = new System.Drawing.Size(122, 22); // // layoutControlItem3 // this.layoutControlItem3.Control = this.rgNodeType; this.layoutControlItem3.Location = new System.Drawing.Point(0, 64); this.layoutControlItem3.Name = "layoutControlItem3"; this.layoutControlItem3.Size = new System.Drawing.Size(538, 53); this.layoutControlItem3.Text = "èç¹ç±»åï¼"; this.layoutControlItem3.TextSize = new System.Drawing.Size(122, 22); // // layoutControlItem4 // this.layoutControlItem4.Control = this.txtUrl; this.layoutControlItem4.Location = new System.Drawing.Point(0, 117); this.layoutControlItem4.Name = "layoutControlItem4"; this.layoutControlItem4.Size = new System.Drawing.Size(538, 32); this.layoutControlItem4.Text = "URLå°åï¼"; this.layoutControlItem4.TextSize = new System.Drawing.Size(122, 22); // // layoutControlItem5 // this.layoutControlItem5.Control = this.seCarouselDuration; this.layoutControlItem5.Location = new System.Drawing.Point(0, 149); this.layoutControlItem5.Name = "layoutControlItem5"; this.layoutControlItem5.Size = new System.Drawing.Size(538, 32); this.layoutControlItem5.Text = "è½®ææ¶é¿(ç§)ï¼"; this.layoutControlItem5.TextSize = new System.Drawing.Size(122, 22); // // layoutControlItem6 // this.layoutControlItem6.Control = this.seSortOrder; this.layoutControlItem6.Location = new System.Drawing.Point(0, 181); this.layoutControlItem6.Name = "layoutControlItem6"; this.layoutControlItem6.Size = new System.Drawing.Size(538, 32); this.layoutControlItem6.Text = "æåºå·ï¼"; this.layoutControlItem6.TextSize = new System.Drawing.Size(122, 22); // // layoutControlItem7 // this.layoutControlItem7.Control = this.chkIsExpanded; this.layoutControlItem7.Location = new System.Drawing.Point(0, 213); this.layoutControlItem7.Name = "layoutControlItem7"; this.layoutControlItem7.Size = new System.Drawing.Size(538, 31); this.layoutControlItem7.Text = "é»è®¤å±å¼ï¼"; this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem7.TextVisible = false; // // layoutControlItem8 // this.layoutControlItem8.Control = this.chkIsEnabled; this.layoutControlItem8.Location = new System.Drawing.Point(0, 244); this.layoutControlItem8.Name = "layoutControlItem8"; this.layoutControlItem8.Size = new System.Drawing.Size(538, 31); this.layoutControlItem8.Text = "å¯ç¨ç¶æï¼"; this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem8.TextVisible = false; // // emptySpaceItem1 // this.emptySpaceItem1.AllowHotTrack = false; this.emptySpaceItem1.Location = new System.Drawing.Point(0, 275); this.emptySpaceItem1.Name = "emptySpaceItem1"; this.emptySpaceItem1.Size = new System.Drawing.Size(538, 129); this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); // // layoutControlItem9 // this.layoutControlItem9.Control = this.btnSave; this.layoutControlItem9.Location = new System.Drawing.Point(0, 404); this.layoutControlItem9.Name = "layoutControlItem9"; this.layoutControlItem9.Size = new System.Drawing.Size(403, 36); this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem9.TextVisible = false; // // layoutControlItem10 // this.layoutControlItem10.Control = this.btnCancel; this.layoutControlItem10.Location = new System.Drawing.Point(403, 404); this.layoutControlItem10.Name = "layoutControlItem10"; this.layoutControlItem10.Size = new System.Drawing.Size(135, 36); this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem10.TextVisible = false; // // SimpleKanBanEdit // this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(562, 464); this.Controls.Add(this.layoutControl1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SimpleKanBanEdit"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "çæ¿èç¹ç¼è¾"; ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); this.layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.txtCode.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txtTitle.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rgNodeType.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txtUrl.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.seCarouselDuration.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.seSortOrder.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.chkIsExpanded.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.chkIsEnabled.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); this.ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraEditors.TextEdit txtCode; private DevExpress.XtraEditors.TextEdit txtTitle; private DevExpress.XtraEditors.RadioGroup rgNodeType; private DevExpress.XtraEditors.TextEdit txtUrl; private DevExpress.XtraEditors.SpinEdit seCarouselDuration; private DevExpress.XtraEditors.SpinEdit seSortOrder; private DevExpress.XtraEditors.CheckEdit chkIsExpanded; private DevExpress.XtraEditors.CheckEdit chkIsEnabled; private DevExpress.XtraEditors.SimpleButton btnSave; private DevExpress.XtraEditors.SimpleButton btnCancel; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; } } DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBanEdit.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,352 @@ using DevExpress.XtraEditors; using Gs.DevApp.ToolBox; using Newtonsoft.Json; using System; using System.Windows.Forms; namespace Gs.DevApp.DevFrm.Sys { /// <summary> /// çæ¿èç¹ç¼è¾çªä½ /// </summary> public partial class SimpleKanBanEdit : DevExpress.XtraEditors.XtraForm { private string _webServiceName = "MesSimpleManager/"; private string _strId = ""; // å½åç¼è¾çèç¹IDï¼ä¸ºç©ºè¡¨ç¤ºæ°å¢ï¼ private string _strFid = ""; // ç¶èç¹ID private int _nodeLevel = 0; // èç¹å±çº§ private bool _isEditMode = false; // æ¯å¦ä¸ºç¼è¾æ¨¡å¼ private bool _isLoading = false; // æ¯å¦æ£å¨å è½½æ°æ® /// <summary> /// ä¿åæååçåè°äºä»¶ /// </summary> public event EventHandler<UpdateParentEventArgs> UpdateParent; /// <summary> /// æé 彿° /// </summary> /// <param name="strId">èç¹IDï¼ä¸ºç©ºè¡¨ç¤ºæ°å¢</param> /// <param name="strFid">ç¶èç¹IDï¼ä¸ºç©ºè¡¨ç¤ºæ ¹èç¹</param> public SimpleKanBanEdit(string strId, string strFid) { InitializeComponent(); rgNodeType.EditValueChanged += RgNodeType_EditValueChanged; _strId = strId; _strFid = strFid; _isEditMode = !string.IsNullOrEmpty(_strId); // 设置çªä½æ é¢ this.Text = _isEditMode ? "ç¼è¾çæ¿èç¹" : "æ°å¢çæ¿èç¹"; // åå§åèç¹ç±»åé项ï¼0=æ ¹ç®å½, 1=çæ¿ç®å½, 2=çæ¿å å®¹ï¼ rgNodeType.Properties.Items.Clear(); rgNodeType.Properties.Items.Add(new DevExpress.XtraEditors.Controls.RadioGroupItem(0, "æ ¹ç®å½")); rgNodeType.Properties.Items.Add(new DevExpress.XtraEditors.Controls.RadioGroupItem(1, "çæ¿ç®å½")); rgNodeType.Properties.Items.Add(new DevExpress.XtraEditors.Controls.RadioGroupItem(2, "çæ¿å 容")); // ä¿åæé® btnSave.Click += BtnSave_Click; // åæ¶æé® btnCancel.Click += (s, e) => { this.Close(); }; // åå§åé»è®¤å¼ seSortOrder.Value = 0; seCarouselDuration.Value = 10; chkIsExpanded.Checked = false; chkIsEnabled.Checked = true; // å è½½æ°æ® if (_isEditMode) { LoadModel(); } else { // æ°å¢æ¨¡å¼ï¼æ ¹æ®ç¶èç¹è®¡ç®å½åèç¹å±çº§å¹¶è®¾ç½®èç¹ç±»å InitNodeLevelAndType(); } } /// <summary> /// æ°å¢æ¨¡å¼ï¼åå§åèç¹å±çº§ /// è§åï¼ /// - node_level = 0ï¼æ ¹èç¹ /// - node_level >= 1ï¼éæ ¹èç¹ /// </summary> private void InitNodeLevelAndType() { if (string.IsNullOrEmpty(_strFid)) { // æ ç¶èç¹ï¼è¯´ææ¯æ ¹èç¹ _nodeLevel = 0; } else { // æç¶èç¹ï¼åºäºç¶èç¹å±çº§ +1 try { var _obj = new { Id = long.Parse(_strFid) }; var json = JsonConvert.SerializeObject(_obj); var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModel", json); var dd = UtilityHelper.ReturnToDynamic(strReturn); if (dd.rtnCode > 0 && dd.rtnData != null) { int parentNodeLevel = dd.rtnData.nodeLevel != null ? Convert.ToInt32(dd.rtnData.nodeLevel) : 0; _nodeLevel = parentNodeLevel + 1; } else { _nodeLevel = 1; } } catch { _nodeLevel = 1; } } // æ ¹æ®å±çº§åå§å NodeType & æ§ä»¶ç¶æ SetNodeTypeByLevel(); } /// <summary> /// æ ¹æ®èç¹å±çº§è®¾ç½®èç¹ç±»å /// - node_level = 0ï¼åªè½é 0ï¼æ ¹ç®å½ï¼ï¼æ´ä¸ªæ§ä»¶ç¦ç¨ /// - node_level >= 1ï¼åªè½é 1 / 2ï¼æ ¹ç®å½é¡¹ç°æä¸å¯é /// </summary> private void SetNodeTypeByLevel() { // å ç»ä¸å¯ç¨æ§ä»¶ï¼å颿æ åµå¤ç rgNodeType.Enabled = true; if (_nodeLevel == 0) { // æ ¹èç¹ï¼åªè½æ¯æ ¹ç®å½ rgNodeType.EditValue = 0; rgNodeType.Enabled = false; } else { // éæ ¹èç¹ï¼ä¸è½éâæ ¹ç®å½(0)â DisableRootNodeTypeItem(); // 妿å½å弿¯ 0ï¼å¼ºå¶åå°é»è®¤å¼ if (rgNodeType.EditValue == null || Convert.ToInt32(rgNodeType.EditValue) == 0) { rgNodeType.EditValue = 1; // é»è®¤âçæ¿ç®å½â } } SetControlsByNodeType(); } /// <summary> /// ç¦ç¨ NodeType=0ï¼æ ¹ç®å½ï¼é项 /// </summary> private void DisableRootNodeTypeItem() { foreach (DevExpress.XtraEditors.Controls.RadioGroupItem item in rgNodeType.Properties.Items) { if (Convert.ToInt32(item.Value) == 0) { item.Enabled = false; break; } } } private void LoadModel() { try { var _obj = new { Id = long.Parse(_strId) }; var json = JsonConvert.SerializeObject(_obj); var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModel", json); var dd = UtilityHelper.ReturnToDynamic(strReturn); if (dd.rtnCode > 0 && dd.rtnData != null) { var m = dd.rtnData; // 1. åºç¡èµå¼ txtCode.Text = m.code != null ? m.code.ToString() : ""; txtTitle.Text = m.title != null ? m.title.ToString() : ""; txtUrl.Text = m.url != null ? m.url.ToString() : ""; _isLoading = true; _nodeLevel = m.nodeLevel != null ? Convert.ToInt32(m.nodeLevel) : 0; if (m.parentId != null) _strFid = m.parentId.ToString(); if (m.nodeType != null) { int type = Convert.ToInt32(m.nodeType); rgNodeType.EditValue = type; // è·ååèç¹æ°é (ä»åå¨è¿ç¨æ°å¢çåæ®µ) int childCount = m.childCount != null ? Convert.ToInt32(m.childCount) : 0; // é»è¾å¤æ if (type == 0) { // æ ¹ç®å½ï¼æ°¸è¿ä¸å¯ä¿®æ¹ rgNodeType.Properties.ReadOnly = true; } else { if (childCount > 0) { rgNodeType.Properties.ReadOnly = true; // å¯ä»¥ç»ç¨æ·ä¸ä¸ªæç¤º(Tooltip)æå¨ä¿åæ¶ä½ç°ï¼è¿éä» æ§å¶UIåªè¯» } else { rgNodeType.Properties.ReadOnly = false; } } } SetControlsByNodeType(); // å·æ°çé¢ _isLoading = false; // å ¶ä»å段 if (m.carouselDuration != null) seCarouselDuration.Value = Convert.ToInt32(m.carouselDuration); if (m.sortOrder != null) seSortOrder.Value = Convert.ToInt32(m.sortOrder); chkIsExpanded.Checked = m.isExpanded != null && Convert.ToBoolean(m.isExpanded); chkIsEnabled.Checked = m.isEnabled != null && Convert.ToBoolean(m.isEnabled); } else { MsgHelper.ShowError("å è½½æ°æ®å¤±è´¥ï¼" + dd.rtnMsg); } } catch (Exception ex) { MsgHelper.ShowError("å è½½æ°æ®å¼å¸¸ï¼" + ex.Message); } } /// <summary> /// æ ¹æ®èç¹å±çº§ï¼node_levelï¼è®¾ç½® URL åè½®ææ¶é¿æ¾ç¤ºç¶æ /// </summary> private void SetControlsByNodeType() { int nodeType = Convert.ToInt32(rgNodeType.EditValue); // åªæ nodeType == 2ï¼çæ¿å å®¹ï¼ææ¾ç¤º bool show = (nodeType == 2); SetUrlAndDurationVisible(show); } /// <summary> /// ç±»åæ´æ¹èªå¨å·æ° /// </summary> private void RgNodeType_EditValueChanged(object sender, EventArgs e) { SetControlsByNodeType(); } /// <summary> /// 设置 URL åè½®ææ¶é¿çæ¾ç¤ºç¶æ /// </summary> private void SetUrlAndDurationVisible(bool visible) { // æ§å¶å¯è§æ§ layoutControlItem4.Visibility = visible ? DevExpress.XtraLayout.Utils.LayoutVisibility.Always : DevExpress.XtraLayout.Utils.LayoutVisibility.Never; layoutControlItem5.Visibility = visible ? DevExpress.XtraLayout.Utils.LayoutVisibility.Always : DevExpress.XtraLayout.Utils.LayoutVisibility.Never; // æ§å¶å¯ç¼è¾ç¶æ txtUrl.Enabled = visible; seCarouselDuration.Enabled = visible; if (!visible) { // ä¸å¯è§æ¶æ¸ 空 txtUrl.Text = string.Empty; seCarouselDuration.Value = 0; } else { // å¯è§æ¶ç»é»è®¤å¼ if (seCarouselDuration.Value <= 0) { seCarouselDuration.Value = 5; // é»è®¤ 5 ç§ } } } /// <summary> /// ä¿åæé®ç¹å»äºä»¶ /// </summary> private void BtnSave_Click(object sender, EventArgs e) { // éªè¯å¿ 填项 if (string.IsNullOrWhiteSpace(txtTitle.Text)) { MsgHelper.Warning("åç§°ä¸è½ä¸ºç©ºï¼"); txtTitle.Focus(); return; } // èç¹ç±»åä¸ºçæ¿å 容æ¶ï¼URLä¸è½ä¸ºç©º if ((int)rgNodeType.EditValue == 2 && string.IsNullOrWhiteSpace(txtUrl.Text)) { MsgHelper.Warning("çæ¿å 容çURLå°åä¸è½ä¸ºç©ºï¼"); txtUrl.Focus(); return; } try { // æå»ºä¿å对象 var _obj = new { Id = string.IsNullOrEmpty(_strId) ? 0 : long.Parse(_strId), ParentId = string.IsNullOrEmpty(_strFid) ? (long?)null : long.Parse(_strFid), NodeType = (int)rgNodeType.EditValue, Code = string.IsNullOrWhiteSpace(txtCode.Text) ? null : txtCode.Text.Trim(), Title = txtTitle.Text.Trim(), Url = string.IsNullOrWhiteSpace(txtUrl.Text) ? null : txtUrl.Text.Trim(), CarouselDuration = (int)rgNodeType.EditValue == 2 ? (int?)seCarouselDuration.Value : null, IsExpanded = chkIsExpanded.Checked, IsEnabled = chkIsEnabled.Checked, SortOrder = (int)seSortOrder.Value }; var json = JsonConvert.SerializeObject(_obj); var strReturn = UtilityHelper.HttpPost("", _webServiceName + "SaveModel", json); var dd = UtilityHelper.ReturnToDynamic(strReturn); if (dd.rtnCode > 0) { MsgHelper.ShowInformation("ä¿åæåï¼"); // 触åç¶çªä½å·æ°äºä»¶ UpdateParent?.Invoke(this, new UpdateParentEventArgs()); this.Close(); } else { MsgHelper.ShowError("ä¿å失败ï¼" + dd.rtnMsg); } } catch (Exception ex) { MsgHelper.ShowError("ä¿åå¼å¸¸ï¼" + ex.Message); } } } } DevApp/Gs.DevApp/DevFrm/Sys/SimpleKanBanEdit.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> DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -987,6 +987,12 @@ <Compile Include="DevFrm\Sales\Frm_SalesReturnNoticeSelectLink.Designer.cs"> <DependentUpon>Frm_SalesReturnNoticeSelectLink.cs</DependentUpon> </Compile> <Compile Include="DevFrm\Sys\DefectCodeKanban.cs"> <SubType>Form</SubType> </Compile> <Compile Include="DevFrm\Sys\DefectCodeKanban.Designer.cs"> <DependentUpon>DefectCodeKanban.cs</DependentUpon> </Compile> <Compile Include="DevFrm\Sys\EasyRptEdt.cs"> <SubType>Form</SubType> </Compile> @@ -1004,6 +1010,18 @@ </Compile> <Compile Include="DevFrm\Sys\Frm_Config.Designer.cs"> <DependentUpon>Frm_Config.cs</DependentUpon> </Compile> <Compile Include="DevFrm\Sys\SimpleKanBan.cs"> <SubType>UserControl</SubType> </Compile> <Compile Include="DevFrm\Sys\SimpleKanBan.Designer.cs"> <DependentUpon>SimpleKanBan.cs</DependentUpon> </Compile> <Compile Include="DevFrm\Sys\SimpleKanBanEdit.cs"> <SubType>Form</SubType> </Compile> <Compile Include="DevFrm\Sys\SimpleKanBanEdit.Designer.cs"> <DependentUpon>SimpleKanBanEdit.cs</DependentUpon> </Compile> <Compile Include="DevFrm\User\ViewRole.cs"> <SubType>Form</SubType> @@ -2129,6 +2147,9 @@ <EmbeddedResource Include="DevFrm\Sales\Frm_SalesReturnNoticeSelectLink.resx"> <DependentUpon>Frm_SalesReturnNoticeSelectLink.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="DevFrm\Sys\DefectCodeKanban.resx"> <DependentUpon>DefectCodeKanban.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="DevFrm\Sys\EasyRptEdt.resx"> <DependentUpon>EasyRptEdt.cs</DependentUpon> </EmbeddedResource> @@ -2138,6 +2159,12 @@ <EmbeddedResource Include="DevFrm\Sys\Frm_Config.resx"> <DependentUpon>Frm_Config.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="DevFrm\Sys\SimpleKanBan.resx"> <DependentUpon>SimpleKanBan.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="DevFrm\Sys\SimpleKanBanEdit.resx"> <DependentUpon>SimpleKanBanEdit.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="DevFrm\User\ViewRole.resx"> <DependentUpon>ViewRole.cs</DependentUpon> </EmbeddedResource> DevApp/Gs.DevApp/UserControl/SelectHz.Designer.cs
@@ -40,6 +40,7 @@ this.gv_time = new DevExpress.XtraGrid.Columns.GridColumn(); this.gv_Btn = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit(); @@ -48,26 +49,28 @@ // gcMain // this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill; this.gcMain.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4); this.gcMain.Location = new System.Drawing.Point(0, 0); this.gcMain.MainView = this.gridView1; this.gcMain.Margin = new System.Windows.Forms.Padding(4); this.gcMain.Name = "gcMain"; this.gcMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemButtonEdit1}); this.gcMain.Size = new System.Drawing.Size(581, 489); this.gcMain.Size = new System.Drawing.Size(1014, 600); this.gcMain.TabIndex = 3; this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView1}); // // gridView1 // this.gridView1.Appearance.Row.Options.UseFont = true; this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.gv_Name, this.gv_no, this.gv_time, this.gv_Btn}); this.gv_Btn, this.gridColumn1}); this.gridView1.DetailHeight = 428; this.gridView1.GridControl = this.gcMain; this.gridView1.Name = "gridView1"; this.gridView1.OptionsFind.ShowSearchNavButtons = false; @@ -76,53 +79,50 @@ // // gv_Name // this.gv_Name.AppearanceCell.Options.UseFont = true; this.gv_Name.Caption = "åç§°"; this.gv_Name.FieldName = "name"; this.gv_Name.MinWidth = 10; this.gv_Name.MinWidth = 12; this.gv_Name.Name = "gv_Name"; this.gv_Name.OptionsColumn.AllowEdit = false; this.gv_Name.Tag = "query_OPERATION_TIME"; this.gv_Name.Visible = true; this.gv_Name.VisibleIndex = 0; this.gv_Name.Width = 300; this.gv_Name.Width = 375; // // gv_no // this.gv_no.AppearanceCell.Options.UseFont = true; this.gv_no.Caption = "ç¼å·"; this.gv_no.FieldName = "fNumber"; this.gv_no.MinWidth = 10; this.gv_no.MinWidth = 12; this.gv_no.Name = "gv_no"; this.gv_no.OptionsColumn.AllowEdit = false; this.gv_no.Tag = "query_OPERATION_TABLE"; this.gv_no.Visible = true; this.gv_no.VisibleIndex = 1; this.gv_no.Width = 100; this.gv_no.VisibleIndex = 2; this.gv_no.Width = 125; // // gv_time // this.gv_time.AppearanceCell.Options.UseFont = true; this.gv_time.Caption = "忥æ¶é´"; this.gv_time.FieldName = "edtTime"; this.gv_time.MinWidth = 10; this.gv_time.MinWidth = 12; this.gv_time.Name = "gv_time"; this.gv_time.OptionsColumn.AllowEdit = false; this.gv_time.Tag = "query_USER_NAME"; this.gv_time.Width = 250; this.gv_time.Width = 312; // // gv_Btn // this.gv_Btn.Caption = "éæ©"; this.gv_Btn.ColumnEdit = this.repositoryItemButtonEdit1; this.gv_Btn.MinWidth = 25; this.gv_Btn.MinWidth = 31; this.gv_Btn.Name = "gv_Btn"; this.gv_Btn.Visible = true; this.gv_Btn.VisibleIndex = 2; this.gv_Btn.Width = 94; this.gv_Btn.VisibleIndex = 3; this.gv_Btn.Width = 117; // // repositoryItemButtonEdit1 // @@ -135,13 +135,24 @@ this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick); // // gridColumn1 // this.gridColumn1.Caption = "ç»ç»"; this.gridColumn1.FieldName = "fSubsidiary"; this.gridColumn1.MinWidth = 30; this.gridColumn1.Name = "gridColumn1"; this.gridColumn1.Visible = true; this.gridColumn1.VisibleIndex = 1; this.gridColumn1.Width = 94; // // SelectHz // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(581, 489); this.ClientSize = new System.Drawing.Size(1014, 600); this.Controls.Add(this.gcMain); this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; this.Margin = new System.Windows.Forms.Padding(4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SelectHz"; @@ -163,5 +174,6 @@ private DevExpress.XtraGrid.Columns.GridColumn gv_time; private DevExpress.XtraGrid.Columns.GridColumn gv_Btn; private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; } }