Explorar o código

修改输入格式

wyq hai 1 ano
pai
achega
149be9430f

+ 8 - 0
XdCxRhDW.App/EditForms/SatEditor.Designer.cs

@@ -117,6 +117,10 @@
             this.txtSatLon.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
             this.txtSatLon.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)});
+            this.txtSatLon.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
+            this.txtSatLon.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
+            this.txtSatLon.Properties.MaskSettings.Set("mask", "f3");
+            this.txtSatLon.Properties.MaxLength = 10;
             this.txtSatLon.Size = new System.Drawing.Size(251, 23);
             this.txtSatLon.StyleController = this.layoutControl1;
             this.txtSatLon.TabIndex = 6;
@@ -156,6 +160,10 @@
             this.txtSatTrans.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
             this.txtSatTrans.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtSatTrans.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
+            this.txtSatTrans.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
+            this.txtSatTrans.Properties.MaskSettings.Set("mask", "f3");
+            this.txtSatTrans.Properties.MaxLength = 15;
             this.txtSatTrans.Size = new System.Drawing.Size(251, 23);
             this.txtSatTrans.StyleController = this.layoutControl1;
             this.txtSatTrans.TabIndex = 6;

+ 2 - 2
XdCxRhDW.App/UserControl/CtrlTx.cs

@@ -94,9 +94,9 @@ namespace XdCxRhDW.App.UserControl
                 txRec.Name = txtMainTxName.Text;
                 txRec.TxType = EnumTxType.Rec;
                 if (!double.TryParse(txtMainTxLon.Text.Trim(), out double lon))
-                    throw new Exception("主星天线经度格式错误!");
+                    throw new Exception("接收站天线经度格式错误!");
                 if (!double.TryParse(txtMainTxLat.Text.Trim(), out double lat))
-                    throw new Exception("主星天线纬度格式错误!");
+                    throw new Exception("接收站天线纬度格式错误!");
                 txRec.Lon = lon;
                 txRec.Lat = lat;
                 tmp.Add(txRec);