1614 lines
52 KiB
C#
1614 lines
52 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Data;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.IO;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading;
|
|||
|
|
using System.Windows.Forms;
|
|||
|
|
|
|||
|
|
namespace LP;
|
|||
|
|
|
|||
|
|
public class FormGanTaList : Form
|
|||
|
|
{
|
|||
|
|
private delegate void delegateFormTitle(Form form, string value);
|
|||
|
|
|
|||
|
|
private delegate void delegateDataGridViewDataSource(DataGridView dataGridView, DataView value);
|
|||
|
|
|
|||
|
|
private delegate void delegateGroupBoxVisible(GroupBox groupBox, bool value);
|
|||
|
|
|
|||
|
|
private delegate void delegateFormHide(Form form);
|
|||
|
|
|
|||
|
|
public FormDesktop desktop = null;
|
|||
|
|
|
|||
|
|
private string mTitle = "";
|
|||
|
|
|
|||
|
|
private XianLuData mXianLuData = null;
|
|||
|
|
|
|||
|
|
private string mFileName = "";
|
|||
|
|
|
|||
|
|
private int mIndex_ListXianLuData = 0;
|
|||
|
|
|
|||
|
|
private bool mOK_Index_ListXianLuData = false;
|
|||
|
|
|
|||
|
|
private DataSet mDS = null;
|
|||
|
|
|
|||
|
|
private bool mOK_DataSet = false;
|
|||
|
|
|
|||
|
|
private int mDGV_Index = -1;
|
|||
|
|
|
|||
|
|
private bool mBusy = false;
|
|||
|
|
|
|||
|
|
public static object mLock = new object();
|
|||
|
|
|
|||
|
|
private IContainer components = null;
|
|||
|
|
|
|||
|
|
private Panel panelGanTaList_Form;
|
|||
|
|
|
|||
|
|
private Panel panelButtons;
|
|||
|
|
|
|||
|
|
private Panel panelList;
|
|||
|
|
|
|||
|
|
private Panel panelDetail;
|
|||
|
|
|
|||
|
|
private Button buttonDelete;
|
|||
|
|
|
|||
|
|
private Button buttonAppend;
|
|||
|
|
|
|||
|
|
private Button buttonSave_GanTa;
|
|||
|
|
|
|||
|
|
private Button buttonLoad_GanTa;
|
|||
|
|
|
|||
|
|
private Panel panel1;
|
|||
|
|
|
|||
|
|
private DataGridView dataGridView_Ganta;
|
|||
|
|
|
|||
|
|
private PictureBox pictureBox_GanTa;
|
|||
|
|
|
|||
|
|
private GroupBox groupBox_GanTa;
|
|||
|
|
|
|||
|
|
private Label label2;
|
|||
|
|
|
|||
|
|
private Label label1;
|
|||
|
|
|
|||
|
|
private TextBox textBox_BLZJ_L;
|
|||
|
|
|
|||
|
|
private Label label8;
|
|||
|
|
|
|||
|
|
private Label label7;
|
|||
|
|
|
|||
|
|
private Label label6;
|
|||
|
|
|
|||
|
|
private Label label5;
|
|||
|
|
|
|||
|
|
private Label label4;
|
|||
|
|
|
|||
|
|
private Label label3;
|
|||
|
|
|
|||
|
|
private Label label9;
|
|||
|
|
|
|||
|
|
private TextBox textBox_BLZJ_R;
|
|||
|
|
|
|||
|
|
private TextBox textBox_BLXGD;
|
|||
|
|
|
|||
|
|
private TextBox textBox_ZJ_Shang;
|
|||
|
|
|
|||
|
|
private TextBox textBox_GD_Shang;
|
|||
|
|
|
|||
|
|
private TextBox textBox_GD_Xia;
|
|||
|
|
|
|||
|
|
private TextBox textBox_ZJ_Xia;
|
|||
|
|
|
|||
|
|
private TextBox textBox_GD_Zhong;
|
|||
|
|
|
|||
|
|
private TextBox textBox_ZJ_Zhong;
|
|||
|
|
|
|||
|
|
public FormGanTaList()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
if (string.IsNullOrEmpty(mTitle))
|
|||
|
|
{
|
|||
|
|
mTitle = "杆塔列表";
|
|||
|
|
}
|
|||
|
|
if (mXianLuData == null)
|
|||
|
|
{
|
|||
|
|
mXianLuData = new XianLuData();
|
|||
|
|
}
|
|||
|
|
mOK_Index_ListXianLuData = false;
|
|||
|
|
mOK_DataSet = false;
|
|||
|
|
if (mDS == null)
|
|||
|
|
{
|
|||
|
|
mDS = new DataSet();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void FormGanTaList_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mXianLuData == null || string.IsNullOrEmpty(mXianLuData.mName_XianLu))
|
|||
|
|
{
|
|||
|
|
MySet_Form_Title(this, "");
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
MySet_Form_Title(this, $" - {mXianLuData.mName_XianLu} (共{mXianLuData.mGanTaNumber_XianLu}个杆塔)");
|
|||
|
|
}
|
|||
|
|
if (mDS == null)
|
|||
|
|
{
|
|||
|
|
mDS = new DataSet();
|
|||
|
|
}
|
|||
|
|
if (mOK_Index_ListXianLuData)
|
|||
|
|
{
|
|||
|
|
MyRefresh_DGV();
|
|||
|
|
}
|
|||
|
|
dataGridView_Ganta.ReadOnly = true;
|
|||
|
|
pictureBox_GanTa.Image = null;
|
|||
|
|
if (mDS == null || mDS.Tables.Count == 0 || mDGV_Index >= mDS.Tables[0].Rows.Count)
|
|||
|
|
{
|
|||
|
|
mDGV_Index = -1;
|
|||
|
|
}
|
|||
|
|
MyRefresh_Right();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void FormGanTaList_FormClosing(object sender, FormClosingEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mDS != null)
|
|||
|
|
{
|
|||
|
|
if (mDS.Tables.Count > 0)
|
|||
|
|
{
|
|||
|
|
mDS.Tables[0].Clear();
|
|||
|
|
}
|
|||
|
|
mDS.Tables.Clear();
|
|||
|
|
mDS = null;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void MyInput_XianLuData()
|
|||
|
|
{
|
|||
|
|
mXianLuData.CopyFrom_XianLuData(desktop.mTheXianLuData);
|
|||
|
|
mOK_Index_ListXianLuData = false;
|
|||
|
|
for (int i = 0; i < desktop.mXL.mListXianLuData.Count; i++)
|
|||
|
|
{
|
|||
|
|
if (desktop.mXL.mListXianLuData[i].mName_XianLu.Equals(mXianLuData.mName_XianLu))
|
|||
|
|
{
|
|||
|
|
mIndex_ListXianLuData = i;
|
|||
|
|
mOK_Index_ListXianLuData = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
MySet_DataGridView_DataSource(dataGridView_Ganta, null);
|
|||
|
|
GetDataSet();
|
|||
|
|
if (mOK_DataSet)
|
|||
|
|
{
|
|||
|
|
MySet_DataGridView_DataSource(dataGridView_Ganta, mDS.Tables[0].DefaultView);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void MyOutput_XianLuData()
|
|||
|
|
{
|
|||
|
|
desktop.mTheXianLuData.CopyFrom_XianLuData(mXianLuData);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void MyRefresh_DGV()
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
mXianLuData.mGanTaNumber_XianLu = desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count;
|
|||
|
|
mXianLuData.mStringGanTaNumber_XianLu = $"[{mXianLuData.mGanTaNumber_XianLu}]个杆塔";
|
|||
|
|
MySet_Form_Title(this, $"{mXianLuData.mName_XianLu}({mXianLuData.mHuiLuNo_XianLu}) (共{mXianLuData.mGanTaNumber_XianLu}个杆塔)");
|
|||
|
|
MySet_DataGridView_DataSource(dataGridView_Ganta, null);
|
|||
|
|
GetDataSet();
|
|||
|
|
if (mOK_DataSet)
|
|||
|
|
{
|
|||
|
|
MySet_DataGridView_DataSource(dataGridView_Ganta, mDS.Tables[0].DefaultView);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs MyRefresh_DGV() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void MyRefresh_Right()
|
|||
|
|
{
|
|||
|
|
lock (mLock)
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
string text = "";
|
|||
|
|
GanTaData ganTaData = null;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
ganTaData = desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData[mDGV_Index];
|
|||
|
|
}
|
|||
|
|
catch (Exception)
|
|||
|
|
{
|
|||
|
|
ganTaData = null;
|
|||
|
|
}
|
|||
|
|
if (ganTaData == null)
|
|||
|
|
{
|
|||
|
|
pictureBox_GanTa.Image = null;
|
|||
|
|
MySet_GroupBox_Visible(groupBox_GanTa, value: false);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
text = ganTaData.mModel_GanTa;
|
|||
|
|
if (!string.IsNullOrEmpty(text))
|
|||
|
|
{
|
|||
|
|
string text2 = Application.StartupPath + "\\Models\\" + text + ".jpg";
|
|||
|
|
if (!File.Exists(text2))
|
|||
|
|
{
|
|||
|
|
pictureBox_GanTa.Image = null;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
pictureBox_GanTa.Image = Image.FromFile(text2);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
MySet_GroupBox_Visible(groupBox_GanTa, value: true);
|
|||
|
|
textBox_BLZJ_L.Text = $"{ganTaData.mBLZJ_L_GanTa}";
|
|||
|
|
textBox_BLZJ_R.Text = $"{ganTaData.mBLZJ_R_GanTa}";
|
|||
|
|
textBox_BLXGD.Text = $"{ganTaData.mBLXGD_GanTa}";
|
|||
|
|
textBox_ZJ_Shang.Text = $"{ganTaData.m1ZJ_Shang_GanTa}";
|
|||
|
|
textBox_GD_Shang.Text = $"{ganTaData.m1GD_Shang_GanTa}";
|
|||
|
|
textBox_ZJ_Zhong.Text = $"{ganTaData.m1ZJ_Zhong_GanTa}";
|
|||
|
|
textBox_GD_Zhong.Text = $"{ganTaData.m1GD_Zhong_GanTa}";
|
|||
|
|
textBox_ZJ_Xia.Text = $"{ganTaData.m1ZJ_Xia_GanTa}";
|
|||
|
|
textBox_GD_Xia.Text = $"{ganTaData.m1GD_Xia_GanTa}";
|
|||
|
|
}
|
|||
|
|
catch (Exception ex2)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs MyRefresh_Right() 异常=" + ex2.Message);
|
|||
|
|
MessageBox.Show(ex2.Message);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void buttonLoad_GanTa_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mBusy)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mBusy = true;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
|||
|
|
openFileDialog.InitialDirectory = Application.StartupPath;
|
|||
|
|
openFileDialog.Filter = "所有文件*.*|*.*|Excel文件(*.csv)|*.csv|Txt文件(*.txt)|*.txt";
|
|||
|
|
openFileDialog.FilterIndex = 2;
|
|||
|
|
if (openFileDialog.ShowDialog(this) != DialogResult.OK)
|
|||
|
|
{
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mFileName = openFileDialog.FileName;
|
|||
|
|
Thread thread = new Thread(MyLoad_GanTas);
|
|||
|
|
thread.Start();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonLoad_GanTa_Click() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void MyLoad_GanTas()
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
if (string.IsNullOrEmpty(mFileName))
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonLoad_GanTa_Click() MyLoad_GanTas() 文件名mFileName为空!");
|
|||
|
|
MessageBox.Show("文件名mFileName为空!");
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (!File.Exists(mFileName))
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonLoad_GanTa_Click() MyLoad_GanTas() 未找到文件! " + mFileName);
|
|||
|
|
MessageBox.Show("未找到文件: " + mFileName);
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
string[] separator = new string[3] { "\r", "\n", "," };
|
|||
|
|
string text = "";
|
|||
|
|
int num = 0;
|
|||
|
|
int num2 = 0;
|
|||
|
|
string text2 = "";
|
|||
|
|
Dictionary<string, int> dictionary = new Dictionary<string, int>();
|
|||
|
|
dictionary.Clear();
|
|||
|
|
bool flag = false;
|
|||
|
|
bool flag2 = false;
|
|||
|
|
int num3 = 0;
|
|||
|
|
int num4 = 0;
|
|||
|
|
double num5 = 0.0;
|
|||
|
|
for (num3 = 0; num3 < desktop.mXL.mListXianLuData.Count; num3++)
|
|||
|
|
{
|
|||
|
|
if (desktop.mXL.mListXianLuData[num3].mName_XianLu.Equals(mXianLuData.mName_XianLu))
|
|||
|
|
{
|
|||
|
|
flag2 = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if (!flag2)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonLoad_GanTa_Click() MyLoad_GanTas() 未找到线路! " + mXianLuData.mName_XianLu);
|
|||
|
|
MessageBox.Show("未找到线路: " + mXianLuData.mName_XianLu);
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (!mOK_Index_ListXianLuData)
|
|||
|
|
{
|
|||
|
|
mOK_Index_ListXianLuData = true;
|
|||
|
|
}
|
|||
|
|
if (mIndex_ListXianLuData != num3)
|
|||
|
|
{
|
|||
|
|
mIndex_ListXianLuData = num3;
|
|||
|
|
}
|
|||
|
|
Encoding[] array = new Encoding[6]
|
|||
|
|
{
|
|||
|
|
Encoding.UTF8,
|
|||
|
|
Encoding.Default,
|
|||
|
|
Encoding.ASCII,
|
|||
|
|
Encoding.Unicode,
|
|||
|
|
Encoding.UTF7,
|
|||
|
|
Encoding.UTF32
|
|||
|
|
};
|
|||
|
|
int num6 = 0;
|
|||
|
|
flag2 = false;
|
|||
|
|
for (int i = 0; i < array.Length; i++)
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
using FileStream fileStream = new FileStream(mFileName, FileMode.Open, FileAccess.Read, FileShare.None);
|
|||
|
|
using (StreamReader streamReader = new StreamReader(fileStream, array[i]))
|
|||
|
|
{
|
|||
|
|
text = streamReader.ReadToEnd();
|
|||
|
|
if (text.IndexOf("塔号") >= 0)
|
|||
|
|
{
|
|||
|
|
num6 = i;
|
|||
|
|
flag2 = true;
|
|||
|
|
}
|
|||
|
|
streamReader.Close();
|
|||
|
|
}
|
|||
|
|
fileStream.Close();
|
|||
|
|
}
|
|||
|
|
catch (Exception)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
if (flag2)
|
|||
|
|
{
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
GanTaData ganTaData = null;
|
|||
|
|
bool flag3 = false;
|
|||
|
|
bool flag4 = false;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
using FileStream fileStream2 = new FileStream(mFileName, FileMode.Open, FileAccess.Read, FileShare.None);
|
|||
|
|
using (StreamReader streamReader2 = new StreamReader(fileStream2, array[num6]))
|
|||
|
|
{
|
|||
|
|
while (!streamReader2.EndOfStream)
|
|||
|
|
{
|
|||
|
|
text = streamReader2.ReadLine().Trim();
|
|||
|
|
if (string.IsNullOrEmpty(text))
|
|||
|
|
{
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
num++;
|
|||
|
|
string[] array2 = text.Split(separator, StringSplitOptions.None);
|
|||
|
|
if (num == 1 && text.IndexOf("塔号") >= 0)
|
|||
|
|
{
|
|||
|
|
for (int j = 0; j < array2.Length; j++)
|
|||
|
|
{
|
|||
|
|
dictionary.Add(array2[j], j);
|
|||
|
|
}
|
|||
|
|
flag = true;
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
ganTaData = new GanTaData();
|
|||
|
|
if (flag)
|
|||
|
|
{
|
|||
|
|
for (int k = 0; k < array2.Length; k++)
|
|||
|
|
{
|
|||
|
|
text2 = dictionary.ElementAt(k).Key;
|
|||
|
|
num2 = dictionary.ElementAt(k).Value;
|
|||
|
|
flag3 = (flag4 = false);
|
|||
|
|
if (array2[num2] == null)
|
|||
|
|
{
|
|||
|
|
num4 = 0;
|
|||
|
|
num5 = 0.0;
|
|||
|
|
flag3 = (flag4 = true);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
num4 = Convert.ToInt32(array2[num2].Trim());
|
|||
|
|
}
|
|||
|
|
catch (Exception)
|
|||
|
|
{
|
|||
|
|
num4 = 1;
|
|||
|
|
flag4 = true;
|
|||
|
|
}
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
num5 = Convert.ToDouble(array2[num2].Trim());
|
|||
|
|
}
|
|||
|
|
catch (Exception)
|
|||
|
|
{
|
|||
|
|
num5 = 1.0;
|
|||
|
|
flag3 = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
switch (text2)
|
|||
|
|
{
|
|||
|
|
case "线路编号":
|
|||
|
|
ganTaData.mXianLuID = num4;
|
|||
|
|
break;
|
|||
|
|
case "序号":
|
|||
|
|
ganTaData.mIndex__GanTa = (flag4 ? desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count : num4);
|
|||
|
|
break;
|
|||
|
|
case "线路名称":
|
|||
|
|
ganTaData.mXianLuName = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "电压等级":
|
|||
|
|
ganTaData.mDYDJ_GanTa = num4;
|
|||
|
|
break;
|
|||
|
|
case "塔号":
|
|||
|
|
ganTaData.mID_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "杆塔模型":
|
|||
|
|
ganTaData.mModel_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "塔形":
|
|||
|
|
ganTaData.mTaXing_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "经度":
|
|||
|
|
ganTaData.mJingDu_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "纬度":
|
|||
|
|
ganTaData.mWeiDu_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "I回相序":
|
|||
|
|
ganTaData.mXiangXu1_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "II回相序":
|
|||
|
|
ganTaData.mXiangXu2_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "III回相序":
|
|||
|
|
ganTaData.mXiangXu3_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "IV回相序":
|
|||
|
|
ganTaData.mXiangXu4_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "A相是否安装避雷器":
|
|||
|
|
ganTaData.mBLQ_A_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "B相是否安装避雷器":
|
|||
|
|
ganTaData.mBLQ_B_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "C相是否安装避雷器":
|
|||
|
|
ganTaData.mBLQ_C_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "接地电阻":
|
|||
|
|
ganTaData.mJDDZ_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "左避雷中距m":
|
|||
|
|
ganTaData.mBLZJ_L_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "右避雷中距m":
|
|||
|
|
ganTaData.mBLZJ_R_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "避雷线高度m":
|
|||
|
|
ganTaData.mBLXGD_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "绝缘子串长度mm":
|
|||
|
|
ganTaData.mJYZCD_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "杆塔呼高m":
|
|||
|
|
ganTaData.mHuGao_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "I回上相中距m":
|
|||
|
|
ganTaData.m1ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "I回中相中距m":
|
|||
|
|
ganTaData.m1ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "I回下相中距m":
|
|||
|
|
ganTaData.m1ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "I回上相高度m":
|
|||
|
|
ganTaData.m1GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "I回中相高度m":
|
|||
|
|
ganTaData.m1GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "I回下相高度m":
|
|||
|
|
ganTaData.m1GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "II回上相中距m":
|
|||
|
|
ganTaData.m2ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "II回中相中距m":
|
|||
|
|
ganTaData.m2ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "II回下相中距m":
|
|||
|
|
ganTaData.m2ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "II回上相高度m":
|
|||
|
|
ganTaData.m2GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "II回中相高度m":
|
|||
|
|
ganTaData.m2GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "II回下相高度m":
|
|||
|
|
ganTaData.m2GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "III回上相中距m":
|
|||
|
|
ganTaData.m3ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "III回中相中距m":
|
|||
|
|
ganTaData.m3ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "III回下相中距m":
|
|||
|
|
ganTaData.m3ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "III回上相高度m":
|
|||
|
|
ganTaData.m3GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "III回中相高度m":
|
|||
|
|
ganTaData.m3GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "III回下相高度m":
|
|||
|
|
ganTaData.m3GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "IV回上相中距m":
|
|||
|
|
ganTaData.m4ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "IV回中相中距m":
|
|||
|
|
ganTaData.m4ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "IV回下相中距m":
|
|||
|
|
ganTaData.m4ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "IV回上相高度m":
|
|||
|
|
ganTaData.m4GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "IV回中相高度m":
|
|||
|
|
ganTaData.m4GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "IV回下相高度m":
|
|||
|
|
ganTaData.m4GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "小号侧档距":
|
|||
|
|
ganTaData.mXiaoHao_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "大号侧档距":
|
|||
|
|
ganTaData.mDaHao_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "电角度":
|
|||
|
|
ganTaData.mAngle_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "雷电流幅值a":
|
|||
|
|
ganTaData.mCurrent_a_GanTa = (flag3 ? 31.0 : num5);
|
|||
|
|
break;
|
|||
|
|
case "雷电流幅值b":
|
|||
|
|
ganTaData.mCurrent_b_GanTa = (flag3 ? 2.6 : num5);
|
|||
|
|
break;
|
|||
|
|
case "地面倾角1":
|
|||
|
|
ganTaData.mDMQJ1_GanTa = (flag3 ? 0.0 : num5);
|
|||
|
|
break;
|
|||
|
|
case "地面倾角2":
|
|||
|
|
ganTaData.mDMQJ2_GanTa = (flag3 ? 0.0 : num5);
|
|||
|
|
break;
|
|||
|
|
case "海拔m":
|
|||
|
|
ganTaData.mHaiBa_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "地形":
|
|||
|
|
ganTaData.mDiXing_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "地闪密度":
|
|||
|
|
ganTaData.mDSMD_GanTa = (flag3 ? 2.8 : num5);
|
|||
|
|
break;
|
|||
|
|
case "直线或耐张杆塔":
|
|||
|
|
ganTaData.mZXNZ_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case "绕击反击":
|
|||
|
|
ganTaData.mRaoJiFanJi_GanTa = num4;
|
|||
|
|
break;
|
|||
|
|
case "反击耐雷水平kA":
|
|||
|
|
ganTaData.mFJ_NLSP_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "反击跳闸率(次/100km.a)":
|
|||
|
|
ganTaData.mFJ_TZL_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "绕击耐雷水平kA":
|
|||
|
|
ganTaData.mRJ_NLSP_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "绕击跳闸率(次/100km.a)":
|
|||
|
|
ganTaData.mRJ_TZL_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case "雷击风险等级":
|
|||
|
|
ganTaData.mFXDJ_GanTa = num4;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else if (!flag)
|
|||
|
|
{
|
|||
|
|
for (num2 = 0; num2 < array2.Length; num2++)
|
|||
|
|
{
|
|||
|
|
flag3 = (flag4 = false);
|
|||
|
|
if (array2[num2] == null)
|
|||
|
|
{
|
|||
|
|
num4 = 0;
|
|||
|
|
num5 = 0.0;
|
|||
|
|
flag3 = (flag4 = true);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
num4 = Convert.ToInt32(array2[num2].Trim());
|
|||
|
|
}
|
|||
|
|
catch (Exception)
|
|||
|
|
{
|
|||
|
|
num4 = 1;
|
|||
|
|
flag4 = true;
|
|||
|
|
}
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
num5 = Convert.ToDouble(array2[num2].Trim());
|
|||
|
|
}
|
|||
|
|
catch (Exception)
|
|||
|
|
{
|
|||
|
|
num5 = 1.0;
|
|||
|
|
flag3 = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
switch (num2)
|
|||
|
|
{
|
|||
|
|
case 0:
|
|||
|
|
ganTaData.mXianLuID = num4;
|
|||
|
|
break;
|
|||
|
|
case 1:
|
|||
|
|
ganTaData.mIndex__GanTa = (flag4 ? desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count : num4);
|
|||
|
|
break;
|
|||
|
|
case 2:
|
|||
|
|
ganTaData.mXianLuName = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 3:
|
|||
|
|
ganTaData.mDYDJ_GanTa = num4;
|
|||
|
|
break;
|
|||
|
|
case 4:
|
|||
|
|
ganTaData.mID_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 5:
|
|||
|
|
ganTaData.mModel_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 6:
|
|||
|
|
ganTaData.mTaXing_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 7:
|
|||
|
|
ganTaData.mJingDu_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 8:
|
|||
|
|
ganTaData.mWeiDu_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 9:
|
|||
|
|
ganTaData.mXiangXu1_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 10:
|
|||
|
|
ganTaData.mXiangXu2_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 11:
|
|||
|
|
ganTaData.mXiangXu3_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 12:
|
|||
|
|
ganTaData.mXiangXu4_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 13:
|
|||
|
|
ganTaData.mBLQ_A_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 14:
|
|||
|
|
ganTaData.mBLQ_B_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 15:
|
|||
|
|
ganTaData.mBLQ_C_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 16:
|
|||
|
|
ganTaData.mJDDZ_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 17:
|
|||
|
|
ganTaData.mBLZJ_L_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 18:
|
|||
|
|
ganTaData.mBLZJ_R_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 19:
|
|||
|
|
ganTaData.mBLXGD_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 20:
|
|||
|
|
ganTaData.mJYZCD_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 21:
|
|||
|
|
ganTaData.mHuGao_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 22:
|
|||
|
|
ganTaData.m1ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 23:
|
|||
|
|
ganTaData.m1ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 24:
|
|||
|
|
ganTaData.m1ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 25:
|
|||
|
|
ganTaData.m1GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 26:
|
|||
|
|
ganTaData.m1GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 27:
|
|||
|
|
ganTaData.m1GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 28:
|
|||
|
|
ganTaData.m2ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 29:
|
|||
|
|
ganTaData.m2ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 30:
|
|||
|
|
ganTaData.m2ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 31:
|
|||
|
|
ganTaData.m2GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 32:
|
|||
|
|
ganTaData.m2GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 33:
|
|||
|
|
ganTaData.m2GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 34:
|
|||
|
|
ganTaData.m3ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 35:
|
|||
|
|
ganTaData.m3ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 36:
|
|||
|
|
ganTaData.m3ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 37:
|
|||
|
|
ganTaData.m3GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 38:
|
|||
|
|
ganTaData.m3GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 39:
|
|||
|
|
ganTaData.m3GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 40:
|
|||
|
|
ganTaData.m4ZJ_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 41:
|
|||
|
|
ganTaData.m4ZJ_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 42:
|
|||
|
|
ganTaData.m4ZJ_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 43:
|
|||
|
|
ganTaData.m4GD_Shang_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 44:
|
|||
|
|
ganTaData.m4GD_Zhong_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 45:
|
|||
|
|
ganTaData.m4GD_Xia_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 46:
|
|||
|
|
ganTaData.mXiaoHao_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 47:
|
|||
|
|
ganTaData.mDaHao_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 48:
|
|||
|
|
ganTaData.mAngle_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 49:
|
|||
|
|
ganTaData.mCurrent_a_GanTa = (flag3 ? 31.0 : num5);
|
|||
|
|
break;
|
|||
|
|
case 50:
|
|||
|
|
ganTaData.mCurrent_b_GanTa = (flag3 ? 2.6 : num5);
|
|||
|
|
break;
|
|||
|
|
case 51:
|
|||
|
|
ganTaData.mDMQJ1_GanTa = (flag3 ? 0.0 : num5);
|
|||
|
|
break;
|
|||
|
|
case 52:
|
|||
|
|
ganTaData.mDMQJ2_GanTa = (flag3 ? 0.0 : num5);
|
|||
|
|
break;
|
|||
|
|
case 53:
|
|||
|
|
ganTaData.mHaiBa_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 54:
|
|||
|
|
ganTaData.mDiXing_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 55:
|
|||
|
|
ganTaData.mDSMD_GanTa = (flag3 ? 2.8 : num5);
|
|||
|
|
break;
|
|||
|
|
case 56:
|
|||
|
|
ganTaData.mZXNZ_GanTa = array2[num2].Trim();
|
|||
|
|
break;
|
|||
|
|
case 57:
|
|||
|
|
ganTaData.mRaoJiFanJi_GanTa = num4;
|
|||
|
|
break;
|
|||
|
|
case 58:
|
|||
|
|
ganTaData.mFJ_NLSP_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 59:
|
|||
|
|
ganTaData.mFJ_TZL_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 60:
|
|||
|
|
ganTaData.mRJ_NLSP_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 61:
|
|||
|
|
ganTaData.mRJ_TZL_GanTa = num5;
|
|||
|
|
break;
|
|||
|
|
case 62:
|
|||
|
|
ganTaData.mFXDJ_GanTa = num4;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
ganTaData.mXianLuID = mXianLuData.mID_XianLu;
|
|||
|
|
ganTaData.mXianLuName = mXianLuData.mName_XianLu;
|
|||
|
|
desktop.mXL.mListGanTas[mIndex_ListXianLuData].Add1GanTaData(ganTaData);
|
|||
|
|
}
|
|||
|
|
streamReader2.Close();
|
|||
|
|
}
|
|||
|
|
fileStream2.Close();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex6)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs MyLoad_GanTas() 读文件异常=" + ex6.Message);
|
|||
|
|
MessageBox.Show(ex6.Message);
|
|||
|
|
}
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
desktop.mXL.Refresh_GanTaNumber_Label();
|
|||
|
|
MyRefresh_DGV();
|
|||
|
|
MyRefresh_Right();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex7)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs MyLoad_GanTas() 更新显示异常=" + ex7.Message);
|
|||
|
|
MessageBox.Show(ex7.Message);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
catch (Exception ex8)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs MyLoad_GanTas() 异常=" + ex8.Message);
|
|||
|
|
MessageBox.Show(ex8.Message);
|
|||
|
|
}
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void GetDataSet()
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
mOK_DataSet = false;
|
|||
|
|
if (!mOK_Index_ListXianLuData)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs GetDataSet() 线路名称无匹配:" + mXianLuData.mName_XianLu);
|
|||
|
|
MessageBox.Show("线路名称无匹配:" + mXianLuData.mName_XianLu);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (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);
|
|||
|
|
}
|
|||
|
|
mOK_DataSet = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs GetDataSet() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void buttonSave_GanTa_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mBusy)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mBusy = true;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
if (!mOK_Index_ListXianLuData)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonSave_GanTa_Click() 线路名称无匹配:" + mXianLuData.mName_XianLu);
|
|||
|
|
MessageBox.Show("线路名称无匹配:" + mXianLuData.mName_XianLu);
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count == 0)
|
|||
|
|
{
|
|||
|
|
MessageBox.Show("当前线路无杆塔数据可以导出!");
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
|||
|
|
saveFileDialog.InitialDirectory = Application.StartupPath;
|
|||
|
|
saveFileDialog.Filter = "所有文件*.*|*.*|Excel文件(*.csv)|*.csv|Txt文件(*.txt)|*.txt";
|
|||
|
|
saveFileDialog.FilterIndex = 2;
|
|||
|
|
if (saveFileDialog.ShowDialog(this) != DialogResult.OK)
|
|||
|
|
{
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mFileName = saveFileDialog.FileName;
|
|||
|
|
Thread thread = new Thread(MySave_GanTas);
|
|||
|
|
thread.Start();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonSave_GanTa_Click() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void MySave_GanTas()
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
int num = 0;
|
|||
|
|
bool flag = false;
|
|||
|
|
for (num = 0; num < desktop.mXL.mListXianLuData.Count; num++)
|
|||
|
|
{
|
|||
|
|
if (desktop.mXL.mListXianLuData[num].mName_XianLu.Equals(mXianLuData.mName_XianLu))
|
|||
|
|
{
|
|||
|
|
flag = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if (!flag)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonSave_GanTa_Click() MySave_GanTas() 未找到线路! " + mXianLuData.mName_XianLu);
|
|||
|
|
MessageBox.Show("未找到线路: " + mXianLuData.mName_XianLu);
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (!mOK_Index_ListXianLuData)
|
|||
|
|
{
|
|||
|
|
mOK_Index_ListXianLuData = true;
|
|||
|
|
}
|
|||
|
|
if (mIndex_ListXianLuData != num)
|
|||
|
|
{
|
|||
|
|
mIndex_ListXianLuData = num;
|
|||
|
|
}
|
|||
|
|
GanTaData ganTaData = null;
|
|||
|
|
int num2 = 0;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
using FileStream fileStream = new FileStream(mFileName, FileMode.Create, FileAccess.Write, FileShare.None);
|
|||
|
|
using (StreamWriter streamWriter = new StreamWriter(fileStream, Encoding.UTF8))
|
|||
|
|
{
|
|||
|
|
streamWriter.WriteLine("线路编号,序号,线路名称,电压等级,塔号,杆塔模型,塔形,经度,纬度,I回相序,II回相序,III回相序,IV回相序,A相是否安装避雷器,B相是否安装避雷器,C相是否安装避雷器,接地电阻,左避雷中距m,右避雷中距m,避雷线高度m,绝缘子串长度mm,杆塔呼高m,I回上相中距m,I回中相中距m,I回下相中距m,I回上相高度m,I回中相高度m,I回下相高度m,II回上相中距m,II回中相中距m,II回下相中距m,II回上相高度m,II回中相高度m,II回下相高度m,III回上相中距m,III回中相中距m,III回下相中距m,III回上相高度m,III回中相高度m,III回下相高度m,IV回上相中距m,IV回中相中距m,IV回下相中距m,IV回上相高度m,IV回中相高度m,IV回下相高度m,小号侧档距,大号侧档距,电角度,雷电流幅值a,雷电流幅值b,地面倾角1,地面倾角2,海拔m,地形,地闪密度,直线或耐张杆塔,绕击反击,反击耐雷水平kA,反击跳闸率(次/100km.a),绕击耐雷水平kA,绕击跳闸率(次/100km.a),雷击风险等级");
|
|||
|
|
if (desktop.mXL.mListGanTas[mIndex_ListXianLuData] != null && desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData != null && desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count > 0)
|
|||
|
|
{
|
|||
|
|
for (int i = 0; i < desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count; i++)
|
|||
|
|
{
|
|||
|
|
ganTaData = desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData[i];
|
|||
|
|
streamWriter.WriteLine(ganTaData.MyToString());
|
|||
|
|
num2++;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
streamWriter.Close();
|
|||
|
|
}
|
|||
|
|
fileStream.Close();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs MySave_GanTas() 写文件异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
}
|
|||
|
|
MessageBox.Show($"导出{num2}条杆塔数据。文件名{mFileName}");
|
|||
|
|
}
|
|||
|
|
catch (Exception ex2)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs MySave_GanTas() 异常=" + ex2.Message);
|
|||
|
|
MessageBox.Show(ex2.Message);
|
|||
|
|
}
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void buttonAppend_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mBusy)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mBusy = true;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
DialogResult dialogResult = DialogResult.No;
|
|||
|
|
dialogResult = desktop.mDlg_CreateGanTa.ShowDialog(this);
|
|||
|
|
if (dialogResult == DialogResult.OK)
|
|||
|
|
{
|
|||
|
|
int mIndexModel = desktop.mDlg_CreateGanTa.mIndexModel;
|
|||
|
|
GanTaData ganTaData = new GanTaData();
|
|||
|
|
ganTaData.mModel_GanTa = GanTas.mName_GanTaModels[mIndexModel];
|
|||
|
|
ganTaData.mXianLuID = mXianLuData.mID_XianLu;
|
|||
|
|
ganTaData.mXianLuName = mXianLuData.mName_XianLu;
|
|||
|
|
if (mIndex_ListXianLuData < 0 || mIndex_ListXianLuData >= desktop.mXL.mListXianLuData.Count)
|
|||
|
|
{
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
ganTaData.mRaoJiFanJi_GanTa = 3;
|
|||
|
|
ganTaData.mDSMD_GanTa = 2.8;
|
|||
|
|
ganTaData.mCurrent_a_GanTa = 31.0;
|
|||
|
|
ganTaData.mCurrent_b_GanTa = 2.6;
|
|||
|
|
ganTaData.mDMQJ1_GanTa = 0.0;
|
|||
|
|
ganTaData.mDMQJ2_GanTa = 0.0;
|
|||
|
|
desktop.mXL.mListGanTas[mIndex_ListXianLuData].Add1GanTaData(ganTaData);
|
|||
|
|
desktop.mXL.Refresh_GanTaNumber_Label();
|
|||
|
|
MyRefresh_DGV();
|
|||
|
|
MySet_Form_Title(this, $"{mXianLuData.mName_XianLu}({mXianLuData.mHuiLuNo_XianLu}) (共{mXianLuData.mGanTaNumber_XianLu}个杆塔)");
|
|||
|
|
MyRefresh_Right();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonAppend_Click() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
}
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void buttonDelete_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mBusy)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mBusy = true;
|
|||
|
|
if (desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count == 0)
|
|||
|
|
{
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (mDGV_Index < 0)
|
|||
|
|
{
|
|||
|
|
MessageBox.Show("未选中杆塔!");
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (mDGV_Index >= desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count)
|
|||
|
|
{
|
|||
|
|
MessageBox.Show("无效杆塔下标!");
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.RemoveAt(mDGV_Index);
|
|||
|
|
if (mDGV_Index >= desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData.Count)
|
|||
|
|
{
|
|||
|
|
mDGV_Index = -1;
|
|||
|
|
}
|
|||
|
|
desktop.mXL.Refresh_GanTaNumber_Label();
|
|||
|
|
MyRefresh_DGV();
|
|||
|
|
MySet_Form_Title(this, $"{mXianLuData.mName_XianLu}({mXianLuData.mHuiLuNo_XianLu}) (共{mXianLuData.mGanTaNumber_XianLu}个杆塔)");
|
|||
|
|
MyRefresh_Right();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs buttonDelete_Click() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
}
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void dataGridView_Ganta_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mBusy)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mBusy = true;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
int rowIndex = e.RowIndex;
|
|||
|
|
if (rowIndex < 0)
|
|||
|
|
{
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mDGV_Index = e.RowIndex;
|
|||
|
|
MyRefresh_Right();
|
|||
|
|
desktop.mTheGanTaData.CopyFrom_GanTaData(desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData[mDGV_Index]);
|
|||
|
|
DialogResult dialogResult = DialogResult.None;
|
|||
|
|
if (mDS.Tables[0].Rows[mDGV_Index]["塔形"].ToString().ToLower().IndexOf("guxing") >= 0)
|
|||
|
|
{
|
|||
|
|
dialogResult = desktop.mDlg_GanTa_2Hui.ShowDialog(this);
|
|||
|
|
}
|
|||
|
|
else if (mXianLuData.mHuiLuNo_XianLu == 1)
|
|||
|
|
{
|
|||
|
|
dialogResult = desktop.mDlg_GanTa_1Hui.ShowDialog(this);
|
|||
|
|
}
|
|||
|
|
else if (mXianLuData.mHuiLuNo_XianLu == 2)
|
|||
|
|
{
|
|||
|
|
dialogResult = desktop.mDlg_GanTa_2Hui.ShowDialog(this);
|
|||
|
|
}
|
|||
|
|
else if (mXianLuData.mHuiLuNo_XianLu == 4)
|
|||
|
|
{
|
|||
|
|
dialogResult = desktop.mDlg_GanTa_4Hui.ShowDialog(this);
|
|||
|
|
}
|
|||
|
|
else if (mXianLuData.mJLZL_XianLu.Equals("直流"))
|
|||
|
|
{
|
|||
|
|
dialogResult = desktop.mDlg_GanTa_0zhiliu.ShowDialog(this);
|
|||
|
|
}
|
|||
|
|
if (dialogResult != DialogResult.OK)
|
|||
|
|
{
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
desktop.mXL.mListGanTas[mIndex_ListXianLuData].mListGanTaData[mDGV_Index].CopyFrom_GanTaData(desktop.mTheGanTaData);
|
|||
|
|
MyRefresh_DGV();
|
|||
|
|
MyRefresh_Right();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs dataGridView_GanTa_CellDoubleClick() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
}
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void dataGridView_Ganta_CellClick(object sender, DataGridViewCellEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (mBusy)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mBusy = true;
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
int rowIndex = e.RowIndex;
|
|||
|
|
if (rowIndex < 0)
|
|||
|
|
{
|
|||
|
|
mBusy = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
mDGV_Index = e.RowIndex;
|
|||
|
|
MyRefresh_Right();
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
MyLog.AddLog("FormGanTaList.cs dataGridView_Ganta_CellClick() 异常=" + ex.Message);
|
|||
|
|
MessageBox.Show(ex.Message);
|
|||
|
|
}
|
|||
|
|
mBusy = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void Destroy()
|
|||
|
|
{
|
|||
|
|
if (mDS != null)
|
|||
|
|
{
|
|||
|
|
if (mDS.Tables.Count > 0)
|
|||
|
|
{
|
|||
|
|
mDS.Tables[0].Clear();
|
|||
|
|
}
|
|||
|
|
mDS.Tables.Clear();
|
|||
|
|
mDS.Clear();
|
|||
|
|
mDS = null;
|
|||
|
|
}
|
|||
|
|
if (mXianLuData != null)
|
|||
|
|
{
|
|||
|
|
mXianLuData.Destroy();
|
|||
|
|
}
|
|||
|
|
mXianLuData = null;
|
|||
|
|
desktop = null;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void MySet_Form_Title(Form form, string value)
|
|||
|
|
{
|
|||
|
|
if (form.InvokeRequired)
|
|||
|
|
{
|
|||
|
|
delegateFormTitle method = MySet_Form_Title;
|
|||
|
|
form.Invoke(method, form, value);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
form.Text = mTitle + " " + value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void MySet_DataGridView_DataSource(DataGridView dataGridView, DataView value)
|
|||
|
|
{
|
|||
|
|
if (dataGridView.InvokeRequired)
|
|||
|
|
{
|
|||
|
|
delegateDataGridViewDataSource method = MySet_DataGridView_DataSource;
|
|||
|
|
dataGridView.Invoke(method, dataGridView, value);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
dataGridView.DataSource = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void MySet_GroupBox_Visible(GroupBox groupBox, bool value)
|
|||
|
|
{
|
|||
|
|
if (groupBox.InvokeRequired)
|
|||
|
|
{
|
|||
|
|
delegateGroupBoxVisible method = MySet_GroupBox_Visible;
|
|||
|
|
groupBox.Invoke(method, groupBox, value);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
groupBox.Visible = 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.panelGanTaList_Form = new System.Windows.Forms.Panel();
|
|||
|
|
this.panel1 = new System.Windows.Forms.Panel();
|
|||
|
|
this.panelList = new System.Windows.Forms.Panel();
|
|||
|
|
this.dataGridView_Ganta = new System.Windows.Forms.DataGridView();
|
|||
|
|
this.panelDetail = new System.Windows.Forms.Panel();
|
|||
|
|
this.groupBox_GanTa = new System.Windows.Forms.GroupBox();
|
|||
|
|
this.textBox_GD_Shang = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_GD_Xia = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_ZJ_Xia = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_GD_Zhong = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_ZJ_Zhong = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_ZJ_Shang = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_BLXGD = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_BLZJ_R = new System.Windows.Forms.TextBox();
|
|||
|
|
this.textBox_BLZJ_L = new System.Windows.Forms.TextBox();
|
|||
|
|
this.label2 = new System.Windows.Forms.Label();
|
|||
|
|
this.label8 = new System.Windows.Forms.Label();
|
|||
|
|
this.label7 = new System.Windows.Forms.Label();
|
|||
|
|
this.label6 = new System.Windows.Forms.Label();
|
|||
|
|
this.label5 = new System.Windows.Forms.Label();
|
|||
|
|
this.label4 = new System.Windows.Forms.Label();
|
|||
|
|
this.label3 = new System.Windows.Forms.Label();
|
|||
|
|
this.label9 = new System.Windows.Forms.Label();
|
|||
|
|
this.label1 = new System.Windows.Forms.Label();
|
|||
|
|
this.pictureBox_GanTa = new System.Windows.Forms.PictureBox();
|
|||
|
|
this.panelButtons = new System.Windows.Forms.Panel();
|
|||
|
|
this.buttonDelete = new System.Windows.Forms.Button();
|
|||
|
|
this.buttonAppend = new System.Windows.Forms.Button();
|
|||
|
|
this.buttonSave_GanTa = new System.Windows.Forms.Button();
|
|||
|
|
this.buttonLoad_GanTa = new System.Windows.Forms.Button();
|
|||
|
|
this.panelGanTaList_Form.SuspendLayout();
|
|||
|
|
this.panelList.SuspendLayout();
|
|||
|
|
((System.ComponentModel.ISupportInitialize)this.dataGridView_Ganta).BeginInit();
|
|||
|
|
this.panelDetail.SuspendLayout();
|
|||
|
|
this.groupBox_GanTa.SuspendLayout();
|
|||
|
|
((System.ComponentModel.ISupportInitialize)this.pictureBox_GanTa).BeginInit();
|
|||
|
|
this.panelButtons.SuspendLayout();
|
|||
|
|
base.SuspendLayout();
|
|||
|
|
this.panelGanTaList_Form.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
|||
|
|
this.panelGanTaList_Form.Controls.Add(this.panel1);
|
|||
|
|
this.panelGanTaList_Form.Controls.Add(this.panelList);
|
|||
|
|
this.panelGanTaList_Form.Controls.Add(this.panelDetail);
|
|||
|
|
this.panelGanTaList_Form.Controls.Add(this.panelButtons);
|
|||
|
|
this.panelGanTaList_Form.Dock = System.Windows.Forms.DockStyle.Fill;
|
|||
|
|
this.panelGanTaList_Form.Location = new System.Drawing.Point(0, 0);
|
|||
|
|
this.panelGanTaList_Form.Name = "panelGanTaList_Form";
|
|||
|
|
this.panelGanTaList_Form.Size = new System.Drawing.Size(1227, 585);
|
|||
|
|
this.panelGanTaList_Form.TabIndex = 0;
|
|||
|
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
|
|||
|
|
this.panel1.Location = new System.Drawing.Point(979, 41);
|
|||
|
|
this.panel1.Name = "panel1";
|
|||
|
|
this.panel1.Size = new System.Drawing.Size(10, 542);
|
|||
|
|
this.panel1.TabIndex = 3;
|
|||
|
|
this.panelList.Controls.Add(this.dataGridView_Ganta);
|
|||
|
|
this.panelList.Dock = System.Windows.Forms.DockStyle.Fill;
|
|||
|
|
this.panelList.Location = new System.Drawing.Point(0, 41);
|
|||
|
|
this.panelList.Margin = new System.Windows.Forms.Padding(10);
|
|||
|
|
this.panelList.Name = "panelList";
|
|||
|
|
this.panelList.Size = new System.Drawing.Size(989, 542);
|
|||
|
|
this.panelList.TabIndex = 2;
|
|||
|
|
this.dataGridView_Ganta.AllowUserToAddRows = false;
|
|||
|
|
this.dataGridView_Ganta.AllowUserToDeleteRows = false;
|
|||
|
|
this.dataGridView_Ganta.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText;
|
|||
|
|
this.dataGridView_Ganta.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|||
|
|
this.dataGridView_Ganta.Dock = System.Windows.Forms.DockStyle.Fill;
|
|||
|
|
this.dataGridView_Ganta.Location = new System.Drawing.Point(0, 0);
|
|||
|
|
this.dataGridView_Ganta.Name = "dataGridView_Ganta";
|
|||
|
|
this.dataGridView_Ganta.RowTemplate.Height = 23;
|
|||
|
|
this.dataGridView_Ganta.Size = new System.Drawing.Size(989, 542);
|
|||
|
|
this.dataGridView_Ganta.TabIndex = 0;
|
|||
|
|
this.dataGridView_Ganta.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(dataGridView_Ganta_CellClick);
|
|||
|
|
this.dataGridView_Ganta.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(dataGridView_Ganta_CellDoubleClick);
|
|||
|
|
this.panelDetail.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
|||
|
|
this.panelDetail.Controls.Add(this.groupBox_GanTa);
|
|||
|
|
this.panelDetail.Controls.Add(this.pictureBox_GanTa);
|
|||
|
|
this.panelDetail.Dock = System.Windows.Forms.DockStyle.Right;
|
|||
|
|
this.panelDetail.Location = new System.Drawing.Point(989, 41);
|
|||
|
|
this.panelDetail.Name = "panelDetail";
|
|||
|
|
this.panelDetail.Size = new System.Drawing.Size(236, 542);
|
|||
|
|
this.panelDetail.TabIndex = 1;
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_GD_Shang);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_GD_Xia);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_ZJ_Xia);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_GD_Zhong);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_ZJ_Zhong);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_ZJ_Shang);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_BLXGD);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_BLZJ_R);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.textBox_BLZJ_L);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label2);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label8);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label7);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label6);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label5);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label4);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label3);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label9);
|
|||
|
|
this.groupBox_GanTa.Controls.Add(this.label1);
|
|||
|
|
this.groupBox_GanTa.Location = new System.Drawing.Point(4, 267);
|
|||
|
|
this.groupBox_GanTa.Name = "groupBox_GanTa";
|
|||
|
|
this.groupBox_GanTa.Size = new System.Drawing.Size(227, 271);
|
|||
|
|
this.groupBox_GanTa.TabIndex = 1;
|
|||
|
|
this.groupBox_GanTa.TabStop = false;
|
|||
|
|
this.groupBox_GanTa.Text = "杆塔结构参数";
|
|||
|
|
this.textBox_GD_Shang.Location = new System.Drawing.Point(126, 129);
|
|||
|
|
this.textBox_GD_Shang.Name = "textBox_GD_Shang";
|
|||
|
|
this.textBox_GD_Shang.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_GD_Shang.TabIndex = 1;
|
|||
|
|
this.textBox_GD_Xia.Location = new System.Drawing.Point(126, 237);
|
|||
|
|
this.textBox_GD_Xia.Name = "textBox_GD_Xia";
|
|||
|
|
this.textBox_GD_Xia.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_GD_Xia.TabIndex = 1;
|
|||
|
|
this.textBox_ZJ_Xia.Location = new System.Drawing.Point(126, 210);
|
|||
|
|
this.textBox_ZJ_Xia.Name = "textBox_ZJ_Xia";
|
|||
|
|
this.textBox_ZJ_Xia.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_ZJ_Xia.TabIndex = 1;
|
|||
|
|
this.textBox_GD_Zhong.Location = new System.Drawing.Point(126, 183);
|
|||
|
|
this.textBox_GD_Zhong.Name = "textBox_GD_Zhong";
|
|||
|
|
this.textBox_GD_Zhong.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_GD_Zhong.TabIndex = 1;
|
|||
|
|
this.textBox_ZJ_Zhong.Location = new System.Drawing.Point(126, 156);
|
|||
|
|
this.textBox_ZJ_Zhong.Name = "textBox_ZJ_Zhong";
|
|||
|
|
this.textBox_ZJ_Zhong.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_ZJ_Zhong.TabIndex = 1;
|
|||
|
|
this.textBox_ZJ_Shang.Location = new System.Drawing.Point(126, 102);
|
|||
|
|
this.textBox_ZJ_Shang.Name = "textBox_ZJ_Shang";
|
|||
|
|
this.textBox_ZJ_Shang.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_ZJ_Shang.TabIndex = 1;
|
|||
|
|
this.textBox_BLXGD.Location = new System.Drawing.Point(142, 75);
|
|||
|
|
this.textBox_BLXGD.Name = "textBox_BLXGD";
|
|||
|
|
this.textBox_BLXGD.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_BLXGD.TabIndex = 1;
|
|||
|
|
this.textBox_BLZJ_R.Location = new System.Drawing.Point(142, 48);
|
|||
|
|
this.textBox_BLZJ_R.Name = "textBox_BLZJ_R";
|
|||
|
|
this.textBox_BLZJ_R.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_BLZJ_R.TabIndex = 1;
|
|||
|
|
this.textBox_BLZJ_L.Location = new System.Drawing.Point(142, 21);
|
|||
|
|
this.textBox_BLZJ_L.Name = "textBox_BLZJ_L";
|
|||
|
|
this.textBox_BLZJ_L.Size = new System.Drawing.Size(78, 21);
|
|||
|
|
this.textBox_BLZJ_L.TabIndex = 1;
|
|||
|
|
this.label2.AutoSize = true;
|
|||
|
|
this.label2.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label2.Location = new System.Drawing.Point(8, 80);
|
|||
|
|
this.label2.Name = "label2";
|
|||
|
|
this.label2.Size = new System.Drawing.Size(128, 16);
|
|||
|
|
this.label2.TabIndex = 0;
|
|||
|
|
this.label2.Text = "避雷线高度(m):";
|
|||
|
|
this.label8.AutoSize = true;
|
|||
|
|
this.label8.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label8.Location = new System.Drawing.Point(8, 242);
|
|||
|
|
this.label8.Name = "label8";
|
|||
|
|
this.label8.Size = new System.Drawing.Size(112, 16);
|
|||
|
|
this.label8.TabIndex = 0;
|
|||
|
|
this.label8.Text = "下相高度(m):";
|
|||
|
|
this.label7.AutoSize = true;
|
|||
|
|
this.label7.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label7.Location = new System.Drawing.Point(8, 215);
|
|||
|
|
this.label7.Name = "label7";
|
|||
|
|
this.label7.Size = new System.Drawing.Size(112, 16);
|
|||
|
|
this.label7.TabIndex = 0;
|
|||
|
|
this.label7.Text = "下相中距(m):";
|
|||
|
|
this.label6.AutoSize = true;
|
|||
|
|
this.label6.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label6.Location = new System.Drawing.Point(8, 188);
|
|||
|
|
this.label6.Name = "label6";
|
|||
|
|
this.label6.Size = new System.Drawing.Size(112, 16);
|
|||
|
|
this.label6.TabIndex = 0;
|
|||
|
|
this.label6.Text = "中相高度(m):";
|
|||
|
|
this.label5.AutoSize = true;
|
|||
|
|
this.label5.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label5.Location = new System.Drawing.Point(8, 161);
|
|||
|
|
this.label5.Name = "label5";
|
|||
|
|
this.label5.Size = new System.Drawing.Size(112, 16);
|
|||
|
|
this.label5.TabIndex = 0;
|
|||
|
|
this.label5.Text = "中相中距(m):";
|
|||
|
|
this.label4.AutoSize = true;
|
|||
|
|
this.label4.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label4.Location = new System.Drawing.Point(8, 134);
|
|||
|
|
this.label4.Name = "label4";
|
|||
|
|
this.label4.Size = new System.Drawing.Size(112, 16);
|
|||
|
|
this.label4.TabIndex = 0;
|
|||
|
|
this.label4.Text = "上相高度(m):";
|
|||
|
|
this.label3.AutoSize = true;
|
|||
|
|
this.label3.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label3.Location = new System.Drawing.Point(8, 107);
|
|||
|
|
this.label3.Name = "label3";
|
|||
|
|
this.label3.Size = new System.Drawing.Size(112, 16);
|
|||
|
|
this.label3.TabIndex = 0;
|
|||
|
|
this.label3.Text = "上相中距(m):";
|
|||
|
|
this.label9.AutoSize = true;
|
|||
|
|
this.label9.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label9.Location = new System.Drawing.Point(8, 53);
|
|||
|
|
this.label9.Name = "label9";
|
|||
|
|
this.label9.Size = new System.Drawing.Size(128, 16);
|
|||
|
|
this.label9.TabIndex = 0;
|
|||
|
|
this.label9.Text = "右避雷线中距(m)";
|
|||
|
|
this.label1.AutoSize = true;
|
|||
|
|
this.label1.Font = new System.Drawing.Font("宋体", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.label1.Location = new System.Drawing.Point(8, 26);
|
|||
|
|
this.label1.Name = "label1";
|
|||
|
|
this.label1.Size = new System.Drawing.Size(128, 16);
|
|||
|
|
this.label1.TabIndex = 0;
|
|||
|
|
this.label1.Text = "左避雷线中距(m)";
|
|||
|
|
this.pictureBox_GanTa.Dock = System.Windows.Forms.DockStyle.Top;
|
|||
|
|
this.pictureBox_GanTa.Location = new System.Drawing.Point(0, 0);
|
|||
|
|
this.pictureBox_GanTa.Name = "pictureBox_GanTa";
|
|||
|
|
this.pictureBox_GanTa.Size = new System.Drawing.Size(234, 263);
|
|||
|
|
this.pictureBox_GanTa.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
|||
|
|
this.pictureBox_GanTa.TabIndex = 0;
|
|||
|
|
this.pictureBox_GanTa.TabStop = false;
|
|||
|
|
this.panelButtons.Controls.Add(this.buttonDelete);
|
|||
|
|
this.panelButtons.Controls.Add(this.buttonAppend);
|
|||
|
|
this.panelButtons.Controls.Add(this.buttonSave_GanTa);
|
|||
|
|
this.panelButtons.Controls.Add(this.buttonLoad_GanTa);
|
|||
|
|
this.panelButtons.Dock = System.Windows.Forms.DockStyle.Top;
|
|||
|
|
this.panelButtons.Location = new System.Drawing.Point(0, 0);
|
|||
|
|
this.panelButtons.Name = "panelButtons";
|
|||
|
|
this.panelButtons.Size = new System.Drawing.Size(1225, 41);
|
|||
|
|
this.panelButtons.TabIndex = 0;
|
|||
|
|
this.buttonDelete.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.buttonDelete.Location = new System.Drawing.Point(374, 3);
|
|||
|
|
this.buttonDelete.Name = "buttonDelete";
|
|||
|
|
this.buttonDelete.Size = new System.Drawing.Size(115, 35);
|
|||
|
|
this.buttonDelete.TabIndex = 1;
|
|||
|
|
this.buttonDelete.Text = "删除";
|
|||
|
|
this.buttonDelete.UseVisualStyleBackColor = true;
|
|||
|
|
this.buttonDelete.Click += new System.EventHandler(buttonDelete_Click);
|
|||
|
|
this.buttonAppend.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.buttonAppend.Location = new System.Drawing.Point(253, 3);
|
|||
|
|
this.buttonAppend.Name = "buttonAppend";
|
|||
|
|
this.buttonAppend.Size = new System.Drawing.Size(115, 35);
|
|||
|
|
this.buttonAppend.TabIndex = 1;
|
|||
|
|
this.buttonAppend.Text = "添加";
|
|||
|
|
this.buttonAppend.UseVisualStyleBackColor = true;
|
|||
|
|
this.buttonAppend.Click += new System.EventHandler(buttonAppend_Click);
|
|||
|
|
this.buttonSave_GanTa.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.buttonSave_GanTa.Location = new System.Drawing.Point(132, 3);
|
|||
|
|
this.buttonSave_GanTa.Name = "buttonSave_GanTa";
|
|||
|
|
this.buttonSave_GanTa.Size = new System.Drawing.Size(115, 35);
|
|||
|
|
this.buttonSave_GanTa.TabIndex = 1;
|
|||
|
|
this.buttonSave_GanTa.Text = "导出";
|
|||
|
|
this.buttonSave_GanTa.UseVisualStyleBackColor = true;
|
|||
|
|
this.buttonSave_GanTa.Click += new System.EventHandler(buttonSave_GanTa_Click);
|
|||
|
|
this.buttonLoad_GanTa.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134);
|
|||
|
|
this.buttonLoad_GanTa.Location = new System.Drawing.Point(11, 3);
|
|||
|
|
this.buttonLoad_GanTa.Name = "buttonLoad_GanTa";
|
|||
|
|
this.buttonLoad_GanTa.Size = new System.Drawing.Size(115, 35);
|
|||
|
|
this.buttonLoad_GanTa.TabIndex = 1;
|
|||
|
|
this.buttonLoad_GanTa.Text = "导入";
|
|||
|
|
this.buttonLoad_GanTa.UseVisualStyleBackColor = true;
|
|||
|
|
this.buttonLoad_GanTa.Click += new System.EventHandler(buttonLoad_GanTa_Click);
|
|||
|
|
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
|
|||
|
|
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|||
|
|
base.ClientSize = new System.Drawing.Size(1227, 585);
|
|||
|
|
base.Controls.Add(this.panelGanTaList_Form);
|
|||
|
|
base.Name = "FormGanTaList";
|
|||
|
|
base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|||
|
|
this.Text = "FormGanTaList";
|
|||
|
|
base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(FormGanTaList_FormClosing);
|
|||
|
|
base.Load += new System.EventHandler(FormGanTaList_Load);
|
|||
|
|
this.panelGanTaList_Form.ResumeLayout(false);
|
|||
|
|
this.panelList.ResumeLayout(false);
|
|||
|
|
((System.ComponentModel.ISupportInitialize)this.dataGridView_Ganta).EndInit();
|
|||
|
|
this.panelDetail.ResumeLayout(false);
|
|||
|
|
this.groupBox_GanTa.ResumeLayout(false);
|
|||
|
|
this.groupBox_GanTa.PerformLayout();
|
|||
|
|
((System.ComponentModel.ISupportInitialize)this.pictureBox_GanTa).EndInit();
|
|||
|
|
this.panelButtons.ResumeLayout(false);
|
|||
|
|
base.ResumeLayout(false);
|
|||
|
|
}
|
|||
|
|
}
|