1224 lines
61 KiB
C#
1224 lines
61 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(new WeakReference(this));
|
|
InitializeComponent();
|
|
}
|
|
|
|
[DebuggerNonUserCode]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing && components != null)
|
|
components.Dispose();
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
[DebuggerStepThrough]
|
|
private void InitializeComponent()
|
|
{
|
|
var gridViewCellStyle1 = new DataGridViewCellStyle();
|
|
var gridViewCellStyle2 = new DataGridViewCellStyle();
|
|
var componentResourceManager = new ComponentResourceManager(typeof (ChannelMsg));
|
|
var gridViewCellStyle3 = new DataGridViewCellStyle();
|
|
var gridViewCellStyle4 = new DataGridViewCellStyle();
|
|
var gridViewCellStyle5 = new DataGridViewCellStyle();
|
|
var 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, 134);
|
|
gridViewCellStyle2.ForeColor = SystemColors.WindowText;
|
|
gridViewCellStyle2.SelectionBackColor = SystemColors.Highlight;
|
|
gridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
|
|
gridViewCellStyle2.WrapMode = DataGridViewTriState.True;
|
|
ChannelMsgDataGridView.ColumnHeadersDefaultCellStyle = gridViewCellStyle2;
|
|
componentResourceManager.ApplyResources(ChannelMsgDataGridView, "ChannelMsgDataGridView");
|
|
ChannelMsgDataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
|
ChannelMsgDataGridView.Columns.AddRange(ColumnRxFreq, Column差频方向, ColumnTxFreq, Column亚音解码类型, Column亚音解码, Column亚音编码类型, Column亚音编码, Column发射功率, Column扫描添加, Column带宽, Column可选信令, Column更多);
|
|
ChannelMsgDataGridView.Name = "ChannelMsgDataGridView";
|
|
gridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
gridViewCellStyle3.BackColor = SystemColors.Control;
|
|
gridViewCellStyle3.Font = new Font("宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, 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(Panel1, "Panel1");
|
|
Panel1.BorderStyle = BorderStyle.Fixed3D;
|
|
Panel1.Controls.Add(ChannelMsgDataGridView);
|
|
Panel1.Name = "Panel1";
|
|
componentResourceManager.ApplyResources(Button3, "Button3");
|
|
Button3.Name = "Button3";
|
|
Button3.UseVisualStyleBackColor = true;
|
|
componentResourceManager.ApplyResources(Button2, "Button2");
|
|
Button2.Name = "Button2";
|
|
Button2.UseVisualStyleBackColor = true;
|
|
componentResourceManager.ApplyResources(Button1, "Button1");
|
|
Button1.Name = "Button1";
|
|
Button1.UseVisualStyleBackColor = true;
|
|
componentResourceManager.ApplyResources(Button信道编辑, "Button信道编辑");
|
|
Button信道编辑.Name = "Button信道编辑";
|
|
Button信道编辑.UseVisualStyleBackColor = true;
|
|
gridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
ColumnRxFreq.DefaultCellStyle = gridViewCellStyle5;
|
|
componentResourceManager.ApplyResources(ColumnRxFreq, "ColumnRxFreq");
|
|
ColumnRxFreq.MaxInputLength = 9;
|
|
ColumnRxFreq.Name = "ColumnRxFreq";
|
|
ColumnRxFreq.Resizable = DataGridViewTriState.False;
|
|
ColumnRxFreq.SortMode = DataGridViewColumnSortMode.NotSortable;
|
|
Column差频方向.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column差频方向, "Column差频方向");
|
|
Column差频方向.Items.AddRange("OFF", "DUP -", "DUP +");
|
|
Column差频方向.Name = "Column差频方向";
|
|
componentResourceManager.ApplyResources(ColumnTxFreq, "ColumnTxFreq");
|
|
ColumnTxFreq.MaxInputLength = 9;
|
|
ColumnTxFreq.Name = "ColumnTxFreq";
|
|
ColumnTxFreq.SortMode = DataGridViewColumnSortMode.NotSortable;
|
|
Column亚音解码类型.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column亚音解码类型, "Column亚音解码类型");
|
|
Column亚音解码类型.Items.AddRange("OFF", "TONE", "CTCSS", "DCS");
|
|
Column亚音解码类型.Name = "Column亚音解码类型";
|
|
Column亚音解码.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column亚音解码, "Column亚音解码");
|
|
Column亚音解码.Items.AddRange("OFF", "67.0", "69.3", "71.9", "74.4", "77.0", "79.7", "82.5", "85.4", "88.5", "91.5", "94.8", "97.4", "100.0", "103.5", "107.2", "110.9", "114.8", "118.8", "123.0", "127.3", "131.8", "136.5", "141.3", "146.2", "151.4", "156.7", "159.8", "162.2", "165.5", "167.9", "171.3", "173.8", "177.3", "179.9", "183.5", "186.2", "189.9", "192.8", "196.6", "199.5", "203.5", "206.5", "210.7", "218.1", "225.7", "229.1", "233.6", "241.8", "250.3", "254.1", "D017N", "D023N", "D025N", "D026N", "D031N", "D032N", "D036N", "D043N", "D047N", "D050N", "D051N", "D053N", "D054N", "D065N", "D071N", "D072N", "D073N", "D074N", "D114N", "D115N", "D116N", "D122N", "D125N", "D131N", "D132N", "D134N", "D143N", "D145N", "D152N", "D155N", "D156N", "D162N", "D165N", "D172N", "D174N", "D205N", "D212N", "D223N", "D225N", "D226N", "D243N", "D244N", "D245N", "D246N", "D251N", "D252N", "D255N", "D261N", "D263N", "D265N", "D266N", "D271N", "D274N", "D306N", "D311N", "D315N", "D325N", "D331N", "D332N", "D343N", "D346N", "D351N", "D356N", "D364N", "D365N", "D371N", "D411N", "D412N", "D413N", "D423N", "D431N", "D432N", "D445N", "D446N", "D452N", "D454N", "D455N", "D462N", "D464N", "D465N", "D466N", "D503N", "D506N", "D516N", "D523N", "D526N", "D532N", "D546N", "D565N", "D606N", "D612N", "D624N", "D627N", "D631N", "D632N", "D645N", "D654N", "D662N", "D664N", "D703N", "D712N", "D723N", "D731N", "D732N", "D734N", "D743N", "D754N", "D017I", "D023I", "D025I", "D026I", "D031I", "D032I", "D036I", "D043I", "D047I", "D050I", "D051I", "D053I", "D054I", "D065I", "D071I", "D072I", "D073I", "D074I", "D114I", "D115I", "D116I", "D122I", "D125I", "D131I", "D132I", "D134I", "D143I", "D145I", "D152I", "D155I", "D156I", "D162I", "D165I", "D172I", "D174I", "D205I", "D212I", "D223I", "D225I", "D226I", "D243I", "D244I", "D245I", "D246I", "D251I", "D252I", "D255I", "D261I", "D263I", "D265I", "D266I", "D271I", "D274I", "D306I", "D311I", "D315I", "D325I", "D331I", "D332I", "D343I", "D346I", "D351I", "D356I", "D364I", "D365I", "D371I", "D411I", "D412I", "D413I", "D423I", "D431I", "D432I", "D445I", "D446I", "D452I", "D454I", "D455I", "D462I", "D464I", "D465I", "D466I", "D503I", "D506I", "D516I", "D523I", "D526I", "D532I", "D546I", "D565I", "D606I", "D612I", "D624I", "D627I", "D631I", "D632I", "D645I", "D654I", "D662I", "D664I", "D703I", "D712I", "D723I", "D731I", "D732I", "D734I", "D743I", "D754I");
|
|
Column亚音解码.Name = "Column亚音解码";
|
|
Column亚音编码类型.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column亚音编码类型, "Column亚音编码类型");
|
|
Column亚音编码类型.Items.AddRange("OFF", "TONE", "CTCSS", "DCS");
|
|
Column亚音编码类型.Name = "Column亚音编码类型";
|
|
Column亚音编码.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column亚音编码, "Column亚音编码");
|
|
Column亚音编码.Items.AddRange("OFF", "67.0", "69.3", "71.9", "74.4", "77.0", "79.7", "82.5", "85.4", "88.5", "91.5", "94.8", "97.4", "100.0", "103.5", "107.2", "110.9", "114.8", "118.8", "123.0", "127.3", "131.8", "136.5", "141.3", "146.2", "151.4", "156.7", "159.8", "162.2", "165.5", "167.9", "171.3", "173.8", "177.3", "179.9", "183.5", "186.2", "189.9", "192.8", "196.6", "199.5", "203.5", "206.5", "210.7", "218.1", "225.7", "229.1", "233.6", "241.8", "250.3", "254.1", "D017N", "D023N", "D025N", "D026N", "D031N", "D032N", "D036N", "D043N", "D047N", "D050N", "D051N", "D053N", "D054N", "D065N", "D071N", "D072N", "D073N", "D074N", "D114N", "D115N", "D116N", "D122N", "D125N", "D131N", "D132N", "D134N", "D143N", "D145N", "D152N", "D155N", "D156N", "D162N", "D165N", "D172N", "D174N", "D205N", "D212N", "D223N", "D225N", "D226N", "D243N", "D244N", "D245N", "D246N", "D251N", "D252N", "D255N", "D261N", "D263N", "D265N", "D266N", "D271N", "D274N", "D306N", "D311N", "D315N", "D325N", "D331N", "D332N", "D343N", "D346N", "D351N", "D356N", "D364N", "D365N", "D371N", "D411N", "D412N", "D413N", "D423N", "D431N", "D432N", "D445N", "D446N", "D452N", "D454N", "D455N", "D462N", "D464N", "D465N", "D466N", "D503N", "D506N", "D516N", "D523N", "D526N", "D532N", "D546N", "D565N", "D606N", "D612N", "D624N", "D627N", "D631N", "D632N", "D645N", "D654N", "D662N", "D664N", "D703N", "D712N", "D723N", "D731N", "D732N", "D734N", "D743N", "D754N", "D017I", "D023I", "D025I", "D026I", "D031I", "D032I", "D036I", "D043I", "D047I", "D050I", "D051I", "D053I", "D054I", "D065I", "D071I", "D072I", "D073I", "D074I", "D114I", "D115I", "D116I", "D122I", "D125I", "D131I", "D132I", "D134I", "D143I", "D145I", "D152I", "D155I", "D156I", "D162I", "D165I", "D172I", "D174I", "D205I", "D212I", "D223I", "D225I", "D226I", "D243I", "D244I", "D245I", "D246I", "D251I", "D252I", "D255I", "D261I", "D263I", "D265I", "D266I", "D271I", "D274I", "D306I", "D311I", "D315I", "D325I", "D331I", "D332I", "D343I", "D346I", "D351I", "D356I", "D364I", "D365I", "D371I", "D411I", "D412I", "D413I", "D423I", "D431I", "D432I", "D445I", "D446I", "D452I", "D454I", "D455I", "D462I", "D464I", "D465I", "D466I", "D503I", "D506I", "D516I", "D523I", "D526I", "D532I", "D546I", "D565I", "D606I", "D612I", "D624I", "D627I", "D631I", "D632I", "D645I", "D654I", "D662I", "D664I", "D703I", "D712I", "D723I", "D731I", "D732I", "D734I", "D743I", "D754I");
|
|
Column亚音编码.Name = "Column亚音编码";
|
|
Column发射功率.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column发射功率, "Column发射功率");
|
|
Column发射功率.Items.AddRange("高", "低", "中");
|
|
Column发射功率.Name = "Column发射功率";
|
|
Column扫描添加.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
|
Column扫描添加.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column扫描添加, "Column扫描添加");
|
|
Column扫描添加.Items.AddRange("是", "否");
|
|
Column扫描添加.Name = "Column扫描添加";
|
|
Column带宽.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column带宽, "Column带宽");
|
|
Column带宽.Items.AddRange("宽带(25K)", "宽带(20K)", "窄带(12.5K)");
|
|
Column带宽.Name = "Column带宽";
|
|
Column可选信令.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
|
|
componentResourceManager.ApplyResources(Column可选信令, "Column可选信令");
|
|
Column可选信令.Items.AddRange("无", "DTMF", "2-Tone", "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(Column更多, "Column更多");
|
|
Column更多.Name = "Column更多";
|
|
Column更多.Resizable = DataGridViewTriState.False;
|
|
Column更多.Text = ">>";
|
|
Column更多.UseColumnTextForButtonValue = true;
|
|
componentResourceManager.ApplyResources(this, "$this");
|
|
AutoScaleMode = AutoScaleMode.Font;
|
|
Controls.Add(Button信道编辑);
|
|
Controls.Add(Button3);
|
|
Controls.Add(Button2);
|
|
Controls.Add(Button1);
|
|
Controls.Add(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();
|
|
var num = checked (ChannelMsgDataGridView.RowCount - 1);
|
|
var 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 = "信道";
|
|
Column发射功率.Items.Clear();
|
|
Column发射功率.Items.AddRange("高", "低", "中");
|
|
Column扫描添加.Items.Clear();
|
|
Column扫描添加.Items.AddRange("是", "否");
|
|
Column带宽.Items.Clear();
|
|
Column带宽.Items.AddRange("宽带(25K)", "宽带(20K)", "窄带(12.5K)");
|
|
Column可选信令.Items.Clear();
|
|
Column可选信令.Items.AddRange("无", "DTMF", "2-Tone", "5-Tone");
|
|
}
|
|
else
|
|
{
|
|
ChannelMsgDataGridView.TopLeftHeaderCell.Value = "CH";
|
|
Column发射功率.Items.Clear();
|
|
Column发射功率.Items.AddRange("High", "Low", "Middle");
|
|
Column扫描添加.Items.Clear();
|
|
Column扫描添加.Items.AddRange("Yes", "No");
|
|
Column带宽.Items.Clear();
|
|
Column带宽.Items.AddRange("Wide(25K)", "Wide(20K)", "Narrow(12.5K)");
|
|
Column可选信令.Items.Clear();
|
|
Column可选信令.Items.AddRange("None", "DTMF", "2-Tone", "5-Tone");
|
|
}
|
|
var num = checked (ChannelMsgDataGridView.RowCount - 1);
|
|
var i = 0;
|
|
while (i <= num)
|
|
{
|
|
GetStr_CHMsg(i);
|
|
checked { ++i; }
|
|
}
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
var rowIndex = ChannelMsgDataGridView.CurrentCell.RowIndex;
|
|
var columnIndex = ChannelMsgDataGridView.CurrentCell.ColumnIndex;
|
|
var num = columnIndex;
|
|
if (num == ChannelMsgDataGridView["ColumnRxFreq", rowIndex].ColumnIndex)
|
|
{
|
|
if (Operators.ConditionalCompareObjectNotEqual(ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value, "", false))
|
|
{
|
|
var str = Conversions.ToString(JudgeInputRxFreq(Conversions.ToString(ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value), true));
|
|
ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value = str;
|
|
if (Operators.ConditionalCompareObjectEqual(ChannelMsgDataGridView["ColumnTxFreq", rowIndex].Value, "", 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)
|
|
{
|
|
var str = Conversions.ToString(JudgeInputTxFreq(Conversions.ToString(ChannelMsgDataGridView["ColumnRxFreq", rowIndex].Value), Conversions.ToString(ChannelMsgDataGridView["ColumnTxFreq", rowIndex].Value), true));
|
|
ChannelMsgDataGridView["ColumnTxFreq", rowIndex].Value = 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), 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), 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), 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), 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), 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), 9))));
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if (columnIndex == ChannelMsgDataGridView["Column更多", 0].ColumnIndex)
|
|
return;
|
|
SetData_CHMsg(rowIndex);
|
|
if (MyProject.Forms.MDIParent1.JudgeIsFormLoaded(MyProject.Forms.ChannelEditForm) && rowIndex == MyProject.Forms.ChannelEditForm.ComboBox编辑信道号.SelectedIndex)
|
|
MyProject.Forms.ChannelEditForm.GetStr_CHMsg(rowIndex);
|
|
if (MyProject.Forms.MDIParent1.JudgeIsFormLoaded(MyProject.Forms.ScanFuncMsgForm))
|
|
MyProject.Forms.ScanFuncMsgForm.SetControl_PRICHList();
|
|
MyProject.Forms.TypeFuncMsgForm.TypeFuncMsgForm_Load(RuntimeHelpers.GetObjectValue(sender), e);
|
|
MyProject.Forms.SOSMsgForm.SOSMsgForm_Load(RuntimeHelpers.GetObjectValue(sender), e);
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_EditingControlShowing(
|
|
object sender,
|
|
DataGridViewEditingControlShowingEventArgs e)
|
|
{
|
|
if (ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["ColumnRxFreq", 0].ColumnIndex | ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["ColumnTxFreq", 0].ColumnIndex)
|
|
{
|
|
var 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;
|
|
var boxEditingControl = new DataGridViewComboBoxEditingControl();
|
|
var 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)
|
|
{
|
|
var 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, "", false), 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}", num);
|
|
}
|
|
if (!Column亚音编码.Items.Contains(str))
|
|
{
|
|
Column亚音编码.Items.Add(str);
|
|
if (!Column亚音解码.Items.Contains(str))
|
|
Column亚音解码.Items.Add(str);
|
|
}
|
|
if (ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音解码", 0].ColumnIndex)
|
|
ChannelMsgDataGridView["Column亚音解码", rowIndex].Value = str;
|
|
if (ChannelMsgDataGridView.CurrentCell.ColumnIndex == ChannelMsgDataGridView["Column亚音编码", 0].ColumnIndex)
|
|
ChannelMsgDataGridView["Column亚音编码", rowIndex].Value = str;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_RowPostPaint(
|
|
object sender,
|
|
DataGridViewRowPostPaintEventArgs e)
|
|
{
|
|
var strArray = new string[4]
|
|
{
|
|
"A CALL",
|
|
"B CALL",
|
|
"A VFO",
|
|
"B VFO"
|
|
};
|
|
var brush = (Brush) new SolidBrush(ChannelMsgDataGridView.RowHeadersDefaultCellStyle.ForeColor);
|
|
var 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, checked (e.RowBounds.Location.X + 2), checked (e.RowBounds.Location.Y + 5));
|
|
}
|
|
else
|
|
e.Graphics.DrawString(checked (e.RowIndex + 0).ToString(), ChannelMsgDataGridView.DefaultCellStyle.Font, brush, e.RowBounds.Location.X + checked (ChannelMsgDataGridView.RowHeadersWidth - (e.RowIndex + 0).ToString().Length * 8) / 2f, checked (e.RowBounds.Location.Y + 5));
|
|
}
|
|
|
|
private void ChannelMsgDataGridView_CellMouseClick(
|
|
object sender,
|
|
DataGridViewCellMouseEventArgs e)
|
|
{
|
|
var columnIndex = ChannelMsgDataGridView["Column更多", 0].ColumnIndex;
|
|
var rowIndex = ChannelMsgDataGridView.CurrentCell.RowIndex;
|
|
if (columnIndex == ChannelMsgDataGridView.CurrentCell.ColumnIndex)
|
|
{
|
|
MyProject.Forms.ChannelEditForm.ChannelEditForm_Load(RuntimeHelpers.GetObjectValue(sender), e);
|
|
MyProject.Forms.MDIParent1.SafeLoadWindowByName(MyProject.Forms.ChannelEditForm);
|
|
}
|
|
else
|
|
{
|
|
if (!Operators.ConditionalCompareObjectEqual("", 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(MyProject.Forms.ChannelEditForm);
|
|
}
|
|
|
|
public void GetStr_CHMsg(int i)
|
|
{
|
|
var flag = false;
|
|
var integer = Conversions.ToInteger(Get_CHAddress(i));
|
|
if (i > 511)
|
|
{
|
|
if (Operators.ConditionalCompareObjectNotEqual("", Get_RxFreqStr(integer, publicva.EEPROM_Byte[checked (integer + 15)] & 15, publicva.EEPROM_Byte[checked (integer + 11)] & (publicva.Bit0 | publicva.Bit1)), false))
|
|
flag = true;
|
|
}
|
|
else if (CHStatus_Read(i, 8064) && Operators.ConditionalCompareObjectNotEqual("", Get_RxFreqStr(integer, publicva.EEPROM_Byte[checked (integer + 15)] & 15, publicva.EEPROM_Byte[checked (integer + 11)] & (publicva.Bit0 | publicva.Bit1)), false))
|
|
flag = true;
|
|
if (flag)
|
|
{
|
|
ChannelMsgDataGridView["ColumnRxFreq", i].Value = RuntimeHelpers.GetObjectValue(Get_RxFreqStr(checked (integer + 0), publicva.EEPROM_Byte[checked (integer + 15)] & 15, publicva.EEPROM_Byte[checked (integer + 11)] & (publicva.Bit0 | publicva.Bit1)));
|
|
ChannelMsgDataGridView["Column差频方向", i].Value = RuntimeHelpers.GetObjectValue(Column差频方向.Items[(byte) ((publicva.EEPROM_Byte[checked (integer + 14)] & (publicva.Bit2 | (uint) publicva.Bit3)) >> 2)]);
|
|
ChannelMsgDataGridView["ColumnTxFreq", i].Value = RuntimeHelpers.GetObjectValue(Get_TxFreqStr(checked (integer + 3), publicva.EEPROM_Byte[checked (integer + 15)] & 15, publicva.EEPROM_Byte[checked (integer + 12)] & (publicva.Bit0 | publicva.Bit1)));
|
|
ChannelMsgDataGridView["Column亚音解码类型", i].Value = RuntimeHelpers.GetObjectValue(Column亚音解码类型.Items[(byte) ((publicva.EEPROM_Byte[checked (integer + 7)] & (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[(byte) ((publicva.EEPROM_Byte[checked (integer + 9)] & (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[(byte) ((publicva.EEPROM_Byte[checked (integer + 13)] & (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[(byte) ((publicva.EEPROM_Byte[checked (integer + 14)] & (publicva.Bit4 | (uint) publicva.Bit5)) >> 4)]);
|
|
ChannelMsgDataGridView["Column可选信令", i].Value = RuntimeHelpers.GetObjectValue(Column可选信令.Items[(byte) ((publicva.EEPROM_Byte[checked (integer + 12)] & (publicva.Bit4 | (uint) publicva.Bit5 | publicva.Bit6)) >> 4)]);
|
|
}
|
|
else
|
|
Clr_Channel(i);
|
|
}
|
|
|
|
public void SetData_CHMsg(int i)
|
|
{
|
|
var flag = false;
|
|
var integer = Conversions.ToInteger(Get_CHAddress(i));
|
|
if (Operators.ConditionalCompareObjectNotEqual(ChannelMsgDataGridView["ColumnRxFreq", i].Value, "", false)
|
|
&& Operators.ConditionalCompareObjectNotEqual("", 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((byte) (publicva.EEPROM_Byte[checked (integer + 11)] & (byte) ~(publicva.Bit0 | 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) (publicva.EEPROM_Byte[integer + 14] & unchecked ((byte) ~(publicva.Bit2 | publicva.Bit3)) | Column差频方向.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column差频方向", i].Value)) << 2));
|
|
publicva.EEPROM_Byte[checked (integer + 12)] = Conversions.ToByte(Operators.OrObject((byte) (publicva.EEPROM_Byte[checked (integer + 12)] & (byte) ~(publicva.Bit0 | 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) (publicva.EEPROM_Byte[integer + 13] & unchecked ((byte) ~(publicva.Bit4 | 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) (publicva.EEPROM_Byte[integer + 14] & unchecked ((byte) ~(publicva.Bit4 | publicva.Bit5)) | Column带宽.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column带宽", i].Value)) << 4));
|
|
publicva.EEPROM_Byte[checked (integer + 12)] = checked ((byte) (publicva.EEPROM_Byte[integer + 12] & unchecked ((byte) ~(publicva.Bit4 | publicva.Bit5 | publicva.Bit6)) | Column可选信令.Items.IndexOf(RuntimeHelpers.GetObjectValue(ChannelMsgDataGridView["Column可选信令", i].Value)) << 4));
|
|
if (i > 511)
|
|
return;
|
|
CHStatusList_Write(i, "添加", 8064);
|
|
}
|
|
else
|
|
{
|
|
var num = 0;
|
|
do
|
|
{
|
|
publicva.EEPROM_Byte[checked (integer + num)] = 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)
|
|
{
|
|
var num = (int) (byte) ((publicva.EEPROM_Byte[checked (Address + 0)] & (publicva.Bit4 | (uint) publicva.Bit5)) >> 4);
|
|
string ctcDcsStr;
|
|
if (num == 0)
|
|
{
|
|
ctcDcsStr = Conversions.ToString(Column亚音编码.Items[0]);
|
|
}
|
|
else
|
|
{
|
|
var a = (double) checked ((publicva.EEPROM_Byte[Address + 0] & 15) * 256 + publicva.EEPROM_Byte[Address + 1]);
|
|
if (num == 3)
|
|
{
|
|
var integer = Conversions.ToInteger(Conversion.Oct(checked ((long) Math.Round(a)) & 511L));
|
|
ctcDcsStr = (publicva.EEPROM_Byte[checked (Address + 0)] & (uint) publicva.Bit7) <= 0U ? "D" + string.Format("{0:D3}", integer) + "N" : "D" + string.Format("{0:D3}", integer) + "I";
|
|
}
|
|
else
|
|
ctcDcsStr = string.Format("{0:###.0}", a / 10.0);
|
|
}
|
|
if (!Column亚音编码.Items.Contains(ctcDcsStr))
|
|
{
|
|
Column亚音编码.Items.Add(ctcDcsStr);
|
|
if (!Column亚音解码.Items.Contains(ctcDcsStr))
|
|
Column亚音解码.Items.Add(ctcDcsStr);
|
|
}
|
|
return ctcDcsStr;
|
|
}
|
|
|
|
public void Set_CTC_DCS_Data(int Address, string ToneStr, int ToneMode)
|
|
{
|
|
if (!Column亚音编码.Items.Contains(ToneStr))
|
|
{
|
|
Column亚音编码.Items.Add(ToneStr);
|
|
if (!Column亚音解码.Items.Contains(ToneStr))
|
|
Column亚音解码.Items.Add(ToneStr);
|
|
}
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) (publicva.EEPROM_Byte[Address + 0] & unchecked ((byte) ~(publicva.Bit4 | publicva.Bit5)) | ToneMode << 4));
|
|
switch (ToneMode)
|
|
{
|
|
case 0:
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) (publicva.EEPROM_Byte[Address + 0] & 240));
|
|
publicva.EEPROM_Byte[checked (Address + 1)] = checked ((byte) (publicva.EEPROM_Byte[Address + 1] & 0));
|
|
break;
|
|
case 3:
|
|
var a1 = Conversions.ToDouble("&H" + Conversion.Hex("&O" + Conversions.ToString(Conversions.ToDouble(ToneStr.Substring(1, 3)))));
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) (publicva.EEPROM_Byte[Address + 0] & 240 | ((long) Math.Round(a1) & 3840L) >> 8));
|
|
publicva.EEPROM_Byte[checked (Address + 1)] = checked ((byte) ((long) Math.Round(a1) & byte.MaxValue));
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = Operators.CompareString("I", ToneStr.Substring(4, 1), false) != 0 ? (byte) (publicva.EEPROM_Byte[checked (Address + 0)] & ~publicva.Bit7) : (byte) (publicva.EEPROM_Byte[checked (Address + 0)] | publicva.Bit7);
|
|
break;
|
|
default:
|
|
double num;
|
|
try
|
|
{
|
|
num = Conversions.ToDouble(ToneStr);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ProjectData.SetProjectError(ex);
|
|
num = 67.0;
|
|
ProjectData.ClearProjectError();
|
|
}
|
|
var a2 = num * 10.0;
|
|
publicva.EEPROM_Byte[checked (Address + 0)] = checked ((byte) (publicva.EEPROM_Byte[Address + 0] & 240 | ((long) Math.Round(a2) & 3840L) >> 8));
|
|
publicva.EEPROM_Byte[checked (Address + 1)] = checked ((byte) ((long) Math.Round(a2) & byte.MaxValue));
|
|
break;
|
|
}
|
|
}
|
|
|
|
public object Get_RxFreqStr(int Address, int FreqRangID, int CHStepIndex)
|
|
{
|
|
var numArray = new double[3]
|
|
{
|
|
5000.0,
|
|
6250.0,
|
|
2500.0
|
|
};
|
|
var num1 = checked (publicva.EEPROM_Byte[Address + 0] * 65536) + (double) checked (publicva.EEPROM_Byte[Address + 1] * 256) + checked (publicva.EEPROM_Byte[Address + 2] * 1);
|
|
if (CHStepIndex > 2)
|
|
CHStepIndex = 0;
|
|
var num2 = (double) (checked ((long) Math.Round(unchecked (num1 * numArray[CHStepIndex]))) / 10L);
|
|
return !(publicva.RxFreqRang[FreqRangID, 1] >= num2 & num2 >= publicva.RxFreqRang[FreqRangID, 0]) ? "" : (object) string.Format("{0:#00.00000}", num2 / 100000.0);
|
|
}
|
|
|
|
public object Get_TxFreqStr(int Address, int FreqRangID, int CHStepIndex)
|
|
{
|
|
var numArray = new double[3]
|
|
{
|
|
5000.0,
|
|
6250.0,
|
|
2500.0
|
|
};
|
|
var num = (double) (checked ((long) Math.Round(unchecked (checked (publicva.EEPROM_Byte[Address + 0] * 65536) + (double) checked (publicva.EEPROM_Byte[Address + 1] * 256) + checked (publicva.EEPROM_Byte[Address + 2] * 1) * numArray[CHStepIndex]))) / 10L);
|
|
return !(checked (publicva.RxFreqRang[FreqRangID, 1] - publicva.RxFreqRang[FreqRangID, 0]) >= num & num >= 0.0) ? "" : (object) string.Format("{0:##0.00000}", num / 100000.0);
|
|
}
|
|
|
|
public void Set_FreqData(int Address, string FreqStr)
|
|
{
|
|
var 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();
|
|
}
|
|
var integer = Conversions.ToInteger(Get_FreqStepFlag(Freq));
|
|
var 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) & byte.MaxValue) >> 0));
|
|
}
|
|
|
|
public object Get_FreqStepFlag(double Freq)
|
|
{
|
|
var num = checked ((uint) Math.Round(unchecked (Freq * 1000000.0)));
|
|
if (num % 5000L == 0L)
|
|
return 0;
|
|
if (num % 6250L == 0L)
|
|
return 1;
|
|
return num % 2500L == 0L ? 2 : (object) 0;
|
|
}
|
|
|
|
public object Get_FreqRangID(double Freq)
|
|
{
|
|
var numArray = new byte[7]
|
|
{
|
|
publicva.Bit0,
|
|
publicva.Bit1,
|
|
publicva.Bit2,
|
|
publicva.Bit3,
|
|
publicva.Bit4,
|
|
publicva.Bit5,
|
|
publicva.Bit6
|
|
};
|
|
var 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]) || (publicva.EEPROM_Byte[12] & (uint) numArray[checked ((int) freqRangId)]) > 0U)
|
|
{
|
|
checked { ++freqRangId; }
|
|
if (freqRangId > 6U)
|
|
return -1;
|
|
}
|
|
return freqRangId;
|
|
}
|
|
|
|
public object JudgeInputRxFreq(string StrFreq, bool msg)
|
|
{
|
|
string str;
|
|
try
|
|
{
|
|
var Freq = Conversions.ToDouble(StrFreq);
|
|
if (Conversions.ToInteger(Get_FreqRangID(Freq)) != -1)
|
|
{
|
|
var num1 = checked ((uint) Math.Round(unchecked (Freq * 1000000.0)));
|
|
if (num1 % 6250L != 0L && num1 % 5000L != 0L && num1 % 2500L != 0L)
|
|
{
|
|
var num2 = checked ((int) unchecked (num1 / 5000L));
|
|
if (num1 % 5000L > 10000L)
|
|
checked { ++num2; }
|
|
num1 = checked ((uint) (num2 * 5000));
|
|
}
|
|
str = string.Format("{0:#00.00000}", 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 str;
|
|
}
|
|
|
|
public object JudgeInputTxFreq(string RxFreq, string StrFreq, bool msg)
|
|
{
|
|
string str;
|
|
try
|
|
{
|
|
var Freq = Conversions.ToDouble(RxFreq);
|
|
var num1 = Conversions.ToDouble(StrFreq);
|
|
var integer = Conversions.ToInteger(Get_FreqRangID(Freq));
|
|
if (integer != -1)
|
|
{
|
|
var num2 = checked (publicva.RxFreqRang[integer, 1] - publicva.RxFreqRang[integer, 0]);
|
|
uint num3 = 0;
|
|
var num4 = checked ((uint) Math.Round(unchecked (num1 * 100000.0)));
|
|
if (num2 >= num4 & num4 >= num3)
|
|
{
|
|
if (num4 % 625L != 0L && num4 % 500L != 0L && num4 % 250L != 0L)
|
|
{
|
|
var num5 = checked ((int) unchecked (num4 / 500L));
|
|
if (num4 % 500L > 1000L)
|
|
checked { ++num5; }
|
|
num4 = checked ((uint) (num5 * 500));
|
|
}
|
|
str = string.Format("{0:##0.00000}", 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 str;
|
|
}
|
|
|
|
public void Msgbox_Msg(string Zh_Msg, string En_Msg)
|
|
{
|
|
if (Operators.CompareString(publicva.Language, "zh-CN", false) == 0)
|
|
{
|
|
var num1 = (int) Interaction.MsgBox(Zh_Msg, MsgBoxStyle.Exclamation, publicva.TypeName);
|
|
}
|
|
else
|
|
{
|
|
var num2 = (int) Interaction.MsgBox(En_Msg, MsgBoxStyle.Exclamation, publicva.TypeName);
|
|
}
|
|
}
|
|
|
|
public void CHStatusList_Write(int CHNo, string COM, int Address)
|
|
{
|
|
var numArray = new byte[8]
|
|
{
|
|
1,
|
|
2,
|
|
4,
|
|
8,
|
|
16,
|
|
32,
|
|
64,
|
|
128
|
|
};
|
|
checked { Address += CHNo >> 3; }
|
|
if (Operators.CompareString(COM, "添加", false) == 0)
|
|
{
|
|
publicva.EEPROM_Byte[Address] = (byte) (publicva.EEPROM_Byte[Address] & ~numArray[CHNo & 7]);
|
|
}
|
|
else
|
|
{
|
|
if (Operators.CompareString(COM, "删除", false) != 0)
|
|
return;
|
|
publicva.EEPROM_Byte[Address] = (byte) (publicva.EEPROM_Byte[Address] | numArray[CHNo & 7]);
|
|
}
|
|
}
|
|
|
|
public bool CHStatus_Read(int CHNo, int Address)
|
|
{
|
|
var numArray = new byte[8]
|
|
{
|
|
1,
|
|
2,
|
|
4,
|
|
8,
|
|
16,
|
|
32,
|
|
64,
|
|
128
|
|
};
|
|
checked { Address += CHNo >> 3; }
|
|
return (publicva.EEPROM_Byte[Address] & (uint) numArray[CHNo & 7]) <= 0U;
|
|
}
|
|
|
|
public object Get_CHAddress(int i)
|
|
{
|
|
return 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 = "";
|
|
ChannelMsgDataGridView["Column差频方向", i].Value = "";
|
|
ChannelMsgDataGridView["ColumnTxFreq", i].Value = "";
|
|
ChannelMsgDataGridView["Column亚音解码类型", i].Value = "";
|
|
ChannelMsgDataGridView["Column亚音解码", i].Value = "";
|
|
ChannelMsgDataGridView["Column亚音编码类型", i].Value = "";
|
|
ChannelMsgDataGridView["Column亚音编码", i].Value = "";
|
|
ChannelMsgDataGridView["Column发射功率", i].Value = "";
|
|
ChannelMsgDataGridView["Column扫描添加", i].Value = "";
|
|
ChannelMsgDataGridView["Column带宽", i].Value = "";
|
|
ChannelMsgDataGridView["Column可选信令", i].Value = "";
|
|
}
|
|
}
|
|
|
|
public void Init_Channel(string Freq, int i)
|
|
{
|
|
ChannelMsgDataGridView["ColumnRxFreq", i].Value = Freq;
|
|
ChannelMsgDataGridView["Column差频方向", i].Value = RuntimeHelpers.GetObjectValue(Column差频方向.Items[0]);
|
|
ChannelMsgDataGridView["ColumnTxFreq", i].Value = Conversions.ToDouble(Freq) <= 300.0 ? "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]);
|
|
var integer = Conversions.ToInteger(Get_CHAddress(i));
|
|
publicva.EEPROM_Byte[checked (integer + 6)] = 6;
|
|
publicva.EEPROM_Byte[checked (integer + 9)] = (byte) (publicva.EEPROM_Byte[checked (integer + 9)] | publicva.Bit6);
|
|
publicva.EEPROM_Byte[checked (integer + 11)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 12)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 13)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 14)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 15)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 16)] = 1;
|
|
publicva.EEPROM_Byte[checked (integer + 17)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 18)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 19)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 20)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 21)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 22)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 23)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 24)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 25)] = 0;
|
|
publicva.EEPROM_Byte[checked (integer + 26)] = 45;
|
|
publicva.EEPROM_Byte[checked (integer + 27)] = 45;
|
|
publicva.EEPROM_Byte[checked (integer + 28)] = 45;
|
|
publicva.EEPROM_Byte[checked (integer + 29)] = 45;
|
|
publicva.EEPROM_Byte[checked (integer + 30)] = 45;
|
|
publicva.EEPROM_Byte[checked (integer + 31)] = 45;
|
|
}
|
|
|
|
private void Button1_Click(object sender, EventArgs e) => Close();
|
|
}
|
|
}
|