1385 lines
45 KiB
C#
1385 lines
45 KiB
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.ComponentModel;
|
||
|
|
using System.Data;
|
||
|
|
using System.Drawing;
|
||
|
|
using System.Threading;
|
||
|
|
using System.Windows.Forms;
|
||
|
|
|
||
|
|
namespace LP;
|
||
|
|
|
||
|
|
public class Form_PuTongJiSuan : Form
|
||
|
|
{
|
||
|
|
private delegate void delegateFormSetTitle(Form form, string value);
|
||
|
|
|
||
|
|
private delegate void delegateComboBoxItemsClear(ComboBox comboBox);
|
||
|
|
|
||
|
|
private delegate void delegateComboBoxAdd(ComboBox comboBox, string value);
|
||
|
|
|
||
|
|
private delegate void delegateComboBoxSetSelectedIndex(ComboBox comboBox, int value);
|
||
|
|
|
||
|
|
private delegate void delegateListBoxItemsClear(ListBox listBox);
|
||
|
|
|
||
|
|
private delegate void delegateListBoxAdd(ListBox listBox, string value);
|
||
|
|
|
||
|
|
private delegate void delegateListBoxSelectedIndex(ListBox listBox, int value);
|
||
|
|
|
||
|
|
private delegate void delegateTextBoxSetText(TextBox textBox, string value);
|
||
|
|
|
||
|
|
private delegate void delegateButtonEnabled(Button button, bool value);
|
||
|
|
|
||
|
|
private delegate void delegateFormHide(Form form);
|
||
|
|
|
||
|
|
public FormDesktop desktop = null;
|
||
|
|
|
||
|
|
private bool mAfterInit = false;
|
||
|
|
|
||
|
|
private bool mLeaving = false;
|
||
|
|
|
||
|
|
public string mTitle = "";
|
||
|
|
|
||
|
|
public List<ListBox> mListBoxes = null;
|
||
|
|
|
||
|
|
public XianLuData mXianLuData = null;
|
||
|
|
|
||
|
|
private int mXianLuID = 0;
|
||
|
|
|
||
|
|
public string mNameXianLu = "";
|
||
|
|
|
||
|
|
public int mIndexControl_XianLuName = -1;
|
||
|
|
|
||
|
|
public int mIndex_ListXianLuData = -1;
|
||
|
|
|
||
|
|
private bool mReady_XianLuName = false;
|
||
|
|
|
||
|
|
public TaskData mTaskData = null;
|
||
|
|
|
||
|
|
public string mNameTask = "";
|
||
|
|
|
||
|
|
private bool mReady_TaskName = false;
|
||
|
|
|
||
|
|
public int mIndexControl_FanJi_NaiLeiShuiPing = -1;
|
||
|
|
|
||
|
|
public string mFanJi_NaiLeiShuiPing = "";
|
||
|
|
|
||
|
|
public int mIndexControl_RaoJi_NaiLeiShuiPing = -1;
|
||
|
|
|
||
|
|
public string mRaoJi_NaiLeiShuiPing = "";
|
||
|
|
|
||
|
|
public int mIndexControl_FanJi_TZL = -1;
|
||
|
|
|
||
|
|
public string mFanJi_TZL = "";
|
||
|
|
|
||
|
|
public int mIndexControl_RaoJi_TZL = -1;
|
||
|
|
|
||
|
|
public string mRaoJi_TZL = "";
|
||
|
|
|
||
|
|
private float initWidth = 0f;
|
||
|
|
|
||
|
|
private float initHeight = 0f;
|
||
|
|
|
||
|
|
private bool mBusy_ButtonOK = false;
|
||
|
|
|
||
|
|
public DataGridView mDGView = null;
|
||
|
|
|
||
|
|
public DataSet mDS = null;
|
||
|
|
|
||
|
|
public List<string> mList_GanTaID_2DisInclude_Checked_ByUser = null;
|
||
|
|
|
||
|
|
private bool mCurrentSelect = false;
|
||
|
|
|
||
|
|
public string mMainKeyColumnName = "";
|
||
|
|
|
||
|
|
public bool mBool_GuiChengFa = false;
|
||
|
|
|
||
|
|
private IContainer components = null;
|
||
|
|
|
||
|
|
private Button buttonCancel;
|
||
|
|
|
||
|
|
private Button buttonOK;
|
||
|
|
|
||
|
|
private ComboBox comboBox_XianLuName;
|
||
|
|
|
||
|
|
private Label label1;
|
||
|
|
|
||
|
|
private Label label3;
|
||
|
|
|
||
|
|
private TextBox textBox_NameTask;
|
||
|
|
|
||
|
|
private Label label4;
|
||
|
|
|
||
|
|
private ComboBox comboBox_FanJi_NaiLeiShuiPing;
|
||
|
|
|
||
|
|
private Label label5;
|
||
|
|
|
||
|
|
private ComboBox comboBox_RaoJi_NaiLeiShuiPing;
|
||
|
|
|
||
|
|
private Label label2;
|
||
|
|
|
||
|
|
private Label label6;
|
||
|
|
|
||
|
|
private ComboBox comboBox_FanJi_TZL;
|
||
|
|
|
||
|
|
private ComboBox comboBox_RaoJi_TZL;
|
||
|
|
|
||
|
|
private Button buttonGaoJiSheZhi;
|
||
|
|
|
||
|
|
private DataGridView dataGridView_GanTa;
|
||
|
|
|
||
|
|
private Button buttonSelectAll;
|
||
|
|
|
||
|
|
public bool Ready_XianLuName
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
return mReady_XianLuName;
|
||
|
|
}
|
||
|
|
set
|
||
|
|
{
|
||
|
|
mReady_XianLuName = value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public bool Ready_TaskName
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
return mReady_TaskName;
|
||
|
|
}
|
||
|
|
set
|
||
|
|
{
|
||
|
|
mReady_TaskName = value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public bool Busy_ButtonOK
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
return mBusy_ButtonOK;
|
||
|
|
}
|
||
|
|
set
|
||
|
|
{
|
||
|
|
mBusy_ButtonOK = value;
|
||
|
|
if (!mLeaving)
|
||
|
|
{
|
||
|
|
MyButtonEnabled(buttonCancel, !value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public Form_PuTongJiSuan()
|
||
|
|
{
|
||
|
|
InitializeComponent();
|
||
|
|
if (mTaskData == null)
|
||
|
|
{
|
||
|
|
mTaskData = new TaskData();
|
||
|
|
}
|
||
|
|
if (mXianLuData == null)
|
||
|
|
{
|
||
|
|
mXianLuData = new XianLuData();
|
||
|
|
}
|
||
|
|
mTitle = "普通计算";
|
||
|
|
mIndexControl_XianLuName = -1;
|
||
|
|
mIndex_ListXianLuData = -1;
|
||
|
|
mIndexControl_FanJi_NaiLeiShuiPing = (mIndexControl_FanJi_TZL = -1);
|
||
|
|
mIndexControl_RaoJi_NaiLeiShuiPing = (mIndexControl_RaoJi_TZL = -1);
|
||
|
|
if (mListBoxes == null)
|
||
|
|
{
|
||
|
|
mListBoxes = new List<ListBox>();
|
||
|
|
}
|
||
|
|
mListBoxes.Clear();
|
||
|
|
if (mList_GanTaID_2DisInclude_Checked_ByUser == null)
|
||
|
|
{
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser = new List<string>();
|
||
|
|
}
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Clear();
|
||
|
|
if (mDS == null)
|
||
|
|
{
|
||
|
|
mDS = new DataSet();
|
||
|
|
}
|
||
|
|
mMainKeyColumnName = "塔号";
|
||
|
|
mIndexControl_FanJi_NaiLeiShuiPing = 1;
|
||
|
|
mFanJi_NaiLeiShuiPing = "ATP";
|
||
|
|
mIndexControl_RaoJi_NaiLeiShuiPing = 1;
|
||
|
|
mRaoJi_NaiLeiShuiPing = "ATP";
|
||
|
|
mIndexControl_FanJi_TZL = 1;
|
||
|
|
mFanJi_TZL = "规程";
|
||
|
|
mIndexControl_RaoJi_TZL = 2;
|
||
|
|
mRaoJi_TZL = "EGM";
|
||
|
|
}
|
||
|
|
|
||
|
|
private void Form_PuTongJiSuan_Load(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
mAfterInit = false;
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
mLeaving = false;
|
||
|
|
MyFormSetTitle(this, "");
|
||
|
|
Ready_XianLuName = false;
|
||
|
|
Ready_TaskName = false;
|
||
|
|
base.DialogResult = DialogResult.None;
|
||
|
|
if (mDGView == null)
|
||
|
|
{
|
||
|
|
mDGView = dataGridView_GanTa;
|
||
|
|
}
|
||
|
|
mDGView.Columns.Clear();
|
||
|
|
mDGView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||
|
|
initWidth = base.Width;
|
||
|
|
initHeight = base.Height;
|
||
|
|
setTag(this);
|
||
|
|
MyInput_TaskData();
|
||
|
|
MyInput_List_XianLuData();
|
||
|
|
mListBoxes.Clear();
|
||
|
|
mAfterInit = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
private void Form_PuTongJiSuan_FormClosing(object sender, FormClosingEventArgs e)
|
||
|
|
{
|
||
|
|
mDGView.DataSource = null;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyInput_TaskData()
|
||
|
|
{
|
||
|
|
mTaskData.copyFrom_TaskData(desktop.mDlg_FangLeiJiSuan.mtData);
|
||
|
|
mTaskData.mIndex_DuoXiangNaiLeiShuiPing = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyOutput_TaskData()
|
||
|
|
{
|
||
|
|
desktop.mDlg_FangLeiJiSuan.mtData.copyFrom_TaskData(mTaskData);
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyInput_List_XianLuData()
|
||
|
|
{
|
||
|
|
MyComboBoxItemsClear(comboBox_FanJi_NaiLeiShuiPing);
|
||
|
|
MyComboBoxAdd(comboBox_FanJi_NaiLeiShuiPing, "规程");
|
||
|
|
MyComboBoxAdd(comboBox_FanJi_NaiLeiShuiPing, "ATP");
|
||
|
|
if (mIndexControl_FanJi_NaiLeiShuiPing < 0)
|
||
|
|
{
|
||
|
|
mIndexControl_FanJi_NaiLeiShuiPing = 0;
|
||
|
|
}
|
||
|
|
if (mIndexControl_FanJi_NaiLeiShuiPing >= 0 && mIndexControl_FanJi_NaiLeiShuiPing < comboBox_FanJi_NaiLeiShuiPing.Items.Count)
|
||
|
|
{
|
||
|
|
MyComboBoxSetSelectedIndex(comboBox_FanJi_NaiLeiShuiPing, mIndexControl_FanJi_NaiLeiShuiPing);
|
||
|
|
mFanJi_NaiLeiShuiPing = comboBox_FanJi_NaiLeiShuiPing.SelectedItem.ToString();
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
mFanJi_NaiLeiShuiPing = "";
|
||
|
|
}
|
||
|
|
MyComboBoxItemsClear(comboBox_RaoJi_NaiLeiShuiPing);
|
||
|
|
MyComboBoxAdd(comboBox_RaoJi_NaiLeiShuiPing, "规程");
|
||
|
|
MyComboBoxAdd(comboBox_RaoJi_NaiLeiShuiPing, "ATP");
|
||
|
|
if (mIndexControl_RaoJi_NaiLeiShuiPing < 0)
|
||
|
|
{
|
||
|
|
mIndexControl_RaoJi_NaiLeiShuiPing = 0;
|
||
|
|
}
|
||
|
|
if (mIndexControl_RaoJi_NaiLeiShuiPing >= 0 && mIndexControl_RaoJi_NaiLeiShuiPing < comboBox_RaoJi_NaiLeiShuiPing.Items.Count)
|
||
|
|
{
|
||
|
|
MyComboBoxSetSelectedIndex(comboBox_RaoJi_NaiLeiShuiPing, mIndexControl_RaoJi_NaiLeiShuiPing);
|
||
|
|
mRaoJi_NaiLeiShuiPing = comboBox_RaoJi_NaiLeiShuiPing.SelectedItem.ToString();
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
mRaoJi_NaiLeiShuiPing = "";
|
||
|
|
}
|
||
|
|
MyComboBoxItemsClear(comboBox_FanJi_TZL);
|
||
|
|
MyComboBoxAdd(comboBox_FanJi_TZL, "无");
|
||
|
|
MyComboBoxAdd(comboBox_FanJi_TZL, "规程");
|
||
|
|
if (mIndexControl_FanJi_TZL < 0)
|
||
|
|
{
|
||
|
|
mIndexControl_FanJi_TZL = 0;
|
||
|
|
}
|
||
|
|
if (mIndexControl_FanJi_TZL >= 0 && mIndexControl_FanJi_TZL < comboBox_FanJi_TZL.Items.Count)
|
||
|
|
{
|
||
|
|
MyComboBoxSetSelectedIndex(comboBox_FanJi_TZL, mIndexControl_FanJi_TZL);
|
||
|
|
mFanJi_TZL = comboBox_FanJi_TZL.SelectedItem.ToString();
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
mFanJi_TZL = "";
|
||
|
|
}
|
||
|
|
MyComboBoxItemsClear(comboBox_RaoJi_TZL);
|
||
|
|
MyComboBoxAdd(comboBox_RaoJi_TZL, "无");
|
||
|
|
MyComboBoxAdd(comboBox_RaoJi_TZL, "规程");
|
||
|
|
MyComboBoxAdd(comboBox_RaoJi_TZL, "EGM");
|
||
|
|
if (mIndexControl_RaoJi_TZL < 0)
|
||
|
|
{
|
||
|
|
mIndexControl_RaoJi_TZL = 0;
|
||
|
|
}
|
||
|
|
if (mIndexControl_RaoJi_TZL >= 0 && mIndexControl_RaoJi_TZL < comboBox_RaoJi_TZL.Items.Count)
|
||
|
|
{
|
||
|
|
MyComboBoxSetSelectedIndex(comboBox_RaoJi_TZL, mIndexControl_RaoJi_TZL);
|
||
|
|
mRaoJi_TZL = comboBox_RaoJi_TZL.SelectedItem.ToString();
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
mRaoJi_TZL = "";
|
||
|
|
}
|
||
|
|
string text = "";
|
||
|
|
text = mFanJi_NaiLeiShuiPing + mFanJi_TZL + mRaoJi_NaiLeiShuiPing + mRaoJi_TZL;
|
||
|
|
mBool_GuiChengFa = text.IndexOf("规程") >= 0;
|
||
|
|
MyComboBoxItemsClear(comboBox_XianLuName);
|
||
|
|
if (desktop.mXL == null || desktop.mXL.mListXianLuData == null)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
for (int i = 0; i < desktop.mXL.mListXianLuData.Count; i++)
|
||
|
|
{
|
||
|
|
MyComboBoxAdd(comboBox_XianLuName, desktop.mXL.mListXianLuData[i].mName_XianLu);
|
||
|
|
}
|
||
|
|
if (mIndexControl_XianLuName < 0)
|
||
|
|
{
|
||
|
|
mIndexControl_XianLuName = 0;
|
||
|
|
}
|
||
|
|
if (mIndexControl_XianLuName >= 0 && mIndexControl_XianLuName < comboBox_XianLuName.Items.Count)
|
||
|
|
{
|
||
|
|
MyComboBoxSetSelectedIndex(comboBox_XianLuName, mIndexControl_XianLuName);
|
||
|
|
mNameXianLu = comboBox_XianLuName.SelectedItem.ToString().Trim();
|
||
|
|
for (int j = 0; j < desktop.mXL.mListXianLuData.Count; j++)
|
||
|
|
{
|
||
|
|
if (mNameXianLu.Equals(desktop.mXL.mListXianLuData[j].mName_XianLu))
|
||
|
|
{
|
||
|
|
mIndex_ListXianLuData = j;
|
||
|
|
GetDataSet();
|
||
|
|
MyQuery_refreshDGV();
|
||
|
|
mXianLuData.CopyFrom_XianLuData(desktop.mXL.mListXianLuData[j]);
|
||
|
|
mXianLuID = mXianLuData.mID_XianLu;
|
||
|
|
Ready_XianLuName = true;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
mNameXianLu = "";
|
||
|
|
mXianLuID = 0;
|
||
|
|
Ready_XianLuName = false;
|
||
|
|
}
|
||
|
|
mNameTask = textBox_NameTask.Text.Trim();
|
||
|
|
Ready_TaskName = desktop.mTask.MyCheckTaskName(mNameTask) == 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void Destroy()
|
||
|
|
{
|
||
|
|
if (mListBoxes != null)
|
||
|
|
{
|
||
|
|
mListBoxes.Clear();
|
||
|
|
}
|
||
|
|
mListBoxes = null;
|
||
|
|
if (mTaskData != null)
|
||
|
|
{
|
||
|
|
mTaskData.Destroy();
|
||
|
|
}
|
||
|
|
mTaskData = null;
|
||
|
|
if (mXianLuData != null)
|
||
|
|
{
|
||
|
|
mXianLuData.Destroy();
|
||
|
|
}
|
||
|
|
mXianLuData = null;
|
||
|
|
if (mList_GanTaID_2DisInclude_Checked_ByUser != null)
|
||
|
|
{
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Clear();
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser = null;
|
||
|
|
}
|
||
|
|
if (mDS != null)
|
||
|
|
{
|
||
|
|
mDS.Clear();
|
||
|
|
mDS = null;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void setTag(Control cons)
|
||
|
|
{
|
||
|
|
foreach (Control control in cons.Controls)
|
||
|
|
{
|
||
|
|
control.Tag = control.Width + ":" + control.Height + ":" + control.Left + ":" + control.Top + ":" + control.Font.Size;
|
||
|
|
if (control.Controls.Count > 0)
|
||
|
|
{
|
||
|
|
setTag(control);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void setControls(float scaleX, float scaleY, Control cons)
|
||
|
|
{
|
||
|
|
foreach (Control control in cons.Controls)
|
||
|
|
{
|
||
|
|
string[] array = control.Tag.ToString().Split(':');
|
||
|
|
float num = Convert.ToSingle(array[0]) * scaleX;
|
||
|
|
control.Width = (int)num;
|
||
|
|
num = Convert.ToSingle(array[1]) * scaleY;
|
||
|
|
if (control is ListBox)
|
||
|
|
{
|
||
|
|
num = Convert.ToSingle(array[1]) * 1f;
|
||
|
|
}
|
||
|
|
control.Height = (int)num;
|
||
|
|
num = Convert.ToSingle(array[2]) * scaleX;
|
||
|
|
control.Left = (int)num;
|
||
|
|
num = Convert.ToSingle(array[3]) * scaleY;
|
||
|
|
control.Top = (int)num;
|
||
|
|
float emSize = Convert.ToSingle(array[4]) * Math.Min(scaleX, scaleY);
|
||
|
|
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
|
||
|
|
if (control.Controls.Count > 0)
|
||
|
|
{
|
||
|
|
setControls(scaleX, scaleY, control);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void Form_PuTongJiSuan_Resize(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
float scaleX = (float)base.Width / initWidth;
|
||
|
|
float scaleY = (float)base.Height / initHeight;
|
||
|
|
setControls(scaleX, scaleY, this);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void buttonOK_Click(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "");
|
||
|
|
if (Busy_ButtonOK)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
Busy_ButtonOK = true;
|
||
|
|
if (!Ready_XianLuName)
|
||
|
|
{
|
||
|
|
if (comboBox_XianLuName.Items.Count > 0)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择线路,然后点击按钮“" + buttonOK.Text + "”。");
|
||
|
|
}
|
||
|
|
if (comboBox_XianLuName.Items.Count == 0)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "缺少线路数据。 请点击按钮“" + buttonCancel.Text + "”,退出对话框。");
|
||
|
|
}
|
||
|
|
comboBox_XianLuName.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
string text = "";
|
||
|
|
text = mXianLuData.Prepare_Complete(desktop.mSignal.mNeed_PrepareParameters_setting);
|
||
|
|
if (!text.Equals("OK"))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "!" + text + "!");
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (!Ready_TaskName)
|
||
|
|
{
|
||
|
|
switch (desktop.mTask.MyCheckTaskName(textBox_NameTask.Text.Trim()))
|
||
|
|
{
|
||
|
|
case 1:
|
||
|
|
MyFormSetTitle(this, "任务名称空白,请填写“任务名称”。");
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
MyFormSetTitle(this, "任务名称重复,请重新填写“任务名称”。");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
textBox_NameTask.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mFanJi_NaiLeiShuiPing))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择反击耐雷水平计算方法,然后点击“" + buttonOK.Text + "”。");
|
||
|
|
comboBox_FanJi_NaiLeiShuiPing.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mRaoJi_NaiLeiShuiPing))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择绕击耐雷水平计算方法,然后点击“" + buttonOK.Text + "”。");
|
||
|
|
comboBox_RaoJi_NaiLeiShuiPing.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mFanJi_TZL))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择反击跳闸率计算方法,然后点击“" + buttonOK.Text + "”。");
|
||
|
|
comboBox_FanJi_TZL.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mRaoJi_TZL))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择绕击跳闸率计算方法,然后点击“" + buttonOK.Text + "”。");
|
||
|
|
comboBox_RaoJi_TZL.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Clear();
|
||
|
|
DataGridViewCheckBoxCell dataGridViewCheckBoxCell = null;
|
||
|
|
string text2 = "";
|
||
|
|
for (int i = 0; i < mDGView.Rows.Count; i++)
|
||
|
|
{
|
||
|
|
if (mDGView.Rows[i] != null && mDGView.Rows[i].Cells != null && mDGView.Rows[i].Cells["塔号"] != null && mDGView.Rows[i].Cells["塔号"].Value != null)
|
||
|
|
{
|
||
|
|
dataGridViewCheckBoxCell = (DataGridViewCheckBoxCell)mDGView.Rows[i].Cells["包含"];
|
||
|
|
if (dataGridViewCheckBoxCell != null && dataGridViewCheckBoxCell.Value != null && (bool)dataGridViewCheckBoxCell.Value)
|
||
|
|
{
|
||
|
|
text2 = mDGView.Rows[i].Cells["塔号"].Value.ToString().Trim();
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Add(text2);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (mList_GanTaID_2DisInclude_Checked_ByUser.Count == 0)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "包含杆塔为空,请选择计算“包含”杆塔,然后点击“" + buttonOK.Text + "”。");
|
||
|
|
dataGridView_GanTa.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
Thread thread = new Thread(MyThread_ButtonOK);
|
||
|
|
thread.Start();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void MyRefresh_TaskData()
|
||
|
|
{
|
||
|
|
mTaskData.mID_Task = TaskData.mNextID_static;
|
||
|
|
mTaskData.mID_string_Task = $"{mTaskData.mID_Task}|{mTaskData.mID_ExTask}";
|
||
|
|
mTaskData.mIndex_DuoXiangNaiLeiShuiPing = 0;
|
||
|
|
mTaskData.mTypeCode_Task = 1;
|
||
|
|
mTaskData.mIndex_CurrentCurve = 1;
|
||
|
|
mTaskData.mName_Task = mNameTask;
|
||
|
|
mTaskData.mXianLuID_Task = mXianLuData.mID_XianLu;
|
||
|
|
mTaskData.mXianLuName_Task = mXianLuData.mName_XianLu;
|
||
|
|
mTaskData.mXianLuJLZL_Task = mXianLuData.mJLZL_XianLu;
|
||
|
|
mTaskData.mCurveTimeHead_min = 2.6;
|
||
|
|
mTaskData.mCurveTimeHead_max = 2.6;
|
||
|
|
mTaskData.mCurveTimeHead = 2.6;
|
||
|
|
mTaskData.mCurveTimeHead_step = 0.1;
|
||
|
|
mTaskData.mCurveTimeTail_min = 50.0;
|
||
|
|
mTaskData.mCurveTimeTail_max = 50.0;
|
||
|
|
mTaskData.mCurveTimeTail = 50.0;
|
||
|
|
mTaskData.mCurveTimeTail_step = 1.0;
|
||
|
|
mTaskData.mDYDJ_Task = mXianLuData.mDYDJ_XianLu;
|
||
|
|
mTaskData.mFanJi_NaiLeiShuiPing = mFanJi_NaiLeiShuiPing;
|
||
|
|
mTaskData.mRaoJi_NaiLeiShuiPing = mRaoJi_NaiLeiShuiPing;
|
||
|
|
mTaskData.mFanJi_TZL = mFanJi_TZL;
|
||
|
|
mTaskData.mRaoJi_TZL = mRaoJi_TZL;
|
||
|
|
mTaskData.mPrepare11_LightingCurrent = mXianLuData.mPrepare1_LightingCurrent;
|
||
|
|
mTaskData.mPrepare12_DiShanMiDu = mXianLuData.mPrepare2_DiShanMiDu;
|
||
|
|
mTaskData.mPrepare13_DiMianQingJiao = mXianLuData.mPrepare3_DiMianQingJiao;
|
||
|
|
mTaskData.Finished1_PuTongJiSuan = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
private void MyThread_ButtonOK()
|
||
|
|
{
|
||
|
|
MyRefresh_TaskData();
|
||
|
|
mLeaving = true;
|
||
|
|
int num = 0;
|
||
|
|
bool flag = false;
|
||
|
|
for (int i = 0; i < desktop.mTask.mListDetails.Count; i++)
|
||
|
|
{
|
||
|
|
if (mTaskData.mID_Task == desktop.mTask.mListDetails[i].mTaskID_Detail)
|
||
|
|
{
|
||
|
|
num = i;
|
||
|
|
flag = true;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (!flag)
|
||
|
|
{
|
||
|
|
TaskDetail taskDetail = new TaskDetail();
|
||
|
|
taskDetail.mTaskID_Detail = mTaskData.mID_Task;
|
||
|
|
taskDetail.mXianLuID_Detail = mTaskData.mXianLuID_Task;
|
||
|
|
num = desktop.mTask.mListDetails.Count;
|
||
|
|
desktop.mTask.mListDetails.Add(taskDetail);
|
||
|
|
desktop.mTask.mListDetails[num].mTaskGroup.mID_Task = mTaskData.mID_Task;
|
||
|
|
desktop.mTask.mListDetails[num].mTaskData.mID_Task = mTaskData.mID_Task;
|
||
|
|
}
|
||
|
|
else if (flag)
|
||
|
|
{
|
||
|
|
MyLog.AddLog($"MyThread_ButtonOK() Detail repeat(indexDetail={num}, mListDetails.Count={desktop.mTask.mListDetails.Count}).");
|
||
|
|
}
|
||
|
|
TaskData taskData = null;
|
||
|
|
for (double num2 = mTaskData.mCurveTimeHead_min; num2 <= mTaskData.mCurveTimeHead_max; num2 += mTaskData.mCurveTimeHead_step)
|
||
|
|
{
|
||
|
|
for (double num3 = mTaskData.mCurveTimeTail_min; num3 <= mTaskData.mCurveTimeTail_max; num3 += mTaskData.mCurveTimeTail_step)
|
||
|
|
{
|
||
|
|
taskData = new TaskData();
|
||
|
|
taskData.copyFrom_TaskData(mTaskData);
|
||
|
|
taskData.mCurveTimeHead = num2;
|
||
|
|
taskData.mCurveTimeTail = num3;
|
||
|
|
taskData.mTGanTas.SetXianLuData(mTaskData.mID_string_Task, mXianLuData);
|
||
|
|
taskData.mTGanTas.mListTGanTaData.Clear();
|
||
|
|
desktop.mTask.Add1_ExTaskData(num, taskData);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
GanTas ganTas = null;
|
||
|
|
for (int j = 0; j < desktop.mTask.mListDetails[num].mTaskGroup.mListExTaskData.Count; j++)
|
||
|
|
{
|
||
|
|
taskData = desktop.mTask.mListDetails[num].mTaskGroup.mListExTaskData[j];
|
||
|
|
for (int k = 0; k < desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count; k++)
|
||
|
|
{
|
||
|
|
ganTas = desktop.mXL.mListGanTas[mIndex_ListXianLuData];
|
||
|
|
if (mList_GanTaID_2DisInclude_Checked_ByUser.Contains(ganTas.mListGanTaData[k].mID_GanTa))
|
||
|
|
{
|
||
|
|
taskData.mTGanTas.Add1TGanTaData(ganTas.mListGanTaData[k], taskData.mIndex_CurrentCurve, taskData.mCurveTimeHead, taskData.mCurveTimeTail);
|
||
|
|
TGanTaData.mNextID_static++;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
MyOutput_TaskData();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
base.DialogResult = DialogResult.OK;
|
||
|
|
}
|
||
|
|
|
||
|
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "");
|
||
|
|
MyButtonEnabled(buttonCancel, value: false);
|
||
|
|
Thread thread = new Thread(MyCancel);
|
||
|
|
thread.Start();
|
||
|
|
}
|
||
|
|
|
||
|
|
private void MyCancel()
|
||
|
|
{
|
||
|
|
mLeaving = true;
|
||
|
|
MyFormSetTitle(this, "取消—");
|
||
|
|
MyFormSetTitle(this, "取消———");
|
||
|
|
MyButtonEnabled(buttonCancel, value: true);
|
||
|
|
try
|
||
|
|
{
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
base.DialogResult = DialogResult.Cancel;
|
||
|
|
MyFormHide(this);
|
||
|
|
}
|
||
|
|
catch (Exception)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void buttonSelectAll_Click(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
if (!mAfterInit)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Clear();
|
||
|
|
GanTas ganTas = desktop.mXL.mListGanTas[mIndex_ListXianLuData];
|
||
|
|
GanTaData ganTaData = null;
|
||
|
|
if (ganTas == null || ganTas.mListGanTaData == null)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
mCurrentSelect = !mCurrentSelect;
|
||
|
|
for (int i = 0; i < ganTas.mListGanTaData.Count; i++)
|
||
|
|
{
|
||
|
|
ganTaData = ganTas.mListGanTaData[i];
|
||
|
|
if (ganTaData != null && mCurrentSelect)
|
||
|
|
{
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Add(ganTaData.mID_GanTa);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
DataGridViewCheckBoxCell dataGridViewCheckBoxCell = null;
|
||
|
|
string text = "";
|
||
|
|
for (int j = 0; j < mDGView.Rows.Count; j++)
|
||
|
|
{
|
||
|
|
if (mDGView.Rows[j] != null && mDGView.Rows[j].Cells != null && mDGView.Rows[j].Cells["塔号"] != null && mDGView.Rows[j].Cells["塔号"].Value != null)
|
||
|
|
{
|
||
|
|
dataGridViewCheckBoxCell = (DataGridViewCheckBoxCell)mDGView.Rows[j].Cells["包含"];
|
||
|
|
text = mDGView.Rows[j].Cells["塔号"].Value.ToString().Trim();
|
||
|
|
dataGridViewCheckBoxCell.Value = mList_GanTaID_2DisInclude_Checked_ByUser.Contains(text);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
buttonSelectAll.Text = (mCurrentSelect ? "不选" : "全选");
|
||
|
|
}
|
||
|
|
|
||
|
|
private void buttonGaoJiSheZhi_Click(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "");
|
||
|
|
if (!Ready_XianLuName)
|
||
|
|
{
|
||
|
|
if (comboBox_XianLuName.Items.Count > 0)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择线路,然后点击按钮“" + buttonGaoJiSheZhi.Text + "”。");
|
||
|
|
}
|
||
|
|
if (comboBox_XianLuName.Items.Count == 0)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "缺少线路数据。 请点击按钮“" + buttonCancel.Text + "”,退出对话框。");
|
||
|
|
}
|
||
|
|
comboBox_XianLuName.Focus();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
string text = "";
|
||
|
|
text = mXianLuData.Prepare_Complete(desktop.mSignal.mNeed_PrepareParameters_setting);
|
||
|
|
if (!text.Equals("OK"))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "!" + text + "!");
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (!Ready_TaskName)
|
||
|
|
{
|
||
|
|
switch (desktop.mTask.MyCheckTaskName(textBox_NameTask.Text.Trim()))
|
||
|
|
{
|
||
|
|
case 1:
|
||
|
|
MyFormSetTitle(this, "任务名称空白,请填写“任务名称”。");
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
MyFormSetTitle(this, "任务名称重复,请重新填写“任务名称”。");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
textBox_NameTask.Focus();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mFanJi_NaiLeiShuiPing))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择反击耐雷水平计算方法,然后点击“" + buttonGaoJiSheZhi.Text + "”。");
|
||
|
|
comboBox_FanJi_NaiLeiShuiPing.Focus();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mRaoJi_NaiLeiShuiPing))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择绕击耐雷水平计算方法,然后点击“" + buttonGaoJiSheZhi.Text + "”。");
|
||
|
|
comboBox_RaoJi_NaiLeiShuiPing.Focus();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mFanJi_TZL))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择反击跳闸率计算方法,然后点击“" + buttonGaoJiSheZhi.Text + "”。");
|
||
|
|
comboBox_FanJi_TZL.Focus();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(mRaoJi_TZL))
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "请选择绕击跳闸率计算方法,然后点击“" + buttonGaoJiSheZhi.Text + "”。");
|
||
|
|
comboBox_RaoJi_TZL.Focus();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Clear();
|
||
|
|
DataGridViewCheckBoxCell dataGridViewCheckBoxCell = null;
|
||
|
|
string text2 = "";
|
||
|
|
for (int i = 0; i < mDGView.Rows.Count; i++)
|
||
|
|
{
|
||
|
|
if (mDGView.Rows[i] != null && mDGView.Rows[i].Cells != null && mDGView.Rows[i].Cells["塔号"] != null && mDGView.Rows[i].Cells["塔号"].Value != null)
|
||
|
|
{
|
||
|
|
dataGridViewCheckBoxCell = (DataGridViewCheckBoxCell)mDGView.Rows[i].Cells["包含"];
|
||
|
|
if (dataGridViewCheckBoxCell != null && dataGridViewCheckBoxCell.Value != null && (bool)dataGridViewCheckBoxCell.Value)
|
||
|
|
{
|
||
|
|
text2 = mDGView.Rows[i].Cells["塔号"].Value.ToString().Trim();
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Add(text2);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (mList_GanTaID_2DisInclude_Checked_ByUser.Count == 0)
|
||
|
|
{
|
||
|
|
MyFormSetTitle(this, "包含杆塔为空,请选择计算“包含”杆塔,然后点击“" + buttonOK.Text + "”。");
|
||
|
|
dataGridView_GanTa.Focus();
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
MyRefresh_TaskData();
|
||
|
|
DialogResult dialogResult = DialogResult.None;
|
||
|
|
desktop.mDlg_GJSZ_PuTongJiSuan.SetParentCode(1);
|
||
|
|
desktop.mDlg_GJSZ_PuTongJiSuan.MyFormSetVisiable(desktop.mDlg_GJSZ_PuTongJiSuan, value: false);
|
||
|
|
dialogResult = desktop.mDlg_GJSZ_PuTongJiSuan.ShowDialog(this);
|
||
|
|
if (dialogResult == DialogResult.OK)
|
||
|
|
{
|
||
|
|
Thread thread = new Thread(MyThread_ButtonGaoJiSheZhi);
|
||
|
|
thread.Start();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void MyThread_ButtonGaoJiSheZhi()
|
||
|
|
{
|
||
|
|
mLeaving = true;
|
||
|
|
Busy_ButtonOK = false;
|
||
|
|
int num = 0;
|
||
|
|
bool flag = false;
|
||
|
|
for (int i = 0; i < desktop.mTask.mListDetails.Count; i++)
|
||
|
|
{
|
||
|
|
if (mTaskData.mID_Task == desktop.mTask.mListDetails[i].mTaskID_Detail)
|
||
|
|
{
|
||
|
|
num = i;
|
||
|
|
flag = true;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (!flag)
|
||
|
|
{
|
||
|
|
TaskDetail taskDetail = new TaskDetail();
|
||
|
|
taskDetail.mTaskID_Detail = mTaskData.mID_Task;
|
||
|
|
taskDetail.mXianLuID_Detail = mTaskData.mXianLuID_Task;
|
||
|
|
num = desktop.mTask.mListDetails.Count;
|
||
|
|
desktop.mTask.mListDetails.Add(taskDetail);
|
||
|
|
desktop.mTask.mListDetails[num].mTaskGroup.mID_Task = mTaskData.mID_Task;
|
||
|
|
desktop.mTask.mListDetails[num].mTaskData.mID_Task = mTaskData.mID_Task;
|
||
|
|
}
|
||
|
|
else if (flag)
|
||
|
|
{
|
||
|
|
MyLog.AddLog($"MyThread_ButtonGaoJiSheZhi() Detail repeat(indexDetail={num}, mListDetails.Count={desktop.mTask.mListDetails.Count}).");
|
||
|
|
}
|
||
|
|
TaskData taskData = null;
|
||
|
|
for (double num2 = mTaskData.mCurveTimeHead_min; num2 <= mTaskData.mCurveTimeHead_max; num2 += mTaskData.mCurveTimeHead_step)
|
||
|
|
{
|
||
|
|
for (double num3 = mTaskData.mCurveTimeTail_min; num3 <= mTaskData.mCurveTimeTail_max; num3 += mTaskData.mCurveTimeTail_step)
|
||
|
|
{
|
||
|
|
taskData = new TaskData();
|
||
|
|
taskData.copyFrom_TaskData(mTaskData);
|
||
|
|
taskData.mCurveTimeHead = num2;
|
||
|
|
taskData.mCurveTimeTail = num3;
|
||
|
|
taskData.mTGanTas.SetXianLuData(mTaskData.mID_string_Task, mXianLuData);
|
||
|
|
taskData.mTGanTas.mListTGanTaData.Clear();
|
||
|
|
desktop.mTask.Add1_ExTaskData(num, taskData);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
GanTas ganTas = null;
|
||
|
|
for (int j = 0; j < desktop.mTask.mListDetails[num].mTaskGroup.mListExTaskData.Count; j++)
|
||
|
|
{
|
||
|
|
taskData = desktop.mTask.mListDetails[num].mTaskGroup.mListExTaskData[j];
|
||
|
|
for (int k = 0; k < desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count; k++)
|
||
|
|
{
|
||
|
|
ganTas = desktop.mXL.mListGanTas[mIndex_ListXianLuData];
|
||
|
|
if (mList_GanTaID_2DisInclude_Checked_ByUser.Contains(ganTas.mListGanTaData[k].mID_GanTa))
|
||
|
|
{
|
||
|
|
taskData.mTGanTas.Add1TGanTaData(ganTas.mListGanTaData[k], taskData.mIndex_CurrentCurve, taskData.mCurveTimeHead, taskData.mCurveTimeTail);
|
||
|
|
TGanTaData.mNextID_static++;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
MyOutput_TaskData();
|
||
|
|
base.DialogResult = DialogResult.OK;
|
||
|
|
}
|
||
|
|
|
||
|
|
private void textBox_NameTask_TextChanged(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
mNameTask = textBox_NameTask.Text.Trim();
|
||
|
|
Ready_TaskName = desktop.mTask.MyCheckTaskName(mNameTask) == 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
private void comboBox_XianLuName_SelectedIndexChanged(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
if (!mAfterInit || Busy_ButtonOK)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
MyFormSetTitle(this, "正在更新...");
|
||
|
|
int selectedIndex = ((ComboBox)sender).SelectedIndex;
|
||
|
|
mIndexControl_XianLuName = selectedIndex;
|
||
|
|
mNameXianLu = ((ComboBox)sender).SelectedItem.ToString().Trim();
|
||
|
|
for (int i = 0; i < desktop.mXL.mListXianLuData.Count; i++)
|
||
|
|
{
|
||
|
|
if (mNameXianLu.Equals(desktop.mXL.mListXianLuData[i].mName_XianLu))
|
||
|
|
{
|
||
|
|
mIndex_ListXianLuData = i;
|
||
|
|
GetDataSet();
|
||
|
|
MyQuery_refreshDGV();
|
||
|
|
mXianLuData.CopyFrom_XianLuData(desktop.mXL.mListXianLuData[i]);
|
||
|
|
mXianLuID = mXianLuData.mID_XianLu;
|
||
|
|
Ready_XianLuName = true;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void comboBox_FanJiRaoJi_NaiLeiShuiPing_TZL_SelectedIndexChanged(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
if (mAfterInit && !Busy_ButtonOK)
|
||
|
|
{
|
||
|
|
int selectedIndex = ((ComboBox)sender).SelectedIndex;
|
||
|
|
string text = ((ComboBox)sender).SelectedItem.ToString().Trim();
|
||
|
|
if (sender == comboBox_FanJi_NaiLeiShuiPing)
|
||
|
|
{
|
||
|
|
mIndexControl_FanJi_NaiLeiShuiPing = selectedIndex;
|
||
|
|
mFanJi_NaiLeiShuiPing = text;
|
||
|
|
}
|
||
|
|
else if (sender == comboBox_RaoJi_NaiLeiShuiPing)
|
||
|
|
{
|
||
|
|
mIndexControl_RaoJi_NaiLeiShuiPing = selectedIndex;
|
||
|
|
mRaoJi_NaiLeiShuiPing = text;
|
||
|
|
}
|
||
|
|
else if (sender == comboBox_FanJi_TZL)
|
||
|
|
{
|
||
|
|
mIndexControl_FanJi_TZL = selectedIndex;
|
||
|
|
mFanJi_TZL = text;
|
||
|
|
}
|
||
|
|
else if (sender == comboBox_RaoJi_TZL)
|
||
|
|
{
|
||
|
|
mIndexControl_RaoJi_TZL = selectedIndex;
|
||
|
|
mRaoJi_TZL = text;
|
||
|
|
}
|
||
|
|
bool flag = false;
|
||
|
|
flag = mBool_GuiChengFa;
|
||
|
|
string text2 = "";
|
||
|
|
text2 = mFanJi_NaiLeiShuiPing + mFanJi_TZL + mRaoJi_NaiLeiShuiPing + mRaoJi_TZL;
|
||
|
|
mBool_GuiChengFa = text2.IndexOf("规程") >= 0;
|
||
|
|
GetDataSet();
|
||
|
|
MyQuery_refreshDGV();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void GetDataSet()
|
||
|
|
{
|
||
|
|
if (mIndex_ListXianLuData < 0 || mIndex_ListXianLuData >= desktop.mXL.mListXianLuData.Count || desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count == 0)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (mDS == null)
|
||
|
|
{
|
||
|
|
mDS = new DataSet();
|
||
|
|
}
|
||
|
|
if (mDS.Tables.Count == 0)
|
||
|
|
{
|
||
|
|
mDS.Tables.Add(new DataTable());
|
||
|
|
}
|
||
|
|
if (mDS.Tables[0].Rows.Count > 0)
|
||
|
|
{
|
||
|
|
mDS.Tables[0].Rows.Clear();
|
||
|
|
}
|
||
|
|
if (mDS.Tables[0].Columns.Count > 0)
|
||
|
|
{
|
||
|
|
mDS.Tables[0].Columns.Clear();
|
||
|
|
}
|
||
|
|
mDS.Tables[0].Columns.Add("塔号");
|
||
|
|
mDS.Tables[0].Columns.Add("杆塔模型");
|
||
|
|
mDS.Tables[0].Columns.Add("地理坐标°");
|
||
|
|
mDS.Tables[0].Columns.Add("档距");
|
||
|
|
mDS.Tables[0].Columns.Add("海拔高度m");
|
||
|
|
mDS.Tables[0].Columns.Add("地形");
|
||
|
|
mDS.Tables[0].Columns.Add("接地电阻Ω");
|
||
|
|
mDS.Tables[0].Columns.Add("地闪密度 次/(km^2*年)");
|
||
|
|
mDS.Tables[0].Columns.Add("雷电流");
|
||
|
|
mDS.Tables[0].Columns.Add("倾角");
|
||
|
|
mDS.Tables[0].Columns.Add("塔型");
|
||
|
|
GanTaData ganTaData = null;
|
||
|
|
for (int i = 0; i < desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count; i++)
|
||
|
|
{
|
||
|
|
ganTaData = desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData[i];
|
||
|
|
DataRow dataRow = mDS.Tables[0].NewRow();
|
||
|
|
for (int j = 0; j < mDS.Tables[0].Columns.Count; j++)
|
||
|
|
{
|
||
|
|
dataRow[j] = "";
|
||
|
|
}
|
||
|
|
dataRow[0] = ganTaData.mID_GanTa ?? "";
|
||
|
|
dataRow[1] = ganTaData.mModel_GanTa ?? "";
|
||
|
|
dataRow[2] = $"{ganTaData.mJingDu_GanTa}|{ganTaData.mWeiDu_GanTa}";
|
||
|
|
dataRow[3] = $"{ganTaData.mXiaoHao_GanTa},{ganTaData.mDaHao_GanTa}";
|
||
|
|
dataRow[4] = $"{ganTaData.mHaiBa_GanTa}";
|
||
|
|
dataRow[5] = ganTaData.mDiXing_GanTa ?? "";
|
||
|
|
dataRow[6] = $"{ganTaData.mJDDZ_GanTa}";
|
||
|
|
dataRow[7] = $"{ganTaData.mDSMD_GanTa}";
|
||
|
|
dataRow[8] = $"{ganTaData.mCurrent_a_GanTa},{ganTaData.mCurrent_b_GanTa}";
|
||
|
|
dataRow[9] = $"{ganTaData.mDMQJ1_GanTa},{ganTaData.mDMQJ2_GanTa}";
|
||
|
|
dataRow[10] = ganTaData.mTaXing_GanTa ?? "";
|
||
|
|
mDS.Tables[0].Rows.Add(dataRow);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void MyQuery_refreshDGV()
|
||
|
|
{
|
||
|
|
if (mDGView != null && mDGView.Columns.Count > 0)
|
||
|
|
{
|
||
|
|
if (mDGView.Columns.Contains("包含"))
|
||
|
|
{
|
||
|
|
mDGView.Columns.Remove("包含");
|
||
|
|
}
|
||
|
|
if (mDGView.Columns.Contains("关联数目"))
|
||
|
|
{
|
||
|
|
mDGView.Columns.Remove("关联数目");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
mDGView.DataSource = null;
|
||
|
|
if (mDS == null || mDS.Tables.Count == 0)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
DataTable dataTable = mDS.Tables[0];
|
||
|
|
mDGView.DataSource = dataTable.DefaultView;
|
||
|
|
if (mDGView.Columns.Contains(mMainKeyColumnName))
|
||
|
|
{
|
||
|
|
mDGView.Columns[mMainKeyColumnName].ReadOnly = true;
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
mDGView.Columns[0].ReadOnly = true;
|
||
|
|
}
|
||
|
|
if (dataTable.Rows.Count > 0)
|
||
|
|
{
|
||
|
|
DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn = new DataGridViewCheckBoxColumn();
|
||
|
|
dataGridViewCheckBoxColumn.HeaderText = "包含";
|
||
|
|
dataGridViewCheckBoxColumn.Name = "包含";
|
||
|
|
dataGridViewCheckBoxColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
|
||
|
|
dataGridViewCheckBoxColumn.FlatStyle = FlatStyle.Flat;
|
||
|
|
dataGridViewCheckBoxColumn.ThreeState = false;
|
||
|
|
if (mDGView.Columns.Count > 0 && mDGView.Columns.Contains("包含"))
|
||
|
|
{
|
||
|
|
mDGView.Columns.Remove("包含");
|
||
|
|
}
|
||
|
|
mDGView.Columns.Insert(0, dataGridViewCheckBoxColumn);
|
||
|
|
}
|
||
|
|
if (dataTable.Rows.Count == 0 || mList_GanTaID_2DisInclude_Checked_ByUser.Count == 0 || mAfterInit)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
bool flag = false;
|
||
|
|
bool flag2 = false;
|
||
|
|
string text = "";
|
||
|
|
for (int i = 0; i < mList_GanTaID_2DisInclude_Checked_ByUser.Count; i++)
|
||
|
|
{
|
||
|
|
flag2 = false;
|
||
|
|
for (int j = 0; j < mDS.Tables[0].Rows.Count; j++)
|
||
|
|
{
|
||
|
|
if (mDS.Tables[0].Rows[j]["塔号"] != null)
|
||
|
|
{
|
||
|
|
text = mDS.Tables[0].Rows[j]["塔号"].ToString().Trim();
|
||
|
|
if (text.Equals(mList_GanTaID_2DisInclude_Checked_ByUser[i] ?? ""))
|
||
|
|
{
|
||
|
|
flag2 = true;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (!flag2)
|
||
|
|
{
|
||
|
|
flag = true;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (flag)
|
||
|
|
{
|
||
|
|
mList_GanTaID_2DisInclude_Checked_ByUser.Clear();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
DataGridViewCheckBoxCell dataGridViewCheckBoxCell = null;
|
||
|
|
string text2 = "";
|
||
|
|
for (int k = 0; k < mDGView.Rows.Count; k++)
|
||
|
|
{
|
||
|
|
if (mDGView.Rows[k] != null && mDGView.Rows[k].Cells != null && mDGView.Rows[k].Cells["塔号"] != null && mDGView.Rows[k].Cells["塔号"].Value != null)
|
||
|
|
{
|
||
|
|
dataGridViewCheckBoxCell = (DataGridViewCheckBoxCell)mDGView.Rows[k].Cells["包含"];
|
||
|
|
text2 = mDGView.Rows[k].Cells["塔号"].Value.ToString().Trim();
|
||
|
|
dataGridViewCheckBoxCell.Value = mList_GanTaID_2DisInclude_Checked_ByUser.Contains(text2);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyFormSetTitle(Form form, string value)
|
||
|
|
{
|
||
|
|
if (form.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateFormSetTitle method = MyFormSetTitle;
|
||
|
|
form.Invoke(method, form, value);
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (string.IsNullOrEmpty(value))
|
||
|
|
{
|
||
|
|
form.Text = mTitle;
|
||
|
|
}
|
||
|
|
if (!string.IsNullOrEmpty(value))
|
||
|
|
{
|
||
|
|
form.Text = mTitle + " " + value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyComboBoxItemsClear(ComboBox comboBox)
|
||
|
|
{
|
||
|
|
if (comboBox.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateComboBoxItemsClear method = MyComboBoxItemsClear;
|
||
|
|
comboBox.Invoke(method, comboBox);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
comboBox.Items.Clear();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyComboBoxAdd(ComboBox comboBox, string value)
|
||
|
|
{
|
||
|
|
if (comboBox.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateComboBoxAdd method = MyComboBoxAdd;
|
||
|
|
comboBox.Invoke(method, comboBox, value);
|
||
|
|
}
|
||
|
|
else if (!string.IsNullOrEmpty(value))
|
||
|
|
{
|
||
|
|
comboBox.Items.Add(value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyComboBoxSetSelectedIndex(ComboBox comboBox, int value)
|
||
|
|
{
|
||
|
|
if (comboBox.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateComboBoxSetSelectedIndex method = MyComboBoxSetSelectedIndex;
|
||
|
|
comboBox.Invoke(method, comboBox, value);
|
||
|
|
}
|
||
|
|
else if (value >= 0 && value < comboBox.Items.Count)
|
||
|
|
{
|
||
|
|
comboBox.SelectedIndex = value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyListBoxItemsClear(ListBox listBox)
|
||
|
|
{
|
||
|
|
if (listBox.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateListBoxItemsClear method = MyListBoxItemsClear;
|
||
|
|
listBox.Invoke(method, listBox);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
listBox.Items.Clear();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyListBoxAdd(ListBox listBox, string value)
|
||
|
|
{
|
||
|
|
if (listBox.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateListBoxAdd method = MyListBoxAdd;
|
||
|
|
listBox.Invoke(method, listBox, value);
|
||
|
|
}
|
||
|
|
else if (!string.IsNullOrEmpty(value))
|
||
|
|
{
|
||
|
|
listBox.Items.Add(value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyListBoxSelectedIndex(ListBox listBox, int value)
|
||
|
|
{
|
||
|
|
if (listBox.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateListBoxSelectedIndex method = MyListBoxSelectedIndex;
|
||
|
|
listBox.Invoke(method, listBox, value);
|
||
|
|
}
|
||
|
|
else if (value >= 0 && value < listBox.Items.Count)
|
||
|
|
{
|
||
|
|
listBox.SelectedIndex = value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyTextBoxSetText(TextBox textBox, string value)
|
||
|
|
{
|
||
|
|
if (textBox.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateTextBoxSetText method = MyTextBoxSetText;
|
||
|
|
textBox.Invoke(method, textBox, value);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
textBox.Text = value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyButtonEnabled(Button button, bool value)
|
||
|
|
{
|
||
|
|
if (button.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateButtonEnabled method = MyButtonEnabled;
|
||
|
|
button.Invoke(method, button, value);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
button.Enabled = value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MyFormHide(Form form)
|
||
|
|
{
|
||
|
|
try
|
||
|
|
{
|
||
|
|
if (form.InvokeRequired)
|
||
|
|
{
|
||
|
|
delegateFormHide method = MyFormHide;
|
||
|
|
form.Invoke(method, form);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
form.Hide();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
catch (Exception)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void Dispose(bool disposing)
|
||
|
|
{
|
||
|
|
if (disposing && components != null)
|
||
|
|
{
|
||
|
|
components.Dispose();
|
||
|
|
}
|
||
|
|
base.Dispose(disposing);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InitializeComponent()
|
||
|
|
{
|
||
|
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||
|
|
this.buttonOK = new System.Windows.Forms.Button();
|
||
|
|
this.comboBox_XianLuName = new System.Windows.Forms.ComboBox();
|
||
|
|
this.label1 = new System.Windows.Forms.Label();
|
||
|
|
this.label3 = new System.Windows.Forms.Label();
|
||
|
|
this.textBox_NameTask = new System.Windows.Forms.TextBox();
|
||
|
|
this.label4 = new System.Windows.Forms.Label();
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing = new System.Windows.Forms.ComboBox();
|
||
|
|
this.label5 = new System.Windows.Forms.Label();
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing = new System.Windows.Forms.ComboBox();
|
||
|
|
this.label2 = new System.Windows.Forms.Label();
|
||
|
|
this.label6 = new System.Windows.Forms.Label();
|
||
|
|
this.comboBox_FanJi_TZL = new System.Windows.Forms.ComboBox();
|
||
|
|
this.comboBox_RaoJi_TZL = new System.Windows.Forms.ComboBox();
|
||
|
|
this.buttonGaoJiSheZhi = new System.Windows.Forms.Button();
|
||
|
|
this.dataGridView_GanTa = new System.Windows.Forms.DataGridView();
|
||
|
|
this.buttonSelectAll = new System.Windows.Forms.Button();
|
||
|
|
((System.ComponentModel.ISupportInitialize)this.dataGridView_GanTa).BeginInit();
|
||
|
|
base.SuspendLayout();
|
||
|
|
this.buttonCancel.Location = new System.Drawing.Point(409, 672);
|
||
|
|
this.buttonCancel.Name = "buttonCancel";
|
||
|
|
this.buttonCancel.Size = new System.Drawing.Size(86, 28);
|
||
|
|
this.buttonCancel.TabIndex = 9;
|
||
|
|
this.buttonCancel.Text = "取消";
|
||
|
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||
|
|
this.buttonCancel.Click += new System.EventHandler(buttonCancel_Click);
|
||
|
|
this.buttonOK.Location = new System.Drawing.Point(308, 672);
|
||
|
|
this.buttonOK.Name = "buttonOK";
|
||
|
|
this.buttonOK.Size = new System.Drawing.Size(86, 28);
|
||
|
|
this.buttonOK.TabIndex = 8;
|
||
|
|
this.buttonOK.Text = "确定";
|
||
|
|
this.buttonOK.UseVisualStyleBackColor = true;
|
||
|
|
this.buttonOK.Click += new System.EventHandler(buttonOK_Click);
|
||
|
|
this.comboBox_XianLuName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||
|
|
this.comboBox_XianLuName.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.comboBox_XianLuName.FormattingEnabled = true;
|
||
|
|
this.comboBox_XianLuName.Location = new System.Drawing.Point(12, 26);
|
||
|
|
this.comboBox_XianLuName.Name = "comboBox_XianLuName";
|
||
|
|
this.comboBox_XianLuName.Size = new System.Drawing.Size(483, 24);
|
||
|
|
this.comboBox_XianLuName.TabIndex = 0;
|
||
|
|
this.comboBox_XianLuName.SelectedIndexChanged += new System.EventHandler(comboBox_XianLuName_SelectedIndexChanged);
|
||
|
|
this.label1.AutoSize = true;
|
||
|
|
this.label1.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.label1.Location = new System.Drawing.Point(19, 9);
|
||
|
|
this.label1.Name = "label1";
|
||
|
|
this.label1.Size = new System.Drawing.Size(63, 14);
|
||
|
|
this.label1.TabIndex = 58;
|
||
|
|
this.label1.Text = "线路名称";
|
||
|
|
this.label3.AutoSize = true;
|
||
|
|
this.label3.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.label3.Location = new System.Drawing.Point(19, 54);
|
||
|
|
this.label3.Name = "label3";
|
||
|
|
this.label3.Size = new System.Drawing.Size(63, 14);
|
||
|
|
this.label3.TabIndex = 58;
|
||
|
|
this.label3.Text = "任务名称";
|
||
|
|
this.textBox_NameTask.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.textBox_NameTask.Location = new System.Drawing.Point(12, 71);
|
||
|
|
this.textBox_NameTask.Name = "textBox_NameTask";
|
||
|
|
this.textBox_NameTask.Size = new System.Drawing.Size(483, 26);
|
||
|
|
this.textBox_NameTask.TabIndex = 1;
|
||
|
|
this.textBox_NameTask.TextChanged += new System.EventHandler(textBox_NameTask_TextChanged);
|
||
|
|
this.label4.AutoSize = true;
|
||
|
|
this.label4.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.label4.Location = new System.Drawing.Point(19, 105);
|
||
|
|
this.label4.Name = "label4";
|
||
|
|
this.label4.Size = new System.Drawing.Size(147, 14);
|
||
|
|
this.label4.TabIndex = 57;
|
||
|
|
this.label4.Text = "反击耐雷水平计算方法";
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.FormattingEnabled = true;
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.Location = new System.Drawing.Point(12, 122);
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.Name = "comboBox_FanJi_NaiLeiShuiPing";
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.Size = new System.Drawing.Size(483, 24);
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.TabIndex = 2;
|
||
|
|
this.comboBox_FanJi_NaiLeiShuiPing.SelectedIndexChanged += new System.EventHandler(comboBox_FanJiRaoJi_NaiLeiShuiPing_TZL_SelectedIndexChanged);
|
||
|
|
this.label5.AutoSize = true;
|
||
|
|
this.label5.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.label5.Location = new System.Drawing.Point(19, 150);
|
||
|
|
this.label5.Name = "label5";
|
||
|
|
this.label5.Size = new System.Drawing.Size(147, 14);
|
||
|
|
this.label5.TabIndex = 57;
|
||
|
|
this.label5.Text = "绕击耐雷水平计算方法";
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.FormattingEnabled = true;
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.Location = new System.Drawing.Point(12, 167);
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.Name = "comboBox_RaoJi_NaiLeiShuiPing";
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.Size = new System.Drawing.Size(483, 24);
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.TabIndex = 3;
|
||
|
|
this.comboBox_RaoJi_NaiLeiShuiPing.SelectedIndexChanged += new System.EventHandler(comboBox_FanJiRaoJi_NaiLeiShuiPing_TZL_SelectedIndexChanged);
|
||
|
|
this.label2.AutoSize = true;
|
||
|
|
this.label2.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.label2.Location = new System.Drawing.Point(19, 196);
|
||
|
|
this.label2.Name = "label2";
|
||
|
|
this.label2.Size = new System.Drawing.Size(133, 14);
|
||
|
|
this.label2.TabIndex = 57;
|
||
|
|
this.label2.Text = "反击跳闸率计算方法";
|
||
|
|
this.label6.AutoSize = true;
|
||
|
|
this.label6.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.label6.Location = new System.Drawing.Point(19, 241);
|
||
|
|
this.label6.Name = "label6";
|
||
|
|
this.label6.Size = new System.Drawing.Size(133, 14);
|
||
|
|
this.label6.TabIndex = 57;
|
||
|
|
this.label6.Text = "绕击跳闸率计算方法";
|
||
|
|
this.comboBox_FanJi_TZL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||
|
|
this.comboBox_FanJi_TZL.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.comboBox_FanJi_TZL.FormattingEnabled = true;
|
||
|
|
this.comboBox_FanJi_TZL.Location = new System.Drawing.Point(12, 213);
|
||
|
|
this.comboBox_FanJi_TZL.Name = "comboBox_FanJi_TZL";
|
||
|
|
this.comboBox_FanJi_TZL.Size = new System.Drawing.Size(430, 24);
|
||
|
|
this.comboBox_FanJi_TZL.TabIndex = 4;
|
||
|
|
this.comboBox_FanJi_TZL.SelectedIndexChanged += new System.EventHandler(comboBox_FanJiRaoJi_NaiLeiShuiPing_TZL_SelectedIndexChanged);
|
||
|
|
this.comboBox_RaoJi_TZL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||
|
|
this.comboBox_RaoJi_TZL.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||
|
|
this.comboBox_RaoJi_TZL.FormattingEnabled = true;
|
||
|
|
this.comboBox_RaoJi_TZL.Location = new System.Drawing.Point(12, 258);
|
||
|
|
this.comboBox_RaoJi_TZL.Name = "comboBox_RaoJi_TZL";
|
||
|
|
this.comboBox_RaoJi_TZL.Size = new System.Drawing.Size(430, 24);
|
||
|
|
this.comboBox_RaoJi_TZL.TabIndex = 5;
|
||
|
|
this.comboBox_RaoJi_TZL.SelectedIndexChanged += new System.EventHandler(comboBox_FanJiRaoJi_NaiLeiShuiPing_TZL_SelectedIndexChanged);
|
||
|
|
this.buttonGaoJiSheZhi.Location = new System.Drawing.Point(22, 672);
|
||
|
|
this.buttonGaoJiSheZhi.Name = "buttonGaoJiSheZhi";
|
||
|
|
this.buttonGaoJiSheZhi.Size = new System.Drawing.Size(86, 28);
|
||
|
|
this.buttonGaoJiSheZhi.TabIndex = 10;
|
||
|
|
this.buttonGaoJiSheZhi.Text = "高级设置";
|
||
|
|
this.buttonGaoJiSheZhi.UseVisualStyleBackColor = true;
|
||
|
|
this.buttonGaoJiSheZhi.Click += new System.EventHandler(buttonGaoJiSheZhi_Click);
|
||
|
|
this.dataGridView_GanTa.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||
|
|
this.dataGridView_GanTa.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||
|
|
this.dataGridView_GanTa.Location = new System.Drawing.Point(12, 287);
|
||
|
|
this.dataGridView_GanTa.Name = "dataGridView_GanTa";
|
||
|
|
this.dataGridView_GanTa.RowTemplate.Height = 23;
|
||
|
|
this.dataGridView_GanTa.Size = new System.Drawing.Size(484, 379);
|
||
|
|
this.dataGridView_GanTa.TabIndex = 6;
|
||
|
|
this.buttonSelectAll.Location = new System.Drawing.Point(195, 672);
|
||
|
|
this.buttonSelectAll.Name = "buttonSelectAll";
|
||
|
|
this.buttonSelectAll.Size = new System.Drawing.Size(75, 28);
|
||
|
|
this.buttonSelectAll.TabIndex = 7;
|
||
|
|
this.buttonSelectAll.Text = "全选";
|
||
|
|
this.buttonSelectAll.UseVisualStyleBackColor = true;
|
||
|
|
this.buttonSelectAll.Click += new System.EventHandler(buttonSelectAll_Click);
|
||
|
|
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
|
||
|
|
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||
|
|
base.ClientSize = new System.Drawing.Size(507, 708);
|
||
|
|
base.Controls.Add(this.buttonSelectAll);
|
||
|
|
base.Controls.Add(this.dataGridView_GanTa);
|
||
|
|
base.Controls.Add(this.buttonCancel);
|
||
|
|
base.Controls.Add(this.buttonGaoJiSheZhi);
|
||
|
|
base.Controls.Add(this.buttonOK);
|
||
|
|
base.Controls.Add(this.textBox_NameTask);
|
||
|
|
base.Controls.Add(this.comboBox_RaoJi_TZL);
|
||
|
|
base.Controls.Add(this.comboBox_RaoJi_NaiLeiShuiPing);
|
||
|
|
base.Controls.Add(this.comboBox_FanJi_TZL);
|
||
|
|
base.Controls.Add(this.comboBox_FanJi_NaiLeiShuiPing);
|
||
|
|
base.Controls.Add(this.comboBox_XianLuName);
|
||
|
|
base.Controls.Add(this.label6);
|
||
|
|
base.Controls.Add(this.label5);
|
||
|
|
base.Controls.Add(this.label2);
|
||
|
|
base.Controls.Add(this.label4);
|
||
|
|
base.Controls.Add(this.label3);
|
||
|
|
base.Controls.Add(this.label1);
|
||
|
|
base.Name = "Form_PuTongJiSuan";
|
||
|
|
base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||
|
|
this.Text = "FormPuTongJiSuan";
|
||
|
|
base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(Form_PuTongJiSuan_FormClosing);
|
||
|
|
base.Load += new System.EventHandler(Form_PuTongJiSuan_Load);
|
||
|
|
base.Resize += new System.EventHandler(Form_PuTongJiSuan_Resize);
|
||
|
|
((System.ComponentModel.ISupportInitialize)this.dataGridView_GanTa).EndInit();
|
||
|
|
base.ResumeLayout(false);
|
||
|
|
base.PerformLayout();
|
||
|
|
}
|
||
|
|
}
|