瀏覽代碼

Merge branch 'master' of http://139.155.15.221:3000/zoulei/DW5S

wyq 4 月之前
父節點
當前提交
e4f66c3bcc

+ 57 - 18
DW5S.App/EditForms/CdbEditor.Designer.cs

@@ -54,6 +54,9 @@
             layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            checkEdit = new DevExpress.XtraEditors.CheckEdit();
+            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
             ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
             layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)txtRemark.Properties).BeginInit();
@@ -69,10 +72,14 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).BeginInit();
             SuspendLayout();
             // 
             // layoutControl1
             // 
+            layoutControl1.Controls.Add(checkEdit);
             layoutControl1.Controls.Add(btnOk);
             layoutControl1.Controls.Add(btnCancle);
             layoutControl1.Controls.Add(txtRemark);
@@ -83,27 +90,27 @@
             layoutControl1.Location = new System.Drawing.Point(0, 0);
             layoutControl1.Name = "layoutControl1";
             layoutControl1.Root = Root;
-            layoutControl1.Size = new System.Drawing.Size(244, 301);
+            layoutControl1.Size = new System.Drawing.Size(244, 350);
             layoutControl1.TabIndex = 0;
             layoutControl1.Text = "layoutControl1";
             // 
             // btnOk
             // 
-            btnOk.Location = new System.Drawing.Point(124, 238);
+            btnOk.Location = new System.Drawing.Point(124, 286);
             btnOk.Name = "btnOk";
             btnOk.Size = new System.Drawing.Size(108, 22);
             btnOk.StyleController = layoutControl1;
-            btnOk.TabIndex = 10;
+            btnOk.TabIndex = 7;
             btnOk.Text = "确定";
             btnOk.Click += btnOk_Click;
             // 
             // btnCancle
             // 
-            btnCancle.Location = new System.Drawing.Point(12, 238);
+            btnCancle.Location = new System.Drawing.Point(12, 286);
             btnCancle.Name = "btnCancle";
             btnCancle.Size = new System.Drawing.Size(108, 22);
             btnCancle.StyleController = layoutControl1;
-            btnCancle.TabIndex = 9;
+            btnCancle.TabIndex = 6;
             btnCancle.Text = "取消";
             btnCancle.Click += btnCancle_Click;
             // 
@@ -113,7 +120,7 @@
             txtRemark.Name = "txtRemark";
             txtRemark.Size = new System.Drawing.Size(220, 20);
             txtRemark.StyleController = layoutControl1;
-            txtRemark.TabIndex = 8;
+            txtRemark.TabIndex = 4;
             // 
             // txtCdbTxName
             // 
@@ -121,7 +128,7 @@
             txtCdbTxName.Name = "txtCdbTxName";
             txtCdbTxName.Size = new System.Drawing.Size(220, 20);
             txtCdbTxName.StyleController = layoutControl1;
-            txtCdbTxName.TabIndex = 4;
+            txtCdbTxName.TabIndex = 0;
             // 
             // txtLon
             // 
@@ -132,7 +139,7 @@
             txtLon.Properties.MaskSettings.Set("mask", "f3");
             txtLon.Size = new System.Drawing.Size(220, 23);
             txtLon.StyleController = layoutControl1;
-            txtLon.TabIndex = 5;
+            txtLon.TabIndex = 2;
             // 
             // txtLat
             // 
@@ -143,15 +150,15 @@
             txtLat.Properties.MaskSettings.Set("mask", "f3");
             txtLat.Size = new System.Drawing.Size(220, 23);
             txtLat.StyleController = layoutControl1;
-            txtLat.TabIndex = 6;
+            txtLat.TabIndex = 3;
             // 
             // Root
             // 
             Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             Root.GroupBordersVisible = false;
-            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1, emptySpaceItem2 });
+            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1, emptySpaceItem2, layoutControlItem4, emptySpaceItem3 });
             Root.Name = "Root";
-            Root.Size = new System.Drawing.Size(244, 301);
+            Root.Size = new System.Drawing.Size(244, 350);
             Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -201,7 +208,7 @@
             // layoutControlItem6
             // 
             layoutControlItem6.Control = btnCancle;
-            layoutControlItem6.Location = new System.Drawing.Point(0, 226);
+            layoutControlItem6.Location = new System.Drawing.Point(0, 274);
             layoutControlItem6.Name = "layoutControlItem6";
             layoutControlItem6.Size = new System.Drawing.Size(112, 26);
             layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
@@ -210,7 +217,7 @@
             // layoutControlItem7
             // 
             layoutControlItem7.Control = btnOk;
-            layoutControlItem7.Location = new System.Drawing.Point(112, 226);
+            layoutControlItem7.Location = new System.Drawing.Point(112, 274);
             layoutControlItem7.Name = "layoutControlItem7";
             layoutControlItem7.Size = new System.Drawing.Size(112, 26);
             layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
@@ -219,24 +226,50 @@
             // emptySpaceItem1
             // 
             emptySpaceItem1.AllowHotTrack = false;
-            emptySpaceItem1.Location = new System.Drawing.Point(0, 194);
+            emptySpaceItem1.Location = new System.Drawing.Point(0, 245);
             emptySpaceItem1.Name = "emptySpaceItem1";
-            emptySpaceItem1.Size = new System.Drawing.Size(224, 32);
+            emptySpaceItem1.Size = new System.Drawing.Size(224, 29);
             emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             emptySpaceItem2.AllowHotTrack = false;
-            emptySpaceItem2.Location = new System.Drawing.Point(0, 252);
+            emptySpaceItem2.Location = new System.Drawing.Point(0, 300);
             emptySpaceItem2.Name = "emptySpaceItem2";
-            emptySpaceItem2.Size = new System.Drawing.Size(224, 29);
+            emptySpaceItem2.Size = new System.Drawing.Size(224, 30);
             emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // checkEdit
+            // 
+            checkEdit.Location = new System.Drawing.Point(12, 233);
+            checkEdit.Name = "checkEdit";
+            checkEdit.Properties.Caption = "是否启用";
+            checkEdit.Size = new System.Drawing.Size(220, 20);
+            checkEdit.StyleController = layoutControl1;
+            checkEdit.TabIndex = 5;
+            // 
+            // layoutControlItem4
+            // 
+            layoutControlItem4.Control = checkEdit;
+            layoutControlItem4.Location = new System.Drawing.Point(0, 221);
+            layoutControlItem4.Name = "layoutControlItem4";
+            layoutControlItem4.Size = new System.Drawing.Size(224, 24);
+            layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem4.TextVisible = false;
+            // 
+            // emptySpaceItem3
+            // 
+            emptySpaceItem3.AllowHotTrack = false;
+            emptySpaceItem3.Location = new System.Drawing.Point(0, 194);
+            emptySpaceItem3.Name = "emptySpaceItem3";
+            emptySpaceItem3.Size = new System.Drawing.Size(224, 27);
+            emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
+            // 
             // CdbEditor
             // 
             AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            ClientSize = new System.Drawing.Size(244, 301);
+            ClientSize = new System.Drawing.Size(244, 350);
             Controls.Add(layoutControl1);
             FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             Name = "CdbEditor";
@@ -257,6 +290,9 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).EndInit();
             ResumeLayout(false);
         }
 
@@ -278,5 +314,8 @@
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
         private DevExpress.XtraEditors.ButtonEdit txtLon;
         private DevExpress.XtraEditors.ButtonEdit txtLat;
+        private DevExpress.XtraEditors.CheckEdit checkEdit;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
     }
 }

+ 2 - 0
DW5S.App/EditForms/CdbEditor.cs

@@ -46,6 +46,7 @@ namespace DW5S.App.EditForms
                 this.txtLon.Text = info.Lon.ToString();
                 this.txtLat.Text = info.Lat.ToString();
                 this.txtRemark.EditValue = info.Remark;
+                this.checkEdit.EditValue = info.Enable;
             }
             infos = new List<CdbTxViewModel>();
             var unitOfWork = IocContainer.UnitOfWork;
@@ -67,6 +68,7 @@ namespace DW5S.App.EditForms
                 info.Lon=Convert.ToDouble(txtLon.Text);
                 info.Lat = Convert.ToDouble(txtLat.Text);
                 info.Remark = txtRemark.Text;
+                info.Enable = (bool)checkEdit.EditValue;
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)

+ 64 - 25
DW5S.App/EditForms/CxEditor.Designer.cs

@@ -28,16 +28,16 @@
         /// </summary>
         private void InitializeComponent()
         {
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
             layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             btnOk = new DevExpress.XtraEditors.SimpleButton();
             btnCancle = new DevExpress.XtraEditors.SimpleButton();
@@ -54,6 +54,9 @@
             layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            checkEdit = new DevExpress.XtraEditors.CheckEdit();
+            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
             ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
             layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)txtRemark.Properties).BeginInit();
@@ -69,10 +72,14 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).BeginInit();
             SuspendLayout();
             // 
             // layoutControl1
             // 
+            layoutControl1.Controls.Add(checkEdit);
             layoutControl1.Controls.Add(btnOk);
             layoutControl1.Controls.Add(btnCancle);
             layoutControl1.Controls.Add(txtRemark);
@@ -83,27 +90,27 @@
             layoutControl1.Location = new System.Drawing.Point(0, 0);
             layoutControl1.Name = "layoutControl1";
             layoutControl1.Root = Root;
-            layoutControl1.Size = new System.Drawing.Size(244, 304);
+            layoutControl1.Size = new System.Drawing.Size(244, 346);
             layoutControl1.TabIndex = 0;
             layoutControl1.Text = "layoutControl1";
             // 
             // btnOk
             // 
-            btnOk.Location = new System.Drawing.Point(124, 239);
+            btnOk.Location = new System.Drawing.Point(124, 285);
             btnOk.Name = "btnOk";
             btnOk.Size = new System.Drawing.Size(108, 22);
             btnOk.StyleController = layoutControl1;
-            btnOk.TabIndex = 10;
+            btnOk.TabIndex = 7;
             btnOk.Text = "确定";
             btnOk.Click += btnOk_Click;
             // 
             // btnCancle
             // 
-            btnCancle.Location = new System.Drawing.Point(12, 239);
+            btnCancle.Location = new System.Drawing.Point(12, 285);
             btnCancle.Name = "btnCancle";
             btnCancle.Size = new System.Drawing.Size(108, 22);
             btnCancle.StyleController = layoutControl1;
-            btnCancle.TabIndex = 9;
+            btnCancle.TabIndex = 6;
             btnCancle.Text = "取消";
             btnCancle.Click += btnCancle_Click;
             // 
@@ -113,7 +120,7 @@
             txtRemark.Name = "txtRemark";
             txtRemark.Size = new System.Drawing.Size(220, 20);
             txtRemark.StyleController = layoutControl1;
-            txtRemark.TabIndex = 8;
+            txtRemark.TabIndex = 4;
             // 
             // txtCxTxName
             // 
@@ -121,37 +128,37 @@
             txtCxTxName.Name = "txtCxTxName";
             txtCxTxName.Size = new System.Drawing.Size(220, 20);
             txtCxTxName.StyleController = layoutControl1;
-            txtCxTxName.TabIndex = 4;
+            txtCxTxName.TabIndex = 0;
             // 
             // txtLon
             // 
             txtLon.Location = new System.Drawing.Point(12, 78);
             txtLon.Name = "txtLon";
-            txtLon.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtLon.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
             txtLon.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             txtLon.Properties.MaskSettings.Set("mask", "f3");
             txtLon.Size = new System.Drawing.Size(220, 23);
             txtLon.StyleController = layoutControl1;
-            txtLon.TabIndex = 5;
+            txtLon.TabIndex = 2;
             // 
             // txtLat
             // 
             txtLat.Location = new System.Drawing.Point(12, 130);
             txtLat.Name = "txtLat";
-            txtLat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtLat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
             txtLat.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             txtLat.Properties.MaskSettings.Set("mask", "f3");
             txtLat.Size = new System.Drawing.Size(220, 23);
             txtLat.StyleController = layoutControl1;
-            txtLat.TabIndex = 6;
+            txtLat.TabIndex = 3;
             // 
             // Root
             // 
             Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             Root.GroupBordersVisible = false;
-            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1, emptySpaceItem2 });
+            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1, emptySpaceItem2, layoutControlItem4, emptySpaceItem3 });
             Root.Name = "Root";
-            Root.Size = new System.Drawing.Size(244, 304);
+            Root.Size = new System.Drawing.Size(244, 346);
             Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -201,7 +208,7 @@
             // layoutControlItem6
             // 
             layoutControlItem6.Control = btnCancle;
-            layoutControlItem6.Location = new System.Drawing.Point(0, 227);
+            layoutControlItem6.Location = new System.Drawing.Point(0, 273);
             layoutControlItem6.Name = "layoutControlItem6";
             layoutControlItem6.Size = new System.Drawing.Size(112, 26);
             layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
@@ -210,7 +217,7 @@
             // layoutControlItem7
             // 
             layoutControlItem7.Control = btnOk;
-            layoutControlItem7.Location = new System.Drawing.Point(112, 227);
+            layoutControlItem7.Location = new System.Drawing.Point(112, 273);
             layoutControlItem7.Name = "layoutControlItem7";
             layoutControlItem7.Size = new System.Drawing.Size(112, 26);
             layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
@@ -219,24 +226,50 @@
             // emptySpaceItem1
             // 
             emptySpaceItem1.AllowHotTrack = false;
-            emptySpaceItem1.Location = new System.Drawing.Point(0, 194);
+            emptySpaceItem1.Location = new System.Drawing.Point(0, 249);
             emptySpaceItem1.Name = "emptySpaceItem1";
-            emptySpaceItem1.Size = new System.Drawing.Size(224, 33);
+            emptySpaceItem1.Size = new System.Drawing.Size(224, 24);
             emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             emptySpaceItem2.AllowHotTrack = false;
-            emptySpaceItem2.Location = new System.Drawing.Point(0, 253);
+            emptySpaceItem2.Location = new System.Drawing.Point(0, 299);
             emptySpaceItem2.Name = "emptySpaceItem2";
-            emptySpaceItem2.Size = new System.Drawing.Size(224, 31);
+            emptySpaceItem2.Size = new System.Drawing.Size(224, 27);
             emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // checkEdit
+            // 
+            checkEdit.Location = new System.Drawing.Point(12, 237);
+            checkEdit.Name = "checkEdit";
+            checkEdit.Properties.Caption = "是否启用";
+            checkEdit.Size = new System.Drawing.Size(220, 20);
+            checkEdit.StyleController = layoutControl1;
+            checkEdit.TabIndex = 5;
+            // 
+            // layoutControlItem4
+            // 
+            layoutControlItem4.Control = checkEdit;
+            layoutControlItem4.Location = new System.Drawing.Point(0, 225);
+            layoutControlItem4.Name = "layoutControlItem4";
+            layoutControlItem4.Size = new System.Drawing.Size(224, 24);
+            layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem4.TextVisible = false;
+            // 
+            // emptySpaceItem3
+            // 
+            emptySpaceItem3.AllowHotTrack = false;
+            emptySpaceItem3.Location = new System.Drawing.Point(0, 194);
+            emptySpaceItem3.Name = "emptySpaceItem3";
+            emptySpaceItem3.Size = new System.Drawing.Size(224, 31);
+            emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
+            // 
             // CxEditor
             // 
             AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            ClientSize = new System.Drawing.Size(244, 304);
+            ClientSize = new System.Drawing.Size(244, 346);
             Controls.Add(layoutControl1);
             FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             Name = "CxEditor";
@@ -257,6 +290,9 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).EndInit();
             ResumeLayout(false);
         }
 
@@ -278,5 +314,8 @@
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
         private DevExpress.XtraEditors.ButtonEdit txtLon;
         private DevExpress.XtraEditors.ButtonEdit txtLat;
+        private DevExpress.XtraEditors.CheckEdit checkEdit;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
     }
 }

+ 2 - 0
DW5S.App/EditForms/CxEditor.cs

@@ -43,6 +43,7 @@ namespace DW5S.App.EditForms
                 this.txtLon.Text = info.Lon.ToString();
                 this.txtLat.Text = info.Lat.ToString();
                 this.txtRemark.EditValue = info.Remark;
+                this.checkEdit.EditValue = info.Enable;
             }
             infos = new List<CxTxViewModel>();
             var unitOfWork = IocContainer.UnitOfWork;
@@ -64,6 +65,7 @@ namespace DW5S.App.EditForms
                 info.Lon=Convert.ToDouble(txtLon.Text);
                 info.Lat = Convert.ToDouble(txtLat.Text);
                 info.Remark = txtRemark.Text;
+                info.Enable = (bool)checkEdit.EditValue;
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)

+ 65 - 24
DW5S.App/EditForms/RecEditor.Designer.cs

@@ -28,16 +28,16 @@
         /// </summary>
         private void InitializeComponent()
         {
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
             layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             btnOk = new DevExpress.XtraEditors.SimpleButton();
             btnCancle = new DevExpress.XtraEditors.SimpleButton();
@@ -54,6 +54,9 @@
             layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            checkEdit = new DevExpress.XtraEditors.CheckEdit();
+            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
             ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
             layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)txtRemark.Properties).BeginInit();
@@ -69,10 +72,14 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).BeginInit();
             SuspendLayout();
             // 
             // layoutControl1
             // 
+            layoutControl1.Controls.Add(checkEdit);
             layoutControl1.Controls.Add(btnOk);
             layoutControl1.Controls.Add(btnCancle);
             layoutControl1.Controls.Add(txtRemark);
@@ -83,27 +90,27 @@
             layoutControl1.Location = new System.Drawing.Point(0, 0);
             layoutControl1.Name = "layoutControl1";
             layoutControl1.Root = Root;
-            layoutControl1.Size = new System.Drawing.Size(244, 298);
+            layoutControl1.Size = new System.Drawing.Size(244, 351);
             layoutControl1.TabIndex = 0;
             layoutControl1.Text = "layoutControl1";
             // 
             // btnOk
             // 
-            btnOk.Location = new System.Drawing.Point(124, 237);
+            btnOk.Location = new System.Drawing.Point(124, 286);
             btnOk.Name = "btnOk";
             btnOk.Size = new System.Drawing.Size(108, 22);
             btnOk.StyleController = layoutControl1;
-            btnOk.TabIndex = 10;
+            btnOk.TabIndex = 7;
             btnOk.Text = "确定";
             btnOk.Click += btnOk_Click;
             // 
             // btnCancle
             // 
-            btnCancle.Location = new System.Drawing.Point(12, 237);
+            btnCancle.Location = new System.Drawing.Point(12, 286);
             btnCancle.Name = "btnCancle";
             btnCancle.Size = new System.Drawing.Size(108, 22);
             btnCancle.StyleController = layoutControl1;
-            btnCancle.TabIndex = 9;
+            btnCancle.TabIndex = 6;
             btnCancle.Text = "取消";
             btnCancle.Click += btnCancle_Click;
             // 
@@ -113,7 +120,7 @@
             txtRemark.Name = "txtRemark";
             txtRemark.Size = new System.Drawing.Size(220, 20);
             txtRemark.StyleController = layoutControl1;
-            txtRemark.TabIndex = 8;
+            txtRemark.TabIndex = 4;
             // 
             // txtRecTxName
             // 
@@ -121,37 +128,37 @@
             txtRecTxName.Name = "txtRecTxName";
             txtRecTxName.Size = new System.Drawing.Size(220, 20);
             txtRecTxName.StyleController = layoutControl1;
-            txtRecTxName.TabIndex = 4;
+            txtRecTxName.TabIndex = 0;
             // 
             // txtLon
             // 
             txtLon.Location = new System.Drawing.Point(12, 78);
             txtLon.Name = "txtLon";
-            txtLon.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtLon.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
             txtLon.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             txtLon.Properties.MaskSettings.Set("mask", "f3");
             txtLon.Size = new System.Drawing.Size(220, 23);
             txtLon.StyleController = layoutControl1;
-            txtLon.TabIndex = 5;
+            txtLon.TabIndex = 2;
             // 
             // txtLat
             // 
             txtLat.Location = new System.Drawing.Point(12, 130);
             txtLat.Name = "txtLat";
-            txtLat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtLat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
             txtLat.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             txtLat.Properties.MaskSettings.Set("mask", "f3");
             txtLat.Size = new System.Drawing.Size(220, 23);
             txtLat.StyleController = layoutControl1;
-            txtLat.TabIndex = 6;
+            txtLat.TabIndex = 3;
             // 
             // Root
             // 
             Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             Root.GroupBordersVisible = false;
-            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1, emptySpaceItem2 });
+            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem2, layoutControlItem4, emptySpaceItem3, emptySpaceItem1 });
             Root.Name = "Root";
-            Root.Size = new System.Drawing.Size(244, 298);
+            Root.Size = new System.Drawing.Size(244, 351);
             Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -200,7 +207,7 @@
             // layoutControlItem6
             // 
             layoutControlItem6.Control = btnCancle;
-            layoutControlItem6.Location = new System.Drawing.Point(0, 225);
+            layoutControlItem6.Location = new System.Drawing.Point(0, 274);
             layoutControlItem6.Name = "layoutControlItem6";
             layoutControlItem6.Size = new System.Drawing.Size(112, 26);
             layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
@@ -209,7 +216,7 @@
             // layoutControlItem7
             // 
             layoutControlItem7.Control = btnOk;
-            layoutControlItem7.Location = new System.Drawing.Point(112, 225);
+            layoutControlItem7.Location = new System.Drawing.Point(112, 274);
             layoutControlItem7.Name = "layoutControlItem7";
             layoutControlItem7.Size = new System.Drawing.Size(112, 26);
             layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
@@ -220,22 +227,50 @@
             emptySpaceItem1.AllowHotTrack = false;
             emptySpaceItem1.Location = new System.Drawing.Point(0, 194);
             emptySpaceItem1.Name = "emptySpaceItem1";
-            emptySpaceItem1.Size = new System.Drawing.Size(224, 31);
+            emptySpaceItem1.Size = new System.Drawing.Size(224, 29);
             emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             emptySpaceItem2.AllowHotTrack = false;
-            emptySpaceItem2.Location = new System.Drawing.Point(0, 251);
+            emptySpaceItem2.Location = new System.Drawing.Point(0, 300);
             emptySpaceItem2.Name = "emptySpaceItem2";
-            emptySpaceItem2.Size = new System.Drawing.Size(224, 27);
+            emptySpaceItem2.Size = new System.Drawing.Size(224, 31);
             emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // checkEdit
+            // 
+            checkEdit.Location = new System.Drawing.Point(12, 235);
+            checkEdit.Name = "checkEdit";
+            checkEdit.Properties.Caption = "是否启用";
+            checkEdit.Size = new System.Drawing.Size(220, 20);
+            checkEdit.StyleController = layoutControl1;
+            checkEdit.TabIndex = 5;
+            // 
+            // layoutControlItem4
+            // 
+            layoutControlItem4.Control = checkEdit;
+            layoutControlItem4.Location = new System.Drawing.Point(0, 223);
+            layoutControlItem4.Name = "layoutControlItem4";
+            layoutControlItem4.Size = new System.Drawing.Size(224, 24);
+            layoutControlItem4.Text = "是否启用";
+            layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem4.TextVisible = false;
+            // 
+            // emptySpaceItem3
+            // 
+            emptySpaceItem3.AllowHotTrack = false;
+            emptySpaceItem3.Location = new System.Drawing.Point(0, 247);
+            emptySpaceItem3.Name = "emptySpaceItem3";
+            emptySpaceItem3.Size = new System.Drawing.Size(224, 27);
+            emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
+            // 
             // RecEditor
             // 
             AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            ClientSize = new System.Drawing.Size(244, 298);
+            ClientSize = new System.Drawing.Size(244, 351);
             Controls.Add(layoutControl1);
             FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             Name = "RecEditor";
@@ -256,6 +291,9 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).EndInit();
             ResumeLayout(false);
         }
 
@@ -277,5 +315,8 @@
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
         private DevExpress.XtraEditors.ButtonEdit txtLon;
         private DevExpress.XtraEditors.ButtonEdit txtLat;
+        private DevExpress.XtraEditors.CheckEdit checkEdit;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
     }
 }

+ 2 - 0
DW5S.App/EditForms/RecEditor.cs

@@ -44,6 +44,7 @@ namespace DW5S.App.EditForms
                 this.txtLon.Text = info.Lon.ToString();
                 this.txtLat.Text = info.Lat.ToString();
                 this.txtRemark.EditValue = info.Remark;
+                this.checkEdit.EditValue = info.Enable;
             }
             infos = new List<RecTxViewModel>();
             var unitOfWork = IocContainer.UnitOfWork;
@@ -65,6 +66,7 @@ namespace DW5S.App.EditForms
                 info.Lon = Convert.ToDouble(txtLon.Text);
                 info.Lat = Convert.ToDouble(txtLat.Text);
                 info.Remark = txtRemark.Text;
+                info.Enable=(bool)checkEdit.EditValue;
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)

+ 63 - 24
DW5S.App/EditForms/RefEditor.Designer.cs

@@ -28,16 +28,16 @@
         /// </summary>
         private void InitializeComponent()
         {
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
             layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             btnOk = new DevExpress.XtraEditors.SimpleButton();
             btnCancle = new DevExpress.XtraEditors.SimpleButton();
@@ -54,6 +54,9 @@
             layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            checkEdit = new DevExpress.XtraEditors.CheckEdit();
+            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
             ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
             layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)txtRemark.Properties).BeginInit();
@@ -69,10 +72,14 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).BeginInit();
             SuspendLayout();
             // 
             // layoutControl1
             // 
+            layoutControl1.Controls.Add(checkEdit);
             layoutControl1.Controls.Add(btnOk);
             layoutControl1.Controls.Add(btnCancle);
             layoutControl1.Controls.Add(txtRemark);
@@ -83,27 +90,27 @@
             layoutControl1.Location = new System.Drawing.Point(0, 0);
             layoutControl1.Name = "layoutControl1";
             layoutControl1.Root = Root;
-            layoutControl1.Size = new System.Drawing.Size(244, 300);
+            layoutControl1.Size = new System.Drawing.Size(244, 352);
             layoutControl1.TabIndex = 0;
             layoutControl1.Text = "layoutControl1";
             // 
             // btnOk
             // 
-            btnOk.Location = new System.Drawing.Point(124, 238);
+            btnOk.Location = new System.Drawing.Point(124, 289);
             btnOk.Name = "btnOk";
             btnOk.Size = new System.Drawing.Size(108, 22);
             btnOk.StyleController = layoutControl1;
-            btnOk.TabIndex = 10;
+            btnOk.TabIndex = 7;
             btnOk.Text = "确定";
             btnOk.Click += btnOk_Click;
             // 
             // btnCancle
             // 
-            btnCancle.Location = new System.Drawing.Point(12, 238);
+            btnCancle.Location = new System.Drawing.Point(12, 289);
             btnCancle.Name = "btnCancle";
             btnCancle.Size = new System.Drawing.Size(108, 22);
             btnCancle.StyleController = layoutControl1;
-            btnCancle.TabIndex = 9;
+            btnCancle.TabIndex = 6;
             btnCancle.Text = "取消";
             btnCancle.Click += btnCancle_Click;
             // 
@@ -113,7 +120,7 @@
             txtRemark.Name = "txtRemark";
             txtRemark.Size = new System.Drawing.Size(220, 20);
             txtRemark.StyleController = layoutControl1;
-            txtRemark.TabIndex = 8;
+            txtRemark.TabIndex = 4;
             // 
             // txtRefTxName
             // 
@@ -121,37 +128,37 @@
             txtRefTxName.Name = "txtRefTxName";
             txtRefTxName.Size = new System.Drawing.Size(220, 20);
             txtRefTxName.StyleController = layoutControl1;
-            txtRefTxName.TabIndex = 4;
+            txtRefTxName.TabIndex = 0;
             // 
             // txtLon
             // 
             txtLon.Location = new System.Drawing.Point(12, 78);
             txtLon.Name = "txtLon";
-            txtLon.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtLon.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
             txtLon.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             txtLon.Properties.MaskSettings.Set("mask", "f3");
             txtLon.Size = new System.Drawing.Size(220, 23);
             txtLon.StyleController = layoutControl1;
-            txtLon.TabIndex = 5;
+            txtLon.TabIndex = 2;
             // 
             // txtLat
             // 
             txtLat.Location = new System.Drawing.Point(12, 130);
             txtLat.Name = "txtLat";
-            txtLat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtLat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "° ", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
             txtLat.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             txtLat.Properties.MaskSettings.Set("mask", "f3");
             txtLat.Size = new System.Drawing.Size(220, 23);
             txtLat.StyleController = layoutControl1;
-            txtLat.TabIndex = 6;
+            txtLat.TabIndex = 3;
             // 
             // Root
             // 
             Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             Root.GroupBordersVisible = false;
-            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1, emptySpaceItem2 });
+            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1, emptySpaceItem2, layoutControlItem4, emptySpaceItem3 });
             Root.Name = "Root";
-            Root.Size = new System.Drawing.Size(244, 300);
+            Root.Size = new System.Drawing.Size(244, 352);
             Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -200,7 +207,7 @@
             // layoutControlItem6
             // 
             layoutControlItem6.Control = btnCancle;
-            layoutControlItem6.Location = new System.Drawing.Point(0, 226);
+            layoutControlItem6.Location = new System.Drawing.Point(0, 277);
             layoutControlItem6.Name = "layoutControlItem6";
             layoutControlItem6.Size = new System.Drawing.Size(112, 26);
             layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
@@ -209,7 +216,7 @@
             // layoutControlItem7
             // 
             layoutControlItem7.Control = btnOk;
-            layoutControlItem7.Location = new System.Drawing.Point(112, 226);
+            layoutControlItem7.Location = new System.Drawing.Point(112, 277);
             layoutControlItem7.Name = "layoutControlItem7";
             layoutControlItem7.Size = new System.Drawing.Size(112, 26);
             layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
@@ -220,22 +227,48 @@
             emptySpaceItem1.AllowHotTrack = false;
             emptySpaceItem1.Location = new System.Drawing.Point(0, 194);
             emptySpaceItem1.Name = "emptySpaceItem1";
-            emptySpaceItem1.Size = new System.Drawing.Size(224, 32);
+            emptySpaceItem1.Size = new System.Drawing.Size(224, 29);
             emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             emptySpaceItem2.AllowHotTrack = false;
-            emptySpaceItem2.Location = new System.Drawing.Point(0, 252);
+            emptySpaceItem2.Location = new System.Drawing.Point(0, 303);
             emptySpaceItem2.Name = "emptySpaceItem2";
-            emptySpaceItem2.Size = new System.Drawing.Size(224, 28);
+            emptySpaceItem2.Size = new System.Drawing.Size(224, 29);
             emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // checkEdit
+            // 
+            checkEdit.Location = new System.Drawing.Point(12, 235);
+            checkEdit.Name = "checkEdit";
+            checkEdit.Properties.Caption = "是否启用";
+            checkEdit.Size = new System.Drawing.Size(220, 20);
+            checkEdit.StyleController = layoutControl1;
+            checkEdit.TabIndex = 5;
+            // 
+            // layoutControlItem4
+            // 
+            layoutControlItem4.Control = checkEdit;
+            layoutControlItem4.Location = new System.Drawing.Point(0, 223);
+            layoutControlItem4.Name = "layoutControlItem4";
+            layoutControlItem4.Size = new System.Drawing.Size(224, 24);
+            layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem4.TextVisible = false;
+            // 
+            // emptySpaceItem3
+            // 
+            emptySpaceItem3.AllowHotTrack = false;
+            emptySpaceItem3.Location = new System.Drawing.Point(0, 247);
+            emptySpaceItem3.Name = "emptySpaceItem3";
+            emptySpaceItem3.Size = new System.Drawing.Size(224, 30);
+            emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
+            // 
             // RefEditor
             // 
             AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            ClientSize = new System.Drawing.Size(244, 300);
+            ClientSize = new System.Drawing.Size(244, 352);
             Controls.Add(layoutControl1);
             FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             Name = "RefEditor";
@@ -256,6 +289,9 @@
             ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
             ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)checkEdit.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).EndInit();
             ResumeLayout(false);
         }
 
@@ -277,5 +313,8 @@
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
         private DevExpress.XtraEditors.ButtonEdit txtLon;
         private DevExpress.XtraEditors.ButtonEdit txtLat;
+        private DevExpress.XtraEditors.CheckEdit checkEdit;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
     }
 }

+ 2 - 0
DW5S.App/EditForms/RefEditor.cs

@@ -45,6 +45,7 @@ namespace DW5S.App.EditForms
                 this.txtLon.Text = info.Lon.ToString();
                 this.txtLat.Text = info.Lat.ToString();
                 this.txtRemark.EditValue = info.Remark;
+                this.checkEdit.EditValue = info.Enable;
             }
             infos = new List<RefTxViewModel>();
             var unitOfWork = IocContainer.UnitOfWork;
@@ -66,6 +67,7 @@ namespace DW5S.App.EditForms
                 info.Lon=Convert.ToDouble(txtLon.Text);
                 info.Lat = Convert.ToDouble(txtLat.Text);
                 info.Remark = txtRemark.Text;
+                info.Enable = (bool)checkEdit.EditValue;
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)

+ 4 - 1
DW5S.App/UserControl/CtrlCdbTx.cs

@@ -27,7 +27,9 @@ namespace DW5S.App.UserControl
                 gridCdbTx.UseDefault(list).UseMultiSelect().UseRowNumber()
                     .UseAddAsync(Add)
                     .UseEditAsync<CdbTxViewModel>(Edit)
-                    .UseDeleteAsync<CdbTxViewModel>(Delete);
+                    .UseDeleteAsync<CdbTxViewModel>(Delete)
+                    .UseBoolColumn(nameof(RecTxViewModel.Enable), "启用", "禁用");
+
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsCdbTx = unitOfWork.Of<TxInfo>();
                 var items = await repsCdbTx.FindAsync(f => f.TxType == EnumTxType.Cdb, p => p.Name);
@@ -79,6 +81,7 @@ namespace DW5S.App.UserControl
                 find.Lon = editItem.Lon;
                 find.Lat = editItem.Lat;
                 find.Remark = editItem.Remark;
+                find.Enable = editItem.Enable;
                 await repsCdbTx.AddOrUpdateAsync(find);
                 await unitOfWork.SaveAsync();
                 return editItem;

+ 4 - 1
DW5S.App/UserControl/CtrlCxTx.cs

@@ -29,7 +29,9 @@ namespace DW5S.App.UserControl
                 gridRefTx.UseDefault(list).UseMultiSelect().UseRowNumber()
                     .UseAddAsync(Add)
                     .UseEditAsync<CxTxViewModel>(Edit)
-                    .UseDeleteAsync<CxTxViewModel>(Delete);
+                    .UseDeleteAsync<CxTxViewModel>(Delete)
+                    .UseBoolColumn(nameof(RecTxViewModel.Enable), "启用", "禁用");
+
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsCxTx = unitOfWork.Of<TxInfo>();
                 var items = await repsCxTx.FindAsync(f=>f.TxType== EnumTxType.Cx, p => p.Name);
@@ -80,6 +82,7 @@ namespace DW5S.App.UserControl
                 find.Lon = editItem.Lon;
                 find.Lat = editItem.Lat;
                 find.Remark = editItem.Remark;
+                find.Enable = editItem.Enable;
                 await repsCxTx.AddOrUpdateAsync(find);
                 await unitOfWork.SaveAsync();
                 return editItem;

+ 4 - 3
DW5S.App/UserControl/CtrlRecTx.cs

@@ -29,8 +29,8 @@ namespace DW5S.App.UserControl
                      .UseAddAsync(Add)
                      .UseEditAsync<RecTxViewModel>(Edit)
                      .UseDeleteAsync<RecTxViewModel>(Delete)
-                     .UseBoolColumn(nameof(RecTxViewModel.Enable),"启用","禁用");
-                     
+                     .UseBoolColumn(nameof(RecTxViewModel.Enable), "启用", "禁用");
+
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsRecTx = unitOfWork.Of<TxInfo>();
                 var items = await repsRecTx.FindAsync(f => f.TxType == EnumTxType.Rec, p => p.Name);
@@ -54,7 +54,7 @@ namespace DW5S.App.UserControl
                 addItem.TxType = EnumTxType.Rec;
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsRecTx = unitOfWork.Of<TxInfo>();
-               var res = await repsRecTx.AddOrUpdateAsync(addItem);
+                var res = await repsRecTx.AddOrUpdateAsync(addItem);
                 await unitOfWork.SaveAsync();
                 return res.To<RecTxViewModel>();
             }
@@ -81,6 +81,7 @@ namespace DW5S.App.UserControl
                 find.Lon = editItem.Lon;
                 find.Lat = editItem.Lat;
                 find.Remark = editItem.Remark;
+                find.Enable = editItem.Enable;
                 await repsRecTx.AddOrUpdateAsync(find);
                 await unitOfWork.SaveAsync();
                 return editItem.To<RecTxViewModel>();

+ 4 - 1
DW5S.App/UserControl/CtrlRefTx.cs

@@ -27,7 +27,9 @@ namespace DW5S.App.UserControl
                 gridRefTx.UseDefault(list).UseMultiSelect().UseRowNumber()
                     .UseAddAsync(Add)
                     .UseEditAsync<RefTxViewModel>(Edit)
-                    .UseDeleteAsync<RefTxViewModel>(Delete);
+                    .UseDeleteAsync<RefTxViewModel>(Delete)
+                    .UseBoolColumn(nameof(RecTxViewModel.Enable), "启用", "禁用");
+
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsRefTx = unitOfWork.Of<TxInfo>();
                 var items = await repsRefTx.FindAsync(f => f.TxType == EnumTxType.Ref, p => p.Name);
@@ -78,6 +80,7 @@ namespace DW5S.App.UserControl
                 find.Lon = editItem.Lon;
                 find.Lat = editItem.Lat;
                 find.Remark = editItem.Remark;
+                find.Enable = editItem.Enable;
                 await repsRefTx.AddOrUpdateAsync(find);
                 await unitOfWork.SaveAsync();
                 return editItem;

+ 3 - 0
DW5S.ViewModel/CdbTxViewModel.cs

@@ -24,5 +24,8 @@ namespace DW5S.Entity
 
         [Display(Name = "备注")]
         public string Remark { get; set; }
+
+        [Display(Name = "状态")]
+        public bool Enable { get; set; }
     }
 }

+ 3 - 0
DW5S.ViewModel/CxTxViewModel.cs

@@ -23,5 +23,8 @@ namespace DW5S.Entity
 
         [Display(Name = "备注")]
         public string Remark { get; set; }
+
+        [Display(Name = "状态")]
+        public bool Enable { get; set; }
     }
 }

+ 3 - 0
DW5S.ViewModel/RefTxViewModel.cs

@@ -23,5 +23,8 @@ namespace DW5S.Entity
 
         [Display(Name = "备注")]
         public string Remark { get; set; }
+
+        [Display(Name = "状态")]
+        public bool Enable { get; set; }
     }
 }