1224 lines
68 KiB
C#
1224 lines
68 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: HPG_68D.ChannelMsg
|
|
// Assembly: HPG-68D, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 530C99A8-8EEF-42C8-8A74-66FDE7B322C3
|
|
// Assembly location: C:\Program Files (x86)\HONGKAIDE\HPG-68D\HPG-68D.exe
|
|
|
|
using HPG_68D.My;
|
|
using Microsoft.VisualBasic;
|
|
using Microsoft.VisualBasic.CompilerServices;
|
|
using System;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Windows.Forms;
|
|
|
|
|
|
namespace HPG_68D
|
|
{
|
|
[DesignerGenerated]
|
|
public class ChannelMsg : Form
|
|
{
|
|
private static ArrayList __ENCList = new ArrayList();
|
|
private IContainer components;
|
|
[AccessedThroughProperty("ChannelMsgDataGridView")]
|
|
private DataGridView _ChannelMsgDataGridView;
|
|
[AccessedThroughProperty("Panel1")]
|
|
private Panel _Panel1;
|
|
[AccessedThroughProperty("Button3")]
|
|
private Button _Button3;
|
|
[AccessedThroughProperty("Button2")]
|
|
private Button _Button2;
|
|
[AccessedThroughProperty("Button1")]
|
|
private Button _Button1;
|
|
[AccessedThroughProperty("Button信道编辑")]
|
|
private Button _Button信道编辑;
|
|
[AccessedThroughProperty("ColumnRxFreq")]
|
|
private DataGridViewTextBoxColumn _ColumnRxFreq;
|
|
[AccessedThroughProperty("Column差频方向")]
|
|
private DataGridViewComboBoxColumn _Column差频方向;
|
|
[AccessedThroughProperty("ColumnTxFreq")]
|
|
private DataGridViewTextBoxColumn _ColumnTxFreq;
|
|
[AccessedThroughProperty("Column亚音解码类型")]
|
|
private DataGridViewComboBoxColumn _Column亚音解码类型;
|
|
[AccessedThroughProperty("Column亚音解码")]
|
|
private DataGridViewComboBoxColumn _Column亚音解码;
|
|
[AccessedThroughProperty("Column亚音编码类型")]
|
|
private DataGridViewComboBoxColumn _Column亚音编码类型;
|
|
[AccessedThroughProperty("Column亚音编码")]
|
|
private DataGridViewComboBoxColumn _Column亚音编码;
|
|
[AccessedThroughProperty("Column发射功率")]
|
|
private DataGridViewComboBoxColumn _Column发射功率;
|
|
[AccessedThroughProperty("Column扫描添加")]
|
|
private DataGridViewComboBoxColumn _Column扫描添加;
|
|
[AccessedThroughProperty("Column带宽")]
|
|
private DataGridViewComboBoxColumn _Column带宽;
|
|
[AccessedThroughProperty("Column可选信令")]
|
|
private DataGridViewComboBoxColumn _Column可选信令;
|
|
[AccessedThroughProperty("Column更多")]
|
|
private DataGridViewButtonColumn _Column更多;
|
|
|
|
[DebuggerNonUserCode]
|
|
static ChannelMsg()
|
|
{
|
|
}
|
|
|
|
[DebuggerNonUserCode]
|
|
public ChannelMsg()
|
|
{
|
|
Deactivate += ChannelMsg_Deactivate;
|
|
FormClosing += ChannelMsg_FormClosing;
|
|
Load += ChannelMsg_Load;
|
|
__ENCList.Add((object) new WeakReference((object) this));
|
|
InitializeComponent();
|
|
}
|
|
|
|
[DebuggerNonUserCode]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing && components != null)
|
|
components.Dispose();
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
[DebuggerStepThrough]
|
|
private void InitializeComponent()
|
|
{
|
|
DataGridViewCellStyle gridViewCellStyle1 = new DataGridViewCellStyle();
|
|
DataGridViewCellStyle gridViewCellStyle2 = new DataGridViewCellStyle();
|
|
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ChannelMsg));
|
|
DataGridViewCellStyle gridViewCellStyle3 = new DataGridViewCellStyle();
|
|
DataGridViewCellStyle gridViewCellStyle4 = new DataGridViewCellStyle();
|
|
DataGridViewCellStyle gridViewCellStyle5 = new DataGridViewCellStyle();
|
|
DataGridViewCellStyle gridViewCellStyle6 = new DataGridViewCellStyle();
|
|
ChannelMsgDataGridView = new DataGridView();
|
|
Panel1 = new Panel();
|
|
Button3 = new Button();
|
|
Button2 = new Button();
|
|
Button1 = new Button();
|
|
Button信道编辑 = new Button();
|
|
ColumnRxFreq = new DataGridViewTextBoxColumn();
|
|
Column差频方向 = new DataGridViewComboBoxColumn();
|
|
ColumnTxFreq = new DataGridViewTextBoxColumn();
|
|
Column亚音解码类型 = new DataGridViewComboBoxColumn();
|
|
Column亚音解码 = new DataGridViewComboBoxColumn();
|
|
Column亚音编码类型 = new DataGridViewComboBoxColumn();
|
|
Column亚音编码 = new DataGridViewComboBoxColumn();
|
|
Column发射功率 = new DataGridViewComboBoxColumn();
|
|
Column扫描添加 = new DataGridViewComboBoxColumn();
|
|
Column带宽 = new DataGridViewComboBoxColumn();
|
|
Column可选信令 = new DataGridViewComboBoxColumn();
|
|
Column更多 = new DataGridViewButtonColumn();
|
|
((ISupportInitialize) ChannelMsgDataGridView).BeginInit();
|
|
Panel1.SuspendLayout();
|
|
SuspendLayout();
|
|
ChannelMsgDataGridView.AllowUserToAddRows = false;
|
|
ChannelMsgDataGridView.AllowUserToDeleteRows = false;
|
|
ChannelMsgDataGridView.AllowUserToResizeColumns = false;
|
|
ChannelMsgDataGridView.AllowUserToResizeRows = false;
|
|
gridViewCellStyle1.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
ChannelMsgDataGridView.AlternatingRowsDefaultCellStyle = gridViewCellStyle1;
|
|
gridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
gridViewCellStyle2.BackColor = SystemColors.Control;
|
|
gridViewCellStyle2.Font = new Font("宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 134);
|
|
gridViewCellStyle2.ForeColor = SystemColors.WindowText;
|
|
gridViewCellStyle2.SelectionBackColor = SystemColors.Highlight;
|
|
gridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
|
|
gridViewCellStyle2.WrapMode = DataGridViewTriState.True;
|
|
ChannelMsgDataGridView.ColumnHeadersDefaultCellStyle = gridViewCellStyle2;
|
|
componentResourceManager.ApplyResources((object) ChannelMsgDataGridView, "ChannelMsgDataGridView");
|
|
ChannelMsgDataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
|
ChannelMsgDataGridView.Columns.AddRange((DataGridViewColumn) ColumnRxFreq, (DataGridViewColumn) Column差频方向, (DataGridViewColumn) ColumnTxFreq, (DataGridViewColumn) Column亚音解码类型, (DataGridViewColumn) Column亚音解码, (DataGridViewColumn) Column亚音编码类型, (DataGridViewColumn) Column亚音编码, (DataGridViewColumn) Column发射功率, (DataGridViewColumn) Column扫描添加, (DataGridViewColumn) Column带宽, (DataGridViewColumn) Column可选信令, (DataGridViewColumn) Column更多);
|
|
ChannelMsgDataGridView.Name = "ChannelMsgDataGridView";
|
|
gridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
gridViewCellStyle3.BackColor = SystemColors.Control;
|
|
gridViewCellStyle3.Font = new Font("宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 134);
|
|
gridViewCellStyle3.ForeColor = SystemColors.WindowText;
|
|
gridViewCellStyle3.SelectionBackColor = SystemColors.Highlight;
|
|
gridViewCellStyle3.SelectionForeColor = SystemColors.HighlightText;
|
|
gridViewCellStyle3.WrapMode = DataGridViewTriState.True;
|
|
ChannelMsgDataGridView.RowHeadersDefaultCellStyle = gridViewCellStyle3;
|
|
ChannelMsgDataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
|
gridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
ChannelMsgDataGridView.RowsDefaultCellStyle = gridViewCellStyle4;
|
|
ChannelMsgDataGridView.RowTemplate.Height = 23;
|
|
componentResourceManager.ApplyResources((object) Panel1, "Panel1");
|
|
Panel1.BorderStyle = BorderStyle.Fixed3D;
|
|
Panel1.Controls.Add((Control) ChannelMsgDataGridView);
|
|
Panel1.Name = "Panel1";
|
|
componentResourceManager.ApplyResources((object) Button3, "Button3");
|
|
Button3.Name = "Button3";
|
|
Button3.UseVisualStyleBackColor = true;
|
|
componentResourceManager.ApplyResources((object) Button2, "Button2");
|
|
Button2.Name = "Button2";
|
|
Button2.UseVisualStyleBackColor = true;
|
|
componentResourceManager.ApplyResources((object) Button1, "Button1");
|
|
Button1.Name = "Button1";
|
|
Button1.UseVisualStyleBackColor = true;
|
|
componentResourceManager.ApplyResources((object) Button信道编辑, "Button信道编辑");
|
|
Button信道编辑.Name = "Button信道编辑";
|
|
Button信道编辑.UseVisualStyleBackColor = true;
|
|
gridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
ColumnRxFreq.DefaultCellStyle = gridViewCellStyle5;
|
|
componentResourceManager.ApplyResources((object) ColumnRxFreq, "ColumnRxFreq");
|
|
ColumnRxFreq.MaxInputLength = 9;
|
|
ColumnRxFreq.Name = "ColumnRxFreq";
|
|
ColumnRxFreq.Resizable = DataGridViewTriState.False;
|
|
ColumnRxFreq.SortMode = DataGridViewColumnSortMode.NotSortable;
|
|
Column差频方向.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column差频方向, "Column差频方向");
|
|
Column差频方向.Items.AddRange((object) "OFF", (object) "DUP -", (object) "DUP +");
|
|
Column差频方向.Name = "Column差频方向";
|
|
componentResourceManager.ApplyResources((object) ColumnTxFreq, "ColumnTxFreq");
|
|
ColumnTxFreq.MaxInputLength = 9;
|
|
ColumnTxFreq.Name = "ColumnTxFreq";
|
|
ColumnTxFreq.SortMode = DataGridViewColumnSortMode.NotSortable;
|
|
Column亚音解码类型.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column亚音解码类型, "Column亚音解码类型");
|
|
Column亚音解码类型.Items.AddRange((object) "OFF", (object) "TONE", (object) "CTCSS", (object) "DCS");
|
|
Column亚音解码类型.Name = "Column亚音解码类型";
|
|
Column亚音解码.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column亚音解码, "Column亚音解码");
|
|
Column亚音解码.Items.AddRange((object) "OFF", (object) "67.0", (object) "69.3", (object) "71.9", (object) "74.4", (object) "77.0", (object) "79.7", (object) "82.5", (object) "85.4", (object) "88.5", (object) "91.5", (object) "94.8", (object) "97.4", (object) "100.0", (object) "103.5", (object) "107.2", (object) "110.9", (object) "114.8", (object) "118.8", (object) "123.0", (object) "127.3", (object) "131.8", (object) "136.5", (object) "141.3", (object) "146.2", (object) "151.4", (object) "156.7", (object) "159.8", (object) "162.2", (object) "165.5", (object) "167.9", (object) "171.3", (object) "173.8", (object) "177.3", (object) "179.9", (object) "183.5", (object) "186.2", (object) "189.9", (object) "192.8", (object) "196.6", (object) "199.5", (object) "203.5", (object) "206.5", (object) "210.7", (object) "218.1", (object) "225.7", (object) "229.1", (object) "233.6", (object) "241.8", (object) "250.3", (object) "254.1", (object) "D017N", (object) "D023N", (object) "D025N", (object) "D026N", (object) "D031N", (object) "D032N", (object) "D036N", (object) "D043N", (object) "D047N", (object) "D050N", (object) "D051N", (object) "D053N", (object) "D054N", (object) "D065N", (object) "D071N", (object) "D072N", (object) "D073N", (object) "D074N", (object) "D114N", (object) "D115N", (object) "D116N", (object) "D122N", (object) "D125N", (object) "D131N", (object) "D132N", (object) "D134N", (object) "D143N", (object) "D145N", (object) "D152N", (object) "D155N", (object) "D156N", (object) "D162N", (object) "D165N", (object) "D172N", (object) "D174N", (object) "D205N", (object) "D212N", (object) "D223N", (object) "D225N", (object) "D226N", (object) "D243N", (object) "D244N", (object) "D245N", (object) "D246N", (object) "D251N", (object) "D252N", (object) "D255N", (object) "D261N", (object) "D263N", (object) "D265N", (object) "D266N", (object) "D271N", (object) "D274N", (object) "D306N", (object) "D311N", (object) "D315N", (object) "D325N", (object) "D331N", (object) "D332N", (object) "D343N", (object) "D346N", (object) "D351N", (object) "D356N", (object) "D364N", (object) "D365N", (object) "D371N", (object) "D411N", (object) "D412N", (object) "D413N", (object) "D423N", (object) "D431N", (object) "D432N", (object) "D445N", (object) "D446N", (object) "D452N", (object) "D454N", (object) "D455N", (object) "D462N", (object) "D464N", (object) "D465N", (object) "D466N", (object) "D503N", (object) "D506N", (object) "D516N", (object) "D523N", (object) "D526N", (object) "D532N", (object) "D546N", (object) "D565N", (object) "D606N", (object) "D612N", (object) "D624N", (object) "D627N", (object) "D631N", (object) "D632N", (object) "D645N", (object) "D654N", (object) "D662N", (object) "D664N", (object) "D703N", (object) "D712N", (object) "D723N", (object) "D731N", (object) "D732N", (object) "D734N", (object) "D743N", (object) "D754N", (object) "D017I", (object) "D023I", (object) "D025I", (object) "D026I", (object) "D031I", (object) "D032I", (object) "D036I", (object) "D043I", (object) "D047I", (object) "D050I", (object) "D051I", (object) "D053I", (object) "D054I", (object) "D065I", (object) "D071I", (object) "D072I", (object) "D073I", (object) "D074I", (object) "D114I", (object) "D115I", (object) "D116I", (object) "D122I", (object) "D125I", (object) "D131I", (object) "D132I", (object) "D134I", (object) "D143I", (object) "D145I", (object) "D152I", (object) "D155I", (object) "D156I", (object) "D162I", (object) "D165I", (object) "D172I", (object) "D174I", (object) "D205I", (object) "D212I", (object) "D223I", (object) "D225I", (object) "D226I", (object) "D243I", (object) "D244I", (object) "D245I", (object) "D246I", (object) "D251I", (object) "D252I", (object) "D255I", (object) "D261I", (object) "D263I", (object) "D265I", (object) "D266I", (object) "D271I", (object) "D274I", (object) "D306I", (object) "D311I", (object) "D315I", (object) "D325I", (object) "D331I", (object) "D332I", (object) "D343I", (object) "D346I", (object) "D351I", (object) "D356I", (object) "D364I", (object) "D365I", (object) "D371I", (object) "D411I", (object) "D412I", (object) "D413I", (object) "D423I", (object) "D431I", (object) "D432I", (object) "D445I", (object) "D446I", (object) "D452I", (object) "D454I", (object) "D455I", (object) "D462I", (object) "D464I", (object) "D465I", (object) "D466I", (object) "D503I", (object) "D506I", (object) "D516I", (object) "D523I", (object) "D526I", (object) "D532I", (object) "D546I", (object) "D565I", (object) "D606I", (object) "D612I", (object) "D624I", (object) "D627I", (object) "D631I", (object) "D632I", (object) "D645I", (object) "D654I", (object) "D662I", (object) "D664I", (object) "D703I", (object) "D712I", (object) "D723I", (object) "D731I", (object) "D732I", (object) "D734I", (object) "D743I", (object) "D754I");
|
|
Column亚音解码.Name = "Column亚音解码";
|
|
Column亚音编码类型.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column亚音编码类型, "Column亚音编码类型");
|
|
Column亚音编码类型.Items.AddRange((object) "OFF", (object) "TONE", (object) "CTCSS", (object) "DCS");
|
|
Column亚音编码类型.Name = "Column亚音编码类型";
|
|
Column亚音编码.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column亚音编码, "Column亚音编码");
|
|
Column亚音编码.Items.AddRange((object) "OFF", (object) "67.0", (object) "69.3", (object) "71.9", (object) "74.4", (object) "77.0", (object) "79.7", (object) "82.5", (object) "85.4", (object) "88.5", (object) "91.5", (object) "94.8", (object) "97.4", (object) "100.0", (object) "103.5", (object) "107.2", (object) "110.9", (object) "114.8", (object) "118.8", (object) "123.0", (object) "127.3", (object) "131.8", (object) "136.5", (object) "141.3", (object) "146.2", (object) "151.4", (object) "156.7", (object) "159.8", (object) "162.2", (object) "165.5", (object) "167.9", (object) "171.3", (object) "173.8", (object) "177.3", (object) "179.9", (object) "183.5", (object) "186.2", (object) "189.9", (object) "192.8", (object) "196.6", (object) "199.5", (object) "203.5", (object) "206.5", (object) "210.7", (object) "218.1", (object) "225.7", (object) "229.1", (object) "233.6", (object) "241.8", (object) "250.3", (object) "254.1", (object) "D017N", (object) "D023N", (object) "D025N", (object) "D026N", (object) "D031N", (object) "D032N", (object) "D036N", (object) "D043N", (object) "D047N", (object) "D050N", (object) "D051N", (object) "D053N", (object) "D054N", (object) "D065N", (object) "D071N", (object) "D072N", (object) "D073N", (object) "D074N", (object) "D114N", (object) "D115N", (object) "D116N", (object) "D122N", (object) "D125N", (object) "D131N", (object) "D132N", (object) "D134N", (object) "D143N", (object) "D145N", (object) "D152N", (object) "D155N", (object) "D156N", (object) "D162N", (object) "D165N", (object) "D172N", (object) "D174N", (object) "D205N", (object) "D212N", (object) "D223N", (object) "D225N", (object) "D226N", (object) "D243N", (object) "D244N", (object) "D245N", (object) "D246N", (object) "D251N", (object) "D252N", (object) "D255N", (object) "D261N", (object) "D263N", (object) "D265N", (object) "D266N", (object) "D271N", (object) "D274N", (object) "D306N", (object) "D311N", (object) "D315N", (object) "D325N", (object) "D331N", (object) "D332N", (object) "D343N", (object) "D346N", (object) "D351N", (object) "D356N", (object) "D364N", (object) "D365N", (object) "D371N", (object) "D411N", (object) "D412N", (object) "D413N", (object) "D423N", (object) "D431N", (object) "D432N", (object) "D445N", (object) "D446N", (object) "D452N", (object) "D454N", (object) "D455N", (object) "D462N", (object) "D464N", (object) "D465N", (object) "D466N", (object) "D503N", (object) "D506N", (object) "D516N", (object) "D523N", (object) "D526N", (object) "D532N", (object) "D546N", (object) "D565N", (object) "D606N", (object) "D612N", (object) "D624N", (object) "D627N", (object) "D631N", (object) "D632N", (object) "D645N", (object) "D654N", (object) "D662N", (object) "D664N", (object) "D703N", (object) "D712N", (object) "D723N", (object) "D731N", (object) "D732N", (object) "D734N", (object) "D743N", (object) "D754N", (object) "D017I", (object) "D023I", (object) "D025I", (object) "D026I", (object) "D031I", (object) "D032I", (object) "D036I", (object) "D043I", (object) "D047I", (object) "D050I", (object) "D051I", (object) "D053I", (object) "D054I", (object) "D065I", (object) "D071I", (object) "D072I", (object) "D073I", (object) "D074I", (object) "D114I", (object) "D115I", (object) "D116I", (object) "D122I", (object) "D125I", (object) "D131I", (object) "D132I", (object) "D134I", (object) "D143I", (object) "D145I", (object) "D152I", (object) "D155I", (object) "D156I", (object) "D162I", (object) "D165I", (object) "D172I", (object) "D174I", (object) "D205I", (object) "D212I", (object) "D223I", (object) "D225I", (object) "D226I", (object) "D243I", (object) "D244I", (object) "D245I", (object) "D246I", (object) "D251I", (object) "D252I", (object) "D255I", (object) "D261I", (object) "D263I", (object) "D265I", (object) "D266I", (object) "D271I", (object) "D274I", (object) "D306I", (object) "D311I", (object) "D315I", (object) "D325I", (object) "D331I", (object) "D332I", (object) "D343I", (object) "D346I", (object) "D351I", (object) "D356I", (object) "D364I", (object) "D365I", (object) "D371I", (object) "D411I", (object) "D412I", (object) "D413I", (object) "D423I", (object) "D431I", (object) "D432I", (object) "D445I", (object) "D446I", (object) "D452I", (object) "D454I", (object) "D455I", (object) "D462I", (object) "D464I", (object) "D465I", (object) "D466I", (object) "D503I", (object) "D506I", (object) "D516I", (object) "D523I", (object) "D526I", (object) "D532I", (object) "D546I", (object) "D565I", (object) "D606I", (object) "D612I", (object) "D624I", (object) "D627I", (object) "D631I", (object) "D632I", (object) "D645I", (object) "D654I", (object) "D662I", (object) "D664I", (object) "D703I", (object) "D712I", (object) "D723I", (object) "D731I", (object) "D732I", (object) "D734I", (object) "D743I", (object) "D754I");
|
|
Column亚音编码.Name = "Column亚音编码";
|
|
Column发射功率.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column发射功率, "Column发射功率");
|
|
Column发射功率.Items.AddRange((object) "高", (object) "低", (object) "中");
|
|
Column发射功率.Name = "Column发射功率";
|
|
Column扫描添加.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
|
Column扫描添加.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column扫描添加, "Column扫描添加");
|
|
Column扫描添加.Items.AddRange((object) "是", (object) "否");
|
|
Column扫描添加.Name = "Column扫描添加";
|
|
Column带宽.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column带宽, "Column带宽");
|
|
Column带宽.Items.AddRange((object) "宽带(25K)", (object) "宽带(20K)", (object) "窄带(12.5K)");
|
|
Column带宽.Name = "Column带宽";
|
|
Column可选信令.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources((object) Column可选信令, "Column可选信令");
|
|
Column可选信令.Items.AddRange((object) "无", (object) "DTMF", (object) "2-Tone", (object) "5-Tone");
|
|
Column可选信令.Name = "Column可选信令";
|
|
gridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
gridViewCellStyle6.BackColor = Color.FromArgb(224, 224, 224);
|
|
gridViewCellStyle6.ForeColor = Color.Red;
|
|
Column更多.DefaultCellStyle = gridViewCellStyle6;
|
|
Column更多.FlatStyle = FlatStyle.Popup;
|
|
componentResourceManager.ApplyResources((object) Column更多, "Column更多");
|
|
Column更多.Name = "Column更多";
|
|
Column更多.Resizable = DataGridViewTriState.False;
|
|
Column更多.Text = ">>";
|
|
Column更多.UseColumnTextForButtonValue = true;
|
|
componentResourceManager.ApplyResources((object) this, "$this");
|
|
AutoScaleMode = AutoScaleMode.Font;
|
|
Controls.Add((Control) Button信道编辑);
|
|
Controls.Add((Control) Button3);
|
|
Controls.Add((Control) Button2);
|
|
Controls.Add((Control) Button1);
|
|
Controls.Add((Control) Panel1);
|
|
DoubleBuffered = true;
|
|
Name = nameof (ChannelMsg);
|
|
((ISupportInitialize) ChannelMsgDataGridView).EndInit();
|
|
Panel1.ResumeLayout(false);
|
|
ResumeLayout(false);
|
|
}
|
|
|
|
internal virtual DataGridView ChannelMsgDataGridView
|
|
{
|
|
[DebuggerNonUserCode] get => _ChannelMsgDataGridView;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (_ChannelMsgDataGridView != null)
|
|
{
|
|
_ChannelMsgDataGridView.CellValidating -= ChannelMsgDataGridView_CellValidating;
|
|
_ChannelMsgDataGridView.EditingControlShowing -= ChannelMsgDataGridView_EditingControlShowing;
|
|
_ChannelMsgDataGridView.CellEndEdit -= ChannelMsgDataGridView_CellEndEdit;
|
|
_ChannelMsgDataGridView.CellMouseClick -= ChannelMsgDataGridView_CellMouseClick;
|
|
_ChannelMsgDataGridView.RowPostPaint -= ChannelMsgDataGridView_RowPostPaint;
|
|
}
|
|
_ChannelMsgDataGridView = value;
|
|
if (_ChannelMsgDataGridView == null)
|
|
return;
|
|
_ChannelMsgDataGridView.CellValidating += ChannelMsgDataGridView_CellValidating;
|
|
_ChannelMsgDataGridView.EditingControlShowing += ChannelMsgDataGridView_EditingControlShowing;
|
|
_ChannelMsgDataGridView.CellEndEdit += ChannelMsgDataGridView_CellEndEdit;
|
|
_ChannelMsgDataGridView.CellMouseClick += ChannelMsgDataGridView_CellMouseClick;
|
|
_ChannelMsgDataGridView.RowPostPaint += ChannelMsgDataGridView_RowPostPaint;
|
|
}
|
|
}
|
|
|
|
internal virtual Panel Panel1
|
|
{
|
|
[DebuggerNonUserCode] get => _Panel1;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => _Panel1 = value;
|
|
}
|
|
|
|
internal virtual Button Button3
|
|
{
|
|
[DebuggerNonUserCode] get => _Button3;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Button3 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Button Button2
|
|
{
|
|
[DebuggerNonUserCode] get => _Button2;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Button2 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Button Button1
|
|
{
|
|
[DebuggerNonUserCode] get => _Button1;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (_Button1 != null)
|
|
_Button1.Click -= Button1_Click;
|
|
_Button1 = value;
|
|
if (_Button1 == null)
|
|
return;
|
|
_Button1.Click += Button1_Click;
|
|
}
|
|
}
|
|
|
|
internal virtual Button Button信道编辑
|
|
{
|
|
[DebuggerNonUserCode] get => _Button信道编辑;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (_Button信道编辑 != null)
|
|
_Button信道编辑.Click -= Button信道编辑_Click;
|
|
_Button信道编辑 = value;
|
|
if (_Button信道编辑 == null)
|
|
return;
|
|
_Button信道编辑.Click += Button信道编辑_Click;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewTextBoxColumn ColumnRxFreq
|
|
{
|
|
[DebuggerNonUserCode] get => _ColumnRxFreq;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_ColumnRxFreq = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column差频方向
|
|
{
|
|
[DebuggerNonUserCode] get => _Column差频方向;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column差频方向 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewTextBoxColumn ColumnTxFreq
|
|
{
|
|
[DebuggerNonUserCode] get => _ColumnTxFreq;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_ColumnTxFreq = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column亚音解码类型
|
|
{
|
|
[DebuggerNonUserCode] get => _Column亚音解码类型;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column亚音解码类型 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column亚音解码
|
|
{
|
|
[DebuggerNonUserCode] get => _Column亚音解码;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column亚音解码 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column亚音编码类型
|
|
{
|
|
[DebuggerNonUserCode] get => _Column亚音编码类型;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column亚音编码类型 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column亚音编码
|
|
{
|
|
[DebuggerNonUserCode] get => _Column亚音编码;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column亚音编码 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column发射功率
|
|
{
|
|
[DebuggerNonUserCode] get => _Column发射功率;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column发射功率 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column扫描添加
|
|
{
|
|
[DebuggerNonUserCode] get => _Column扫描添加;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column扫描添加 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column带宽
|
|
{
|
|
[DebuggerNonUserCode] get => _Column带宽;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column带宽 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewComboBoxColumn Column可选信令
|
|
{
|
|
[DebuggerNonUserCode] get => _Column可选信令;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column可选信令 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual DataGridViewButtonColumn Column更多
|
|
{
|
|
[DebuggerNonUserCode] get => _Column更多;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_Column更多 = value;
|
|
}
|
|
}
|
|
|
|
public void ChannelMsg_Deactivate(object sender, EventArgs e)
|
|
{
|
|
ChannelMsgDataGridView.EndEdit();
|
|
int num = checked (ChannelMsgDataGridView.RowCount - 1);
|
|
int i = 0;
|
|
while (i <= num)
|
|
{
|
|
SetData_CHMsg(i);
|
|
checked { ++i; }
|
|
}
|
|
}
|
|
|
|
private void ChannelMsg_FormClosing(object sender, FormClosingEventArgs e)
|
|
{
|
|
MyProject.Forms.MDIParent1.信道信息CToolStripMenuItem.Checked = false;
|
|
}
|
|
|
|
public void ChannelMsg_Load(object sender, EventArgs e)
|
|
{
|
|
MyProject.Forms.MDIParent1.信道信息CToolStripMenuItem.Checked = true;
|
|
ChannelMsgDataGridView.RowCount = 516;
|
|
if (Operators.CompareString(publicva.Language, "zh-CN", false) == 0)
|
|
{
|
|
ChannelMsgDataGridView.TopLeftHeaderCell.Value = (object) "信道";
|
|
Column发射功率.Items.Clear();
|
|
Column发射功率.Items.AddRange((object) "高", (object) "低", (object) "中");
|
|
Column扫描添加.Items.Clear();
|
|
Column扫描添加.Items.AddRange((object) "是", (object) "否");
|
|
Column带宽.Items.Clear();
|
|
Column带宽.Items.AddRange((object) "宽带(25K)", (object) "宽带(20K)", (object) "窄带(12.5K)");
|
|
Column可选信令.Items.Clear();
|
|
Column可选信令.Items.AddRange((object) "无", (object) "DTMF", (object) "2-Tone", (object) "5-Tone");
|
|
}
|
|
else
|
|
{
|
|
ChannelMsgDataGridView.TopLeftHeaderCell.Value = (object) "CH";
|
|
Column发射功率.Items.Clear();
|
|
Column发射功率.Items.AddRange((object) "High", (object) "Low", (object) "Middle");
|
|
Column扫描添加.Items.Clear();
|
|
Column扫描添加.Items.AddRange((object) "Yes", (object) "No");
|
|
Column带宽.Items.Clear();
|
|
Column带宽.Items.AddRange((object) "Wide(25K)", (object) "Wide(20K)", (object) "Narrow(12.5K)");
|
|
Column可选信令.Items.Clear();
|
|
Column可选信令.Items.AddRange((object) "None", (object) "DTMF", (object) "2-Tone", (object) "5-Tone");
|
|
}
|
|
int num = checked (ChannelMsgDataGridView.RowCount - 1);
|
|
int i = 0;
|
|
while (i <= num)
|
|
{
|
|
GetStr_CHMsg(i);
|
|
checked { ++i; }
|
|
}
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
int rowIndex = ChannelMsgDataGridView.CurrentCell.RowIndex;
|
|
int columnIndex = ChannelMsgDataGridView.CurrentCell.ColumnIndex;
|
|
int num = columnIndex;
|
|
if (num == ChannelMsgDataGridView["ColumnRxFreq", rowIndex].ColumnIndex)
|
|
{
|
|
if (Operators.ConditionalCompareObjectNotEqual(ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value, (object) "", false))
|
|
{
|
|
string str = Conversions.ToString(JudgeInputRxFreq(Conversions.ToString(ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value), true));
|
|
ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value = (object) str;
|
|
if (Operators.ConditionalCompareObjectEqual(ChannelMsgDataGridView["ColumnTxFreq", rowIndex].Value, (object) "", false))
|
|
{
|
|
if (Operators.CompareString(str, "", false) == 0)
|
|
Clr_Channel(rowIndex);
|
|
else
|
|
Init_Channel(str, rowIndex);
|
|
}
|
|
else if (Operators.CompareString(str, "", false) == 0)
|
|
Clr_Channel(rowIndex);
|
|
}
|
|
else
|
|
Clr_Channel(rowIndex);
|
|
}
|
|
else if (num == ChannelMsgDataGridView["ColumnTxFreq", rowIndex].ColumnIndex)
|
|
{
|
|
string str = Conversions.ToString(JudgeInputTxFreq(Conversions.ToString(ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value), Conversions.ToString(ChannelMsgDataGridView["ColumnTxFreq", rowIndex].Value), true));
|
|
ChannelMsgDataGridView["ColumnTxFreq", rowIndex].Value = (object) str;
|
|
}
|
|
else if (num == ChannelMsgDataGridView["Column亚音解码类型", rowIndex].ColumnIndex)
|
|
{
|
|
switch (Column亚音解码类型.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音解码类型", rowIndex].Value)))
|
|
{
|
|
case 0:
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音解码.Items[0]);
|
|
break;
|
|
case 1:
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音解码.Items[9]);
|
|
break;
|
|
case 2:
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音解码.Items[9]);
|
|
break;
|
|
case 3:
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音解码.Items[52]);
|
|
break;
|
|
}
|
|
}
|
|
else if (num == ChannelMsgDataGridView["Column亚音解码", rowIndex].ColumnIndex)
|
|
{
|
|
switch (Column亚音解码类型.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音解码类型", rowIndex].Value)))
|
|
{
|
|
case 0:
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音解码.Items[0]);
|
|
break;
|
|
case 1:
|
|
if (!Versioned.IsNumeric(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音解码", rowIndex].Value)) | publicva.ToneValueValidatingDIS)
|
|
{
|
|
publicva.ToneValueValidatingDIS = false;
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(Conversions.ToInteger(Operators.AddObject(Get_CHAddress(rowIndex), (object) 7))));
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
if (!Versioned.IsNumeric(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音解码", rowIndex].Value)) | publicva.ToneValueValidatingDIS)
|
|
{
|
|
publicva.ToneValueValidatingDIS = false;
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(Conversions.ToInteger(Operators.AddObject(Get_CHAddress(rowIndex), (object) 7))));
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
if (Operators.CompareString("D", ChannelMsgDataGridView["Column亚音解码", rowIndex].Value.ToString().Substring(0, 1), false) != 0 | publicva.ToneValueValidatingDIS)
|
|
{
|
|
publicva.ToneValueValidatingDIS = false;
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(Conversions.ToInteger(Operators.AddObject(Get_CHAddress(rowIndex), (object) 7))));
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
else if (num == ChannelMsgDataGridView["Column亚音编码类型", rowIndex].ColumnIndex)
|
|
{
|
|
switch (Column亚音编码类型.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音编码类型", rowIndex].Value)))
|
|
{
|
|
case 0:
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音编码.Items[0]);
|
|
break;
|
|
case 1:
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音编码.Items[9]);
|
|
break;
|
|
case 2:
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音编码.Items[9]);
|
|
break;
|
|
case 3:
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音编码.Items[52]);
|
|
break;
|
|
}
|
|
}
|
|
else if (num == ChannelMsgDataGridView["Column亚音编码", rowIndex].ColumnIndex)
|
|
{
|
|
switch (Column亚音编码类型.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音编码类型", rowIndex].Value)))
|
|
{
|
|
case 0:
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Column亚音编码.Items[0]);
|
|
break;
|
|
case 1:
|
|
if (!Versioned.IsNumeric(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音编码", rowIndex].Value)) | publicva.ToneValueValidatingDIS)
|
|
{
|
|
publicva.ToneValueValidatingDIS = false;
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(Conversions.ToInteger(Operators.AddObject(Get_CHAddress(rowIndex), (object) 9))));
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
if (!Versioned.IsNumeric(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音编码", rowIndex].Value)) | publicva.ToneValueValidatingDIS)
|
|
{
|
|
publicva.ToneValueValidatingDIS = false;
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(Conversions.ToInteger(Operators.AddObject(Get_CHAddress(rowIndex), (object) 9))));
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
if (Operators.CompareString("D", ChannelMsgDataGridView["Column亚音编码", rowIndex].Value.ToString().Substring(0, 1), false) != 0 | publicva.ToneValueValidatingDIS)
|
|
{
|
|
publicva.ToneValueValidatingDIS = false;
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(Conversions.ToInteger(Operators.AddObject(Get_CHAddress(rowIndex), (object) 9))));
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if (columnIndex == ChannelMsgDataGridView["Column更多", 0].ColumnIndex)
|
|
return;
|
|
SetData_CHMsg(rowIndex);
|
|
if (MyProject.Forms.MDIParent1.JudgeIsFormLoaded((Form) MyProject.Forms.ChannelEditForm) && rowIndex == MyProject.Forms.ChannelEditForm.ComboBox编辑信道号.SelectedIndex)
|
|
MyProject.Forms.ChannelEditForm.GetStr_CHMsg(rowIndex);
|
|
if (MyProject.Forms.MDIParent1.JudgeIsFormLoaded((Form) MyProject.Forms.ScanFuncMsgForm))
|
|
MyProject.Forms.ScanFuncMsgForm.SetControl_PRICHList();
|
|
MyProject.Forms.TypeFuncMsgForm.TypeFuncMsgForm_Load(RuntimeHelpers.GetObjectValue(sender), (EventArgs) e);
|
|
MyProject.Forms.SOSMsgForm.SOSMsgForm_Load(RuntimeHelpers.GetObjectValue(sender), (EventArgs) e);
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_EditingControlShowing(
|
|
object sender,
|
|
DataGridViewEditingControlShowingEventArgs e)
|
|
{
|
|
if (ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["ColumnRxFreq", 0].ColumnIndex | ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["ColumnTxFreq", 0].ColumnIndex)
|
|
{
|
|
DataGridViewTextBoxEditingControl boxEditingControl = new DataGridViewTextBoxEditingControl();
|
|
boxEditingControl = (DataGridViewTextBoxEditingControl) e.Control;
|
|
e.Control.KeyPress += Cells_KeyPress;
|
|
}
|
|
else
|
|
{
|
|
if (!(ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音解码", 0].ColumnIndex | ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音编码", 0].ColumnIndex))
|
|
return;
|
|
DataGridViewComboBoxEditingControl boxEditingControl = new DataGridViewComboBoxEditingControl();
|
|
DataGridViewComboBoxEditingControl control = (DataGridViewComboBoxEditingControl) e.Control;
|
|
control.DropDownStyle = ComboBoxStyle.DropDown;
|
|
control.MaxLength = 5;
|
|
e.Control.KeyPress += ComboBoxCells_KeyPress;
|
|
}
|
|
}
|
|
|
|
private void Cells_KeyPress(object sender, KeyPressEventArgs e)
|
|
{
|
|
if (char.IsDigit(e.KeyChar) | e.KeyChar == '\b' | Operators.CompareString(Conversions.ToString(e.KeyChar), ".", false) == 0)
|
|
e.Handled = false;
|
|
else
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void ComboBoxCells_KeyPress(object sender, KeyPressEventArgs e)
|
|
{
|
|
if (Operators.CompareString(Conversions.ToString(e.KeyChar), "D", false) == 0 | char.IsDigit(e.KeyChar) | e.KeyChar == '\b' | Operators.CompareString(Conversions.ToString(e.KeyChar), "N", false) == 0 | Operators.CompareString(Conversions.ToString(e.KeyChar), "I", false) == 0 | e.KeyChar == '.' | Operators.CompareString(Conversions.ToString(e.KeyChar), "d", false) == 0 | Operators.CompareString(Conversions.ToString(e.KeyChar), "n", false) == 0 | Operators.CompareString(Conversions.ToString(e.KeyChar), "i", false) == 0)
|
|
{
|
|
if (Operators.CompareString(Conversions.ToString(e.KeyChar), "d", false) == 0 | Operators.CompareString(Conversions.ToString(e.KeyChar), "n", false) == 0 | Operators.CompareString(Conversions.ToString(e.KeyChar), "i", false) == 0)
|
|
e.KeyChar = char.ToUpper(e.KeyChar);
|
|
e.Handled = false;
|
|
}
|
|
else
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_CellValidating(
|
|
object sender,
|
|
DataGridViewCellValidatingEventArgs e)
|
|
{
|
|
int rowIndex = ChannelMsgDataGridView.CurrentCell.RowIndex;
|
|
if (ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音解码", 0].ColumnIndex | ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音编码", 0].ColumnIndex)
|
|
{
|
|
publicva.ToneValueValidatingDIS = false;
|
|
if (Conversions.ToBoolean(Operators.AndObject(Operators.CompareObjectNotEqual(e.FormattedValue, (object) "", false), (object) (Column亚音解码.Items.IndexOf(RuntimeHelpers.GetObjectValue(e.FormattedValue)) != 0))))
|
|
{
|
|
string str;
|
|
if (Operators.CompareString(e.FormattedValue.ToString().Substring(0, 1), "D", false) == 0)
|
|
{
|
|
if (e.FormattedValue.ToString().Length != 5)
|
|
{
|
|
publicva.ToneValueValidatingDIS = true;
|
|
return;
|
|
}
|
|
if (!(Operators.CompareString(e.FormattedValue.ToString().Substring(4, 1), "N", false) == 0 | Operators.CompareString(e.FormattedValue.ToString().Substring(4, 1), "I", false) == 0))
|
|
{
|
|
publicva.ToneValueValidatingDIS = true;
|
|
return;
|
|
}
|
|
str = Conversions.ToString(e.FormattedValue);
|
|
}
|
|
else
|
|
{
|
|
double num;
|
|
try
|
|
{
|
|
num = Conversions.ToDouble(e.FormattedValue);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
publicva.ToneValueValidatingDIS = true;
|
|
ProjectData.ClearProjectError();
|
|
return;
|
|
}
|
|
if (num > 254.1 | num < 63.0)
|
|
{
|
|
publicva.ToneValueValidatingDIS = true;
|
|
return;
|
|
}
|
|
str = string.Format("{0:###.0}", (object) num);
|
|
}
|
|
if (!Column亚音编码.Items.Contains((object) str))
|
|
{
|
|
Column亚音编码.Items.Add((object) str);
|
|
if (!Column亚音解码.Items.Contains((object) str))
|
|
Column亚音解码.Items.Add((object) str);
|
|
}
|
|
if (ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音解码", 0].ColumnIndex)
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = (object) str;
|
|
if (ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音编码", 0].ColumnIndex)
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = (object) str;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_RowPostPaint(
|
|
object sender,
|
|
DataGridViewRowPostPaintEventArgs e)
|
|
{
|
|
string[] strArray = new string[4]
|
|
{
|
|
"A CALL",
|
|
"B CALL",
|
|
"A VFO",
|
|
"B VFO"
|
|
};
|
|
Brush brush = (Brush) new SolidBrush(ChannelMsgDataGridView.RowHeadersDefaultCellStyle.ForeColor);
|
|
Font font = new Font("Arial", 9f, FontStyle.Bold);
|
|
if (e.RowIndex > 511)
|
|
{
|
|
if (e.RowIndex == 512)
|
|
brush = Brushes.Red;
|
|
else if (e.RowIndex == 513)
|
|
brush = Brushes.Orange;
|
|
else if (e.RowIndex == 514)
|
|
brush = Brushes.Blue;
|
|
else if (e.RowIndex == 515)
|
|
brush = Brushes.Green;
|
|
e.Graphics.DrawString(strArray[checked (e.RowIndex - 512)].ToString(), font, brush, (float) checked (e.RowBounds.Location.X + 2), (float) checked (e.RowBounds.Location.Y + 5));
|
|
}
|
|
else
|
|
e.Graphics.DrawString(checked (e.RowIndex + 0).ToString(), ChannelMsgDataGridView.DefaultCellStyle.Font, brush, (float) e.RowBounds.Location.X + (float) checked (ChannelMsgDataGridView.RowHeadersWidth - (e.RowIndex + 0).ToString().Length * 8) / 2f, (float) checked (e.RowBounds.Location.Y + 5));
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_CellMouseClick(
|
|
object sender,
|
|
DataGridViewCellMouseEventArgs e)
|
|
{
|
|
int columnIndex = ChannelMsgDataGridView["Column更多", 0].ColumnIndex;
|
|
int rowIndex = ChannelMsgDataGridView.CurrentCell.RowIndex;
|
|
if (columnIndex == ChannelMsgDataGridView.CurrentCell.ColumnIndex)
|
|
{
|
|
MyProject.Forms.ChannelEditForm.ChannelEditForm_Load(RuntimeHelpers.GetObjectValue(sender), (EventArgs) e);
|
|
MyProject.Forms.MDIParent1.SafeLoadWindowByName((Form) MyProject.Forms.ChannelEditForm);
|
|
}
|
|
else
|
|
{
|
|
if (!Operators.ConditionalCompareObjectEqual((object) "", ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value, false))
|
|
return;
|
|
ChannelMsgDataGridView.CurrentCell = ChannelMsgDataGridView.Rows[rowIndex].Cells[0];
|
|
ChannelMsgDataGridView.BeginEdit(true);
|
|
}
|
|
}
|
|
|
|
private void Button信道编辑_Click(object sender, EventArgs e)
|
|
{
|
|
MyProject.Forms.ChannelEditForm.ChannelEditForm_Load(RuntimeHelpers.GetObjectValue(sender), e);
|
|
MyProject.Forms.MDIParent1.SafeLoadWindowByName((Form) MyProject.Forms.ChannelEditForm);
|
|
}
|
|
|
|
public void GetStr_CHMsg(int i)
|
|
{
|
|
bool flag = false;
|
|
int integer = Conversions.ToInteger(Get_CHAddress(i));
|
|
if (i > 511)
|
|
{
|
|
if (Operators.ConditionalCompareObjectNotEqual((object) "", Get_RxFreqStr(integer, (int) publicva.EEPROM_Byte[checked (integer + 15)] & 15, (int) publicva.EEPROM_Byte[checked (integer + 11)] & ((int) publicva.Bit0 | (int) publicva.Bit1)), false))
|
|
flag = true;
|
|
}
|
|
else if (CHStatus_Read(i, 8064) && Operators.ConditionalCompareObjectNotEqual((object) "", Get_RxFreqStr(integer, (int) publicva.EEPROM_Byte[checked (integer + 15)] & 15, (int) publicva.EEPROM_Byte[checked (integer + 11)] & ((int) publicva.Bit0 | (int) publicva.Bit1)), false))
|
|
flag = true;
|
|
if (flag)
|
|
{
|
|
ChannelMsgDataGridView["ColumnRxFreq", i].Value = RuntimeHelpers.GetObjectValue(Get_RxFreqStr(checked (integer + 0), (int) publicva.EEPROM_Byte[checked (integer + 15)] & 15, (int) publicva.EEPROM_Byte[checked (integer + 11)] & ((int) publicva.Bit0 | (int) publicva.Bit1)));
|
|
ChannelMsgDataGridView["Column差频方向", i].Value = RuntimeHelpers.GetObjectValue(Column差频方向.Items[(int) (byte) (((uint) publicva.EEPROM_Byte[checked (integer + 14)] & ((uint) publicva.Bit2 | (uint) publicva.Bit3)) >> 2)]);
|
|
ChannelMsgDataGridView["ColumnTxFreq", i].Value = RuntimeHelpers.GetObjectValue(Get_TxFreqStr(checked (integer + 3), (int) publicva.EEPROM_Byte[checked (integer + 15)] & 15, (int) publicva.EEPROM_Byte[checked (integer + 12)] & ((int) publicva.Bit0 | (int) publicva.Bit1)));
|
|
ChannelMsgDataGridView["Column亚音解码类型", i].Value = RuntimeHelpers.GetObjectValue(Column亚音解码类型.Items[(int) (byte) (((uint) publicva.EEPROM_Byte[checked (integer + 7)] & ((uint) publicva.Bit4 | (uint) publicva.Bit5)) >> 4)]);
|
|
ChannelMsgDataGridView["Column亚音解码", i].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(checked (integer + 7)));
|
|
ChannelMsgDataGridView["Column亚音编码类型", i].Value = RuntimeHelpers.GetObjectValue(Column亚音编码类型.Items[(int) (byte) (((uint) publicva.EEPROM_Byte[checked (integer + 9)] & ((uint) publicva.Bit4 | (uint) publicva.Bit5)) >> 4)]);
|
|
ChannelMsgDataGridView["Column亚音编码", i].Value = RuntimeHelpers.GetObjectValue(Get_CTC_DCS_Str(checked (integer + 9)));
|
|
ChannelMsgDataGridView["Column发射功率", i].Value = RuntimeHelpers.GetObjectValue(Column发射功率.Items[(int) (byte) (((uint) publicva.EEPROM_Byte[checked (integer + 13)] & ((uint) publicva.Bit4 | (uint) publicva.Bit5)) >> 4)]);
|
|
ChannelMsgDataGridView["Column扫描添加", i].Value = i <= 511 ? (!CHStatus_Read(i, 8128) ? RuntimeHelpers.GetObjectValue(Column扫描添加.Items[1]) : RuntimeHelpers.GetObjectValue(Column扫描添加.Items[0])) : RuntimeHelpers.GetObjectValue(Column扫描添加.Items[1]);
|
|
ChannelMsgDataGridView["Column带宽", i].Value = RuntimeHelpers.GetObjectValue(Column带宽.Items[(int) (byte) (((uint) publicva.EEPROM_Byte[checked (integer + 14)] & ((uint) publicva.Bit4 | (uint) publicva.Bit5)) >> 4)]);
|
|
ChannelMsgDataGridView["Column可选信令", i].Value = RuntimeHelpers.GetObjectValue(Column可选信令.Items[(int) (byte) (((uint) publicva.EEPROM_Byte[checked (integer + 12)] & ((uint) publicva.Bit4 | (uint) publicva.Bit5 | (uint) publicva.Bit6)) >> 4)]);
|
|
}
|
|
else
|
|
Clr_Channel(i);
|
|
}
|
|
|
|
public void SetData_CHMsg(int i)
|
|
{
|
|
bool flag = false;
|
|
int integer = Conversions.ToInteger(Get_CHAddress(i));
|
|
if (Operators.ConditionalCompareObjectNotEqual(ChannelMsgDataGridView["ColumnRxFreq", i].Value, (object) "", false)
|
|
&& Operators.ConditionalCompareObjectNotEqual((object) "", ChannelMsgDataGridView["ColumnTxFreq", i].Value, false))
|
|
flag = true;
|
|
if (flag)
|
|
{
|
|
publicva.EEPROM_Byte[checked (integer + 15)] = Conversions.ToByte(Get_FreqRangID(Conversions.ToDouble(ChannelMsgDataGridView["ColumnRxFreq", i].Value)));
|
|
publicva.EEPROM_Byte[checked (integer + 11)] = Conversions.ToByte(Operators.OrObject((object) (byte) ((int) publicva.EEPROM_Byte[checked (integer + 11)] & (int) (byte) ~((int) publicva.Bit0 | (int) publicva.Bit1)), Get_FreqStepFlag(Conversions.ToDouble(ChannelMsgDataGridView["ColumnRxFreq", i].Value))));
|
|
Set_FreqData(checked (integer + 0), Conversions.ToString(ChannelMsgDataGridView["ColumnRxFreq", i].Value));
|
|
publicva.EEPROM_Byte[checked (integer + 14)] = checked ((byte) ((int) publicva.EEPROM_Byte[integer + 14] & (int) unchecked ((byte) ~((int) publicva.Bit2 | (int) publicva.Bit3)) | Column差频方向.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column差频方向", i].Value)) << 2));
|
|
publicva.EEPROM_Byte[checked (integer + 12)] = Conversions.ToByte(Operators.OrObject((object) (byte) ((int) publicva.EEPROM_Byte[checked (integer + 12)] & (int) (byte) ~((int) publicva.Bit0 | (int) publicva.Bit1)), Get_FreqStepFlag(Conversions.ToDouble(ChannelMsgDataGridView["ColumnTxFreq", i].Value))));
|
|
Set_FreqData(checked (integer + 3), Conversions.ToString(ChannelMsgDataGridView["ColumnTxFreq", i].Value));
|
|
Set_CTC_DCS_Data(checked (integer + 7), Conversions.ToString(ChannelMsgDataGridView["Column亚音解码", i].Value), Column亚音解码类型.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音解码类型", i].Value)));
|
|
Set_CTC_DCS_Data(checked (integer + 9), Conversions.ToString(ChannelMsgDataGridView["Column亚音编码", i].Value), Column亚音编码类型.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column亚音编码类型", i].Value)));
|
|
publicva.EEPROM_Byte[checked (integer + 13)] = checked ((byte) ((int) publicva.EEPROM_Byte[integer + 13] & (int) unchecked ((byte) ~((int) publicva.Bit4 | (int) publicva.Bit5)) | Column发射功率.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column发射功率", i].Value)) << 4));
|
|
if (Column扫描添加.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column扫描添加", i].Value)) != 0)
|
|
{
|
|
if (i <= 511)
|
|
CHStatusList_Write(i, "删除", 8128);
|
|
}
|
|
else if (i <= 511)
|
|
CHStatusList_Write(i, "添加", 8128);
|
|
publicva.EEPROM_Byte[checked (integer + 14)] = checked ((byte) ((int) publicva.EEPROM_Byte[integer + 14] & (int) unchecked ((byte) ~((int) publicva.Bit4 | (int) publicva.Bit5)) | Column带宽.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column带宽", i].Value)) << 4));
|
|
publicva.EEPROM_Byte[checked (integer + 12)] = checked ((byte) ((int) publicva.EEPROM_Byte[integer + 12] & (int) unchecked ((byte) ~((int) publicva.Bit4 | (int) publicva.Bit5 | (int) publicva.Bit6)) | Column可选信令.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column可选信令", i].Value)) << 4));
|
|
if (i > 511)
|
|
return;
|
|
CHStatusList_Write(i, "添加", 8064);
|
|
}
|
|
else
|
|
{
|
|
int num = 0;
|
|
do
|
|
{
|
|
publicva.EEPROM_Byte[checked (integer + num)] = (byte) 0;
|
|
checked { ++num; }
|
|
}
|
|
while (num <= 31);
|
|
if (i <= 511)
|
|
{
|
|
CHStatusList_Write(i, "删除", 8064);
|
|
CHStatusList_Write(i, "删除", 8128);
|
|
}
|
|
}
|
|
}
|
|
|
|
public object Get_CTC_DCS_Str(int Address)
|
|
{
|
|
int num = (int) (byte) (((uint) publicva.EEPROM_Byte[checked (Address + 0)] & ((uint) publicva.Bit4 | (uint) publicva.Bit5)) >> 4);
|
|
string ctcDcsStr;
|
|
if (num == 0)
|
|
{
|
|
ctcDcsStr = Conversions.ToString(Column亚音编码.Items[0]);
|
|
}
|
|
else
|
|
{
|
|
double a = (double) checked (((int) publicva.EEPROM_Byte[Address + 0] & 15) * 256 + (int) publicva.EEPROM_Byte[Address + 1]);
|
|
if (num == 3)
|
|
{
|
|
int integer = Conversions.ToInteger(Conversion.Oct(checked ((long) Math.Round(a)) & 511L));
|
|
ctcDcsStr = ((uint) publicva.EEPROM_Byte[checked (Address + 0)] & (uint) publicva.Bit7) <= 0U ? "D" + string.Format("{0:D3}", (object) integer) + "N" : "D" + string.Format("{0:D3}", (object) integer) + "I";
|
|
}
|
|
else
|
|
ctcDcsStr = string.Format("{0:###.0}", (object) (a / 10.0));
|
|
}
|
|
if (!Column亚音编码.Items.Contains((object) ctcDcsStr))
|
|
{
|
|
Column亚音编码.Items.Add((object) ctcDcsStr);
|
|
if (!Column亚音解码.Items.Contains((object) ctcDcsStr))
|
|
Column亚音解码.Items.Add((object) ctcDcsStr);
|
|
}
|
|
return (object) ctcDcsStr;
|
|
}
|
|
|
|
public void Set_CTC_DCS_Data(int Address, string ToneStr, int ToneMode)
|
|
{
|
|
if (!Column亚音编码.Items.Contains((object) ToneStr))
|
|
{
|
|
Column亚音编码.Items.Add((object) ToneStr);
|
|
if (!Column亚音解码.Items.Contains((object) ToneStr))
|
|
Column亚音解码.Items.Add((object) ToneStr);
|
|
}
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) ((int) publicva.EEPROM_Byte[Address + 0] & (int) unchecked ((byte) ~((int) publicva.Bit4 | (int) publicva.Bit5)) | ToneMode << 4));
|
|
switch (ToneMode)
|
|
{
|
|
case 0:
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) ((int) publicva.EEPROM_Byte[Address + 0] & 240));
|
|
publicva.EEPROM_Byte[checked (Address + 1)] = checked ((byte) ((int) publicva.EEPROM_Byte[Address + 1] & 0));
|
|
break;
|
|
case 3:
|
|
double a1 = Conversions.ToDouble("&H" + Conversion.Hex((object) ("&O" + Conversions.ToString(Conversions.ToDouble(ToneStr.Substring(1, 3))))));
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) ((long) ((int) publicva.EEPROM_Byte[Address + 0] & 240) | ((long) Math.Round(a1) & 3840L) >> 8));
|
|
publicva.EEPROM_Byte[checked (Address + 1)] = checked ((byte) ((long) Math.Round(a1) & (long) byte.MaxValue));
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = Operators.CompareString("I", ToneStr.Substring(4, 1), false) != 0 ? (byte) ((int) publicva.EEPROM_Byte[checked (Address + 0)] & (int) ~publicva.Bit7) : (byte) ((int) publicva.EEPROM_Byte[checked (Address + 0)] | (int) publicva.Bit7);
|
|
break;
|
|
default:
|
|
double num;
|
|
try
|
|
{
|
|
num = Conversions.ToDouble(ToneStr);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
num = 67.0;
|
|
ProjectData.ClearProjectError();
|
|
}
|
|
double a2 = num * 10.0;
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) ((long) ((int) publicva.EEPROM_Byte[Address + 0] & 240) | ((long) Math.Round(a2) & 3840L) >> 8));
|
|
publicva.EEPROM_Byte[checked (Address + 1)] = checked ((byte) ((long) Math.Round(a2) & (long) byte.MaxValue));
|
|
break;
|
|
}
|
|
}
|
|
|
|
public object Get_RxFreqStr(int Address, int FreqRangID, int CHStepIndex)
|
|
{
|
|
double[] numArray = new double[3]
|
|
{
|
|
5000.0,
|
|
6250.0,
|
|
2500.0
|
|
};
|
|
double num1 = (double) checked ((int) publicva.EEPROM_Byte[Address + 0] * 65536) + (double) checked ((int) publicva.EEPROM_Byte[Address + 1] * 256) + (double) checked ((int) publicva.EEPROM_Byte[Address + 2] * 1);
|
|
if (CHStepIndex > 2)
|
|
CHStepIndex = 0;
|
|
double num2 = (double) (checked ((long) Math.Round(unchecked (num1 * numArray[CHStepIndex]))) / 10L);
|
|
return !((double) publicva.RxFreqRang[FreqRangID, 1] >= num2 & num2 >= (double) publicva.RxFreqRang[FreqRangID, 0]) ? (object) "" : (object) string.Format("{0:#00.00000}", (object) (num2 / 100000.0));
|
|
}
|
|
|
|
public object Get_TxFreqStr(int Address, int FreqRangID, int CHStepIndex)
|
|
{
|
|
double[] numArray = new double[3]
|
|
{
|
|
5000.0,
|
|
6250.0,
|
|
2500.0
|
|
};
|
|
double num = (double) (checked ((long) Math.Round(unchecked ((double) checked ((int) publicva.EEPROM_Byte[Address + 0] * 65536) + (double) checked ((int) publicva.EEPROM_Byte[Address + 1] * 256) + (double) checked ((int) publicva.EEPROM_Byte[Address + 2] * 1) * numArray[CHStepIndex]))) / 10L);
|
|
return !((double) checked (publicva.RxFreqRang[FreqRangID, 1] - publicva.RxFreqRang[FreqRangID, 0]) >= num & num >= 0.0) ? (object) "" : (object) string.Format("{0:##0.00000}", (object) (num / 100000.0));
|
|
}
|
|
|
|
public void Set_FreqData(int Address, string FreqStr)
|
|
{
|
|
double[] numArray = new double[3]
|
|
{
|
|
5000.0,
|
|
6250.0,
|
|
2500.0
|
|
};
|
|
double Freq;
|
|
try
|
|
{
|
|
Freq = Conversions.ToDouble(FreqStr);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
Freq = 0.0;
|
|
ProjectData.ClearProjectError();
|
|
}
|
|
int integer = Conversions.ToInteger(Get_FreqStepFlag(Freq));
|
|
double a = (double) (checked ((long) Math.Round(unchecked (Freq * 1000000.0))) / checked ((long) Math.Round(numArray[integer])));
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) (((long) Math.Round(a) & 16711680L) >> 16));
|
|
publicva.EEPROM_Byte[checked (Address + 1)] = checked ((byte) (((long) Math.Round(a) & 65280L) >> 8));
|
|
publicva.EEPROM_Byte[checked (Address + 2)] = checked ((byte) (((long) Math.Round(a) & (long) byte.MaxValue) >> 0));
|
|
}
|
|
|
|
public object Get_FreqStepFlag(double Freq)
|
|
{
|
|
uint num = checked ((uint) Math.Round(unchecked (Freq * 1000000.0)));
|
|
if ((long) num % 5000L == 0L)
|
|
return (object) 0;
|
|
if ((long) num % 6250L == 0L)
|
|
return (object) 1;
|
|
return (long) num % 2500L == 0L ? (object) 2 : (object) 0;
|
|
}
|
|
|
|
public object Get_FreqRangID(double Freq)
|
|
{
|
|
byte[] numArray = new byte[7]
|
|
{
|
|
publicva.Bit0,
|
|
publicva.Bit1,
|
|
publicva.Bit2,
|
|
publicva.Bit3,
|
|
publicva.Bit4,
|
|
publicva.Bit5,
|
|
publicva.Bit6
|
|
};
|
|
uint num = checked ((uint) Math.Round(unchecked (Freq * 100000.0)));
|
|
uint freqRangId = 0;
|
|
while (!(publicva.RxFreqRang[checked ((int) freqRangId), 1] >= num & num >= publicva.RxFreqRang[checked ((int) freqRangId), 0]) || ((uint) publicva.EEPROM_Byte[12] & (uint) numArray[checked ((int) freqRangId)]) > 0U)
|
|
{
|
|
checked { ++freqRangId; }
|
|
if (freqRangId > 6U)
|
|
return (object) -1;
|
|
}
|
|
return (object) freqRangId;
|
|
}
|
|
|
|
public object JudgeInputRxFreq(string StrFreq, bool msg)
|
|
{
|
|
string str;
|
|
try
|
|
{
|
|
double Freq = Conversions.ToDouble(StrFreq);
|
|
if (Conversions.ToInteger(Get_FreqRangID(Freq)) != -1)
|
|
{
|
|
uint num1 = checked ((uint) Math.Round(unchecked (Freq * 1000000.0)));
|
|
if ((long) num1 % 6250L != 0L && (long) num1 % 5000L != 0L && (long) num1 % 2500L != 0L)
|
|
{
|
|
int num2 = checked ((int) unchecked ((long) num1 / 5000L));
|
|
if ((long) num1 % 5000L > 10000L)
|
|
checked { ++num2; }
|
|
num1 = checked ((uint) (num2 * 5000));
|
|
}
|
|
str = string.Format("{0:#00.00000}", (object) ((double) num1 / 1000000.0));
|
|
}
|
|
else
|
|
{
|
|
if (msg)
|
|
Msgbox_Msg("频率超出范围", "frequency out of range,out of range");
|
|
str = "";
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
if (msg)
|
|
Msgbox_Msg("频率超出范围", "frequency out of range,out of range");
|
|
str = "";
|
|
ProjectData.ClearProjectError();
|
|
}
|
|
return (object) str;
|
|
}
|
|
|
|
public object JudgeInputTxFreq(string RxFreq, string StrFreq, bool msg)
|
|
{
|
|
string str;
|
|
try
|
|
{
|
|
double Freq = Conversions.ToDouble(RxFreq);
|
|
double num1 = Conversions.ToDouble(StrFreq);
|
|
int integer = Conversions.ToInteger(Get_FreqRangID(Freq));
|
|
if (integer != -1)
|
|
{
|
|
uint num2 = checked (publicva.RxFreqRang[integer, 1] - publicva.RxFreqRang[integer, 0]);
|
|
uint num3 = 0;
|
|
uint num4 = checked ((uint) Math.Round(unchecked (num1 * 100000.0)));
|
|
if (num2 >= num4 & num4 >= num3)
|
|
{
|
|
if ((long) num4 % 625L != 0L && (long) num4 % 500L != 0L && (long) num4 % 250L != 0L)
|
|
{
|
|
int num5 = checked ((int) unchecked ((long) num4 / 500L));
|
|
if ((long) num4 % 500L > 1000L)
|
|
checked { ++num5; }
|
|
num4 = checked ((uint) (num5 * 500));
|
|
}
|
|
str = string.Format("{0:##0.00000}", (object) ((double) num4 / 100000.0));
|
|
}
|
|
else
|
|
{
|
|
if (msg)
|
|
Msgbox_Msg("频率超出范围", "frequency out of range,out of range");
|
|
str = "0.00000";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (msg)
|
|
Msgbox_Msg("频率超出范围", "frequency out of range,out of range");
|
|
str = "";
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
if (msg)
|
|
Msgbox_Msg("频率超出范围", "frequency out of range,out of range");
|
|
str = "0.00000";
|
|
ProjectData.ClearProjectError();
|
|
}
|
|
return (object) str;
|
|
}
|
|
|
|
public void Msgbox_Msg(string Zh_Msg, string En_Msg)
|
|
{
|
|
if (Operators.CompareString(publicva.Language, "zh-CN", false) == 0)
|
|
{
|
|
int num1 = (int) Interaction.MsgBox((object) Zh_Msg, MsgBoxStyle.Exclamation, (object) publicva.TypeName);
|
|
}
|
|
else
|
|
{
|
|
int num2 = (int) Interaction.MsgBox((object) En_Msg, MsgBoxStyle.Exclamation, (object) publicva.TypeName);
|
|
}
|
|
}
|
|
|
|
public void CHStatusList_Write(int CHNo, string COM, int Address)
|
|
{
|
|
byte[] numArray = new byte[8]
|
|
{
|
|
(byte) 1,
|
|
(byte) 2,
|
|
(byte) 4,
|
|
(byte) 8,
|
|
(byte) 16,
|
|
(byte) 32,
|
|
(byte) 64,
|
|
(byte) 128
|
|
};
|
|
checked { Address += CHNo >> 3; }
|
|
if (Operators.CompareString(COM, "添加", false) == 0)
|
|
{
|
|
publicva.EEPROM_Byte[Address] = (byte) ((int) publicva.EEPROM_Byte[Address] & (int) ~numArray[CHNo & 7]);
|
|
}
|
|
else
|
|
{
|
|
if (Operators.CompareString(COM, "删除", false) != 0)
|
|
return;
|
|
publicva.EEPROM_Byte[Address] = (byte) ((int) publicva.EEPROM_Byte[Address] | (int) numArray[CHNo & 7]);
|
|
}
|
|
}
|
|
|
|
public bool CHStatus_Read(int CHNo, int Address)
|
|
{
|
|
byte[] numArray = new byte[8]
|
|
{
|
|
(byte) 1,
|
|
(byte) 2,
|
|
(byte) 4,
|
|
(byte) 8,
|
|
(byte) 16,
|
|
(byte) 32,
|
|
(byte) 64,
|
|
(byte) 128
|
|
};
|
|
checked { Address += CHNo >> 3; }
|
|
return ((uint) publicva.EEPROM_Byte[Address] & (uint) numArray[CHNo & 7]) <= 0U;
|
|
}
|
|
|
|
public object Get_CHAddress(int i)
|
|
{
|
|
return (object) (i <= 511 ? checked (i * 32 + 8192) : checked ((i - 512) * 32 + 7936));
|
|
}
|
|
|
|
public void Clr_Channel(int i)
|
|
{
|
|
if (i > 511)
|
|
{
|
|
switch (i)
|
|
{
|
|
case 512:
|
|
Init_Channel("146.00000", i);
|
|
break;
|
|
case 513:
|
|
Init_Channel("440.00000", i);
|
|
break;
|
|
case 514:
|
|
Init_Channel("146.00000", i);
|
|
break;
|
|
case 515:
|
|
Init_Channel("440.00000", i);
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
ChannelMsgDataGridView["ColumnRxFreq", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column差频方向", i].Value = (object) "";
|
|
ChannelMsgDataGridView["ColumnTxFreq", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column亚音解码类型", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column亚音解码", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column亚音编码类型", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column亚音编码", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column发射功率", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column扫描添加", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column带宽", i].Value = (object) "";
|
|
ChannelMsgDataGridView["Column可选信令", i].Value = (object) "";
|
|
}
|
|
}
|
|
|
|
public void Init_Channel(string Freq, int i)
|
|
{
|
|
ChannelMsgDataGridView["ColumnRxFreq", i].Value = (object) Freq;
|
|
ChannelMsgDataGridView["Column差频方向", i].Value = RuntimeHelpers.GetObjectValue(Column差频方向.Items[0]);
|
|
ChannelMsgDataGridView["ColumnTxFreq", i].Value = Conversions.ToDouble(Freq) <= 300.0 ? (object) "0.60000" : (object) "5.00000";
|
|
ChannelMsgDataGridView["Column亚音解码类型", i].Value = RuntimeHelpers.GetObjectValue(Column亚音解码类型.Items[0]);
|
|
ChannelMsgDataGridView["Column亚音解码", i].Value = RuntimeHelpers.GetObjectValue(Column亚音解码.Items[0]);
|
|
ChannelMsgDataGridView["Column亚音编码类型", i].Value = RuntimeHelpers.GetObjectValue(Column亚音编码类型.Items[0]);
|
|
ChannelMsgDataGridView["Column亚音编码", i].Value = RuntimeHelpers.GetObjectValue(Column亚音编码.Items[0]);
|
|
ChannelMsgDataGridView["Column发射功率", i].Value = RuntimeHelpers.GetObjectValue(Column发射功率.Items[0]);
|
|
ChannelMsgDataGridView["Column扫描添加", i].Value = RuntimeHelpers.GetObjectValue(Column扫描添加.Items[0]);
|
|
ChannelMsgDataGridView["Column带宽", i].Value = RuntimeHelpers.GetObjectValue(Column带宽.Items[0]);
|
|
ChannelMsgDataGridView["Column可选信令", i].Value = RuntimeHelpers.GetObjectValue(Column可选信令.Items[0]);
|
|
int integer = Conversions.ToInteger(Get_CHAddress(i));
|
|
publicva.EEPROM_Byte[checked (integer + 6)] = (byte) 6;
|
|
publicva.EEPROM_Byte[checked (integer + 9)] = (byte) ((int) publicva.EEPROM_Byte[checked (integer + 9)] | (int) publicva.Bit6);
|
|
publicva.EEPROM_Byte[checked (integer + 11)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 12)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 13)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 14)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 15)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 16)] = (byte) 1;
|
|
publicva.EEPROM_Byte[checked (integer + 17)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 18)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 19)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 20)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 21)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 22)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 23)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 24)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 25)] = (byte) 0;
|
|
publicva.EEPROM_Byte[checked (integer + 26)] = (byte) 45;
|
|
publicva.EEPROM_Byte[checked (integer + 27)] = (byte) 45;
|
|
publicva.EEPROM_Byte[checked (integer + 28)] = (byte) 45;
|
|
publicva.EEPROM_Byte[checked (integer + 29)] = (byte) 45;
|
|
publicva.EEPROM_Byte[checked (integer + 30)] = (byte) 45;
|
|
publicva.EEPROM_Byte[checked (integer + 31)] = (byte) 45;
|
|
}
|
|
|
|
private void Button1_Click(object sender, EventArgs e) => Close();
|
|
}
|
|
}
|