using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.IO; using System.Threading; using System.Windows.Forms; using AxMapWinGIS; using MapWinGIS; namespace LP; public class FormDesktop : Form { private delegate void delegateFormTitle(Form form, string value); private delegate void delegateFormSendTaskData(Form form, TaskData value); private delegate void delegateLabelText(System.Windows.Forms.Label label, string value); private delegate void delegateButtonEnabled(Button button, bool value); private delegate void dltFlowlayoutAddControl(FlowLayoutPanel flowLayoutPanel, Control value); private string mTitle = ""; private bool mAfterInit = false; public bool mBusy_Start = false; private tkCursorMode mDefault_CursorMode = tkCursorMode.cmNone; public XianLu mXL = null; public Task mTask = null; public MySignal mSignal = null; public MyFunction mFunc = null; public All_CanShuFenJi mAll_CanShuFenJi = null; public FormCreateXianLu mDlg_CreateXianLu = null; public FormGanTaList mDlg_GanTaList = null; public FormCreateGanTa mDlg_CreateGanTa = null; public FormGanTa0zhiliu mDlg_GanTa_0zhiliu = null; public FormGanTa1Hui mDlg_GanTa_1Hui = null; public FormGanTa2Hui mDlg_GanTa_2Hui = null; public FormGanTa4Hui mDlg_GanTa_4Hui = null; public FormCanShuJiSuan mDlg_CanShuJiSuan = null; public FormCurrent mDlg_Current = null; public FormDiShanMiDu mDlg_DiShanMiDu = null; public FormDiMianQingJiao mDlg_DiMainQingJiao = null; public FormFangLeiJiSuan mDlg_FangLeiJiSuan = null; public FormFangLeiGaiZao mDlg_FangLeiGaiZao = null; public Form_PuTongJiSuan mDlg_PuTongJiSuan = null; public Form_GJSZ_PuTongJiSuan mDlg_GJSZ_PuTongJiSuan = null; public Form_TongTiaoJiSuan mDlg_TongTiaoJiSuan = null; public Form4_FengXianPingGu mDlg_4FengXianPingGu = null; public Form5_CuoShiTuiJian mDlg_5CuoShiTuiJian = null; public Form_GaoFengXianYuanYin mDlg_GaoFengXianYuanYin = null; public FormLook1PuTongJiSuan mDlgLook1_PuTongJiSuan = null; public FormLook2FengXianPingGu mDlgLook2FengXianPingGu = null; public FormLook3CuoShiTuiJian mDlgLook3CuoShiTuiJian = null; public Form7_GuZhangFuXian mDlg_7GuZhangFuXian = null; public Form6_ReportTask mDlg_6ReportTask = null; public XianLuData mTheXianLuData = null; public GanTaData mTheGanTaData = null; public TaskData mTheTaskData = null; public TaskData mGaiZao_TaskData = null; public TaskData mAddTaskData = null; public TaskData m4TaskData_FengXianPingGu = null; public TaskData m5TaskData_CuoShiTuiJian = null; public TaskData mRightTaskData = null; public TaskData m6TaskData_Report = null; public XianLuData mRightXianLuData = null; public TaskGroup mRightGroup = null; public FuXian mFuXian = null; public int mIndex_ListControl = -1; public int mNo_ListControl = 0; public MyReport mReport = null; public Thread mThread = null; public DisplayAllXianLu mDisplayAllXianLu = null; public static readonly string mSubPath_Primary = "Primary"; public string mSubPath_ATP_Setting = "SettingTxtFile"; public AxMap mAxMap = null; private IContainer components = null; private Panel panelCenter; private FlowLayoutPanel flowLayoutPanel_TopButtons; private Button buttonCreateXianLu; private Button buttonReport; private Button buttonFangLeiGaiZao; private Button buttonLightningProofCompute; private Button buttonCanShuJiSuan; private FlowLayoutPanel flowLayoutPanel_LeftListXianLu; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label_Num_GanTa; private System.Windows.Forms.Label label_DYDJ_L; private System.Windows.Forms.Label label_AC_DC_L; private System.Windows.Forms.Label label_NameXianLu_L; private FlowLayoutPanel flowLayoutPanel_RightListTask; private System.Windows.Forms.Label label2; private Panel panel_XianLu; private Panel panel_Task; private System.Windows.Forms.Label label_NameXianLu_R; private System.Windows.Forms.Label label_DYDJ_R; private System.Windows.Forms.Label label_AC_DC_R; private Button buttonLook; private Button buttonStart; private System.Windows.Forms.Label label_NameTask; private AxMap axMap; private Panel panelDesktop; private Button buttonRepeat; private CheckBox checkBox_XianLu; private ContextMenuStrip contextMenuStrip_Left; private ToolStripMenuItem toolStripMenuItem1; private ToolStripMenuItem toolStripMenuItem2; private ContextMenuStrip contextMenuStrip_Right; private ToolStripMenuItem toolStripMenuItem3; private Button button1; private MenuStrip menuStrip1; private ToolStripMenuItem 详情ToolStripMenuItem; private ToolStripMenuItem 线路详情ToolStripMenuItem1; private ToolStripMenuItem 线路删除ToolStripMenuItem; private ToolStripMenuItem toolStripMenuItem4; private ToolStripMenuItem 任务删除ToolStripMenuItem; public FormDesktop() { InitializeComponent(); string path = Application.StartupPath + "\\" + mSubPath_Primary; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } path = Application.StartupPath + "\\" + mSubPath_ATP_Setting; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } mIndex_ListControl = -1; mNo_ListControl = 0; if (m4TaskData_FengXianPingGu == null) { m4TaskData_FengXianPingGu = new TaskData(); } m4TaskData_FengXianPingGu.mID_Task = -1; if (m5TaskData_CuoShiTuiJian == null) { m5TaskData_CuoShiTuiJian = new TaskData(); } m5TaskData_CuoShiTuiJian.mID_Task = -1; if (m6TaskData_Report == null) { m6TaskData_Report = new TaskData(); } m6TaskData_Report.mID_Task = -1; } private void FormDesktop_Load(object sender, EventArgs e) { mAfterInit = false; MyLog.Init_Log(); MyLog.Load_Log(Application.StartupPath + "\\" + mSubPath_Primary); mTitle = "XX输电线路综合一体化防雷软件"; CenterToScreen(); if (mAxMap == null) { mAxMap = axMap; } checkBox_XianLu.Tag = 1; mDefault_CursorMode = mAxMap.CursorMode; MySetFormTitle(this, Application.StartupPath); if (mFunc == null) { mFunc = new MyFunction(); } mFunc.desktop = this; if (mSignal == null) { mSignal = new MySignal(); } mSignal.MyLoad_Setting(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_Setting.txt"); if (!mSignal.mNeed_PrepareParameters_setting) { buttonCanShuJiSuan.Visible = false; } panel_XianLu.Visible = false; panel_Task.Visible = false; Init_Map_Object(); if (mDisplayAllXianLu == null) { mDisplayAllXianLu = new DisplayAllXianLu(); } if (mXL == null) { mXL = new XianLu(); } if (mXL.mRQ == null) { mXL.MySet_RongQi(flowLayoutPanel_LeftListXianLu); } if (mXL.mPanel1st == null) { mXL.MySet_Control1st(panel_XianLu, label_NameXianLu_L, label_AC_DC_L, label_DYDJ_L, label_Num_GanTa, checkBox_XianLu); } mXL.MyClear_ListXianLu(); if (mSignal.mLoadXianLu_setting) { MyXianLu_LoadFromFile(); } if (!mSignal.mLoadXianLu_setting) { MyXianLu_InitForTest(); } for (int i = 0; i < mXL.mListXianLuControl.Count; i++) { mXL.mListXianLuControl[i].mShow_XianLu_CheckBox.CheckedChanged += checkBox_XianLu_CheckedChanged; } if (mSignal.mLoadGanTa_setting) { MyGanTa_LoadFromFile(); } if (mTask == null) { mTask = new Task(); } mTask.desktop = this; if (mTask.mRQ == null) { mTask.MySet_RongQi(flowLayoutPanel_RightListTask); } if (mTask.mPanel1st == null) { mTask.MySet_Control1st(panel_Task, buttonStart, buttonLook, label_NameTask, label_NameXianLu_R, label_AC_DC_R, label_DYDJ_R); } mTask.MyClear_ListTask(); if (mAll_CanShuFenJi == null) { mAll_CanShuFenJi = new All_CanShuFenJi(); } if (mSignal.mLoadTask_setting) { MyTask_LoadFromFile(); } if (!mSignal.mLoadTask_setting) { MyTask_InitForTest(); } if (mSignal.mLoadExTask_setting) { mTask.MyLoadExTask(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_ExTask.txt"); } if (mSignal.mLoadTGanTa_setting) { MyTGanTa_LoadFromFile(); } if (mSignal.mLoadCanShuFenJi_setting) { mAll_CanShuFenJi.MyLoadCanShuFenJi(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_CanShuFenJi.txt"); } if (mFuXian == null) { mFuXian = new FuXian(); } MyRefresh_ToolStripMenuItem(); if (mDlg_CreateXianLu == null) { mDlg_CreateXianLu = new FormCreateXianLu(); } mDlg_CreateXianLu.desktop = this; if (mDlg_GanTaList == null) { mDlg_GanTaList = new FormGanTaList(); } mDlg_GanTaList.desktop = this; if (mDlg_CreateGanTa == null) { mDlg_CreateGanTa = new FormCreateGanTa(); } mDlg_CreateGanTa.desktop = this; if (mDlg_GanTa_0zhiliu == null) { mDlg_GanTa_0zhiliu = new FormGanTa0zhiliu(); } mDlg_GanTa_0zhiliu.desktop = this; if (mDlg_GanTa_1Hui == null) { mDlg_GanTa_1Hui = new FormGanTa1Hui(); } mDlg_GanTa_1Hui.desktop = this; if (mDlg_GanTa_2Hui == null) { mDlg_GanTa_2Hui = new FormGanTa2Hui(); } mDlg_GanTa_2Hui.desktop = this; if (mDlg_GanTa_4Hui == null) { mDlg_GanTa_4Hui = new FormGanTa4Hui(); } mDlg_GanTa_4Hui.desktop = this; if (mDlg_CanShuJiSuan == null) { mDlg_CanShuJiSuan = new FormCanShuJiSuan(); } mDlg_CanShuJiSuan.desktop = this; if (mDlg_Current == null) { mDlg_Current = new FormCurrent(); } mDlg_Current.desktop = this; if (mDlg_DiShanMiDu == null) { mDlg_DiShanMiDu = new FormDiShanMiDu(); } mDlg_DiShanMiDu.desktop = this; if (mDlg_DiMainQingJiao == null) { mDlg_DiMainQingJiao = new FormDiMianQingJiao(); } mDlg_DiMainQingJiao.desktop = this; if (mDlg_FangLeiJiSuan == null) { mDlg_FangLeiJiSuan = new FormFangLeiJiSuan(); } mDlg_FangLeiJiSuan.desktop = this; if (mDlg_FangLeiGaiZao == null) { mDlg_FangLeiGaiZao = new FormFangLeiGaiZao(); } mDlg_FangLeiGaiZao.desktop = this; if (mDlg_PuTongJiSuan == null) { mDlg_PuTongJiSuan = new Form_PuTongJiSuan(); } mDlg_PuTongJiSuan.desktop = this; if (mDlg_GJSZ_PuTongJiSuan == null) { mDlg_GJSZ_PuTongJiSuan = new Form_GJSZ_PuTongJiSuan(); } mDlg_GJSZ_PuTongJiSuan.desktop = this; if (mDlg_TongTiaoJiSuan == null) { mDlg_TongTiaoJiSuan = new Form_TongTiaoJiSuan(); } mDlg_TongTiaoJiSuan.desktop = this; if (mDlg_4FengXianPingGu == null) { mDlg_4FengXianPingGu = new Form4_FengXianPingGu(); } mDlg_4FengXianPingGu.desktop = this; if (mDlg_5CuoShiTuiJian == null) { mDlg_5CuoShiTuiJian = new Form5_CuoShiTuiJian(); } mDlg_5CuoShiTuiJian.desktop = this; if (mDlg_GaoFengXianYuanYin == null) { mDlg_GaoFengXianYuanYin = new Form_GaoFengXianYuanYin(); } mDlg_GaoFengXianYuanYin.desktop = this; if (mDlgLook1_PuTongJiSuan == null) { mDlgLook1_PuTongJiSuan = new FormLook1PuTongJiSuan(); } mDlgLook1_PuTongJiSuan.desktop = this; if (mDlgLook2FengXianPingGu == null) { mDlgLook2FengXianPingGu = new FormLook2FengXianPingGu(); } mDlgLook2FengXianPingGu.desktop = this; if (mDlgLook3CuoShiTuiJian == null) { mDlgLook3CuoShiTuiJian = new FormLook3CuoShiTuiJian(); } mDlgLook3CuoShiTuiJian.desktop = this; if (mDlg_7GuZhangFuXian == null) { mDlg_7GuZhangFuXian = new Form7_GuZhangFuXian(); } mDlg_7GuZhangFuXian.desktop = this; if (mDlg_6ReportTask == null) { mDlg_6ReportTask = new Form6_ReportTask(); } mDlg_6ReportTask.desktop = this; if (mTheXianLuData == null) { mTheXianLuData = new XianLuData(); } if (mTheGanTaData == null) { mTheGanTaData = new GanTaData(); } if (mTheTaskData == null) { mTheTaskData = new TaskData(); } if (mGaiZao_TaskData == null) { mGaiZao_TaskData = new TaskData(); } if (mAddTaskData == null) { mAddTaskData = new TaskData(); } mAddTaskData.mID_Task = -1; if (mRightTaskData == null) { mRightTaskData = new TaskData(); } if (mRightXianLuData == null) { mRightXianLuData = new XianLuData(); } if (mRightGroup == null) { mRightGroup = new TaskGroup(); } mXL.Refresh_GanTaNumber_Label(); if (mReport == null) { mReport = new MyReport(); } mReport.desktop = this; buttonRepeat.Visible = mSignal.mShowButton_GuZhangFuXian; MyLog.AddLog_EveryOne("\n" + DateTime.Now.ToString()); mAfterInit = true; } public void MyRefresh_ToolStripMenuItem() { if (线路详情ToolStripMenuItem1 != null && 线路详情ToolStripMenuItem1.DropDownItems != null && 线路删除ToolStripMenuItem != null && 线路删除ToolStripMenuItem.DropDownItems != null && 任务删除ToolStripMenuItem != null && 任务删除ToolStripMenuItem.DropDownItems != null) { for (int i = 0; i < 线路详情ToolStripMenuItem1.DropDownItems.Count; i++) { 线路详情ToolStripMenuItem1.DropDownItems[i].Click -= MenuItem_Click; } 线路详情ToolStripMenuItem1.DropDownItems.Clear(); for (int j = 0; j < 线路删除ToolStripMenuItem.DropDownItems.Count; j++) { 线路删除ToolStripMenuItem.DropDownItems[j].Click -= MenuItem2_Click; } 线路删除ToolStripMenuItem.DropDownItems.Clear(); for (int k = 0; k < 任务删除ToolStripMenuItem.DropDownItems.Count; k++) { 任务删除ToolStripMenuItem.DropDownItems[k].Click -= MenuItem3_Click; } 任务删除ToolStripMenuItem.DropDownItems.Clear(); for (int l = 0; l < mXL.mListXianLuData.Count; l++) { ToolStripMenuItem toolStripMenuItem = null; toolStripMenuItem = new ToolStripMenuItem(); toolStripMenuItem.Name = $"toolStripMenuItem_详情_{l}"; toolStripMenuItem.Text = "详情-" + mXL.mListXianLuData[l].mName_XianLu; toolStripMenuItem.Size = new Size(280, 22); toolStripMenuItem.Tag = $"{mXL.mListXianLuData[l].mID_XianLu}"; toolStripMenuItem.Click += MenuItem_Click; toolStripMenuItem.Visible = true; 线路详情ToolStripMenuItem1.DropDownItems.Add(toolStripMenuItem); ToolStripMenuItem toolStripMenuItem2 = null; toolStripMenuItem2 = new ToolStripMenuItem(); toolStripMenuItem2.Name = $"toolStripMenuItem_删除_{l}"; toolStripMenuItem2.Text = "删除-" + mXL.mListXianLuData[l].mName_XianLu; toolStripMenuItem2.Size = new Size(280, 22); toolStripMenuItem2.Tag = $"{mXL.mListXianLuData[l].mID_XianLu}"; toolStripMenuItem2.Click += MenuItem2_Click; toolStripMenuItem2.Visible = true; 线路删除ToolStripMenuItem.DropDownItems.Add(toolStripMenuItem2); } for (int m = 0; m < mTask.mListDetails.Count; m++) { ToolStripMenuItem toolStripMenuItem3 = null; toolStripMenuItem3 = new ToolStripMenuItem(); toolStripMenuItem3.Name = $"toolStripMenuItem_任务删除_{m}"; toolStripMenuItem3.Text = "删除-" + mTask.mListDetails[m].mTaskData.mName_Task; toolStripMenuItem3.Size = new Size(280, 22); toolStripMenuItem3.Tag = $"{mTask.mListDetails[m].mTaskID_Detail}"; toolStripMenuItem3.Click += MenuItem3_Click; toolStripMenuItem3.Visible = true; 任务删除ToolStripMenuItem.DropDownItems.Add(toolStripMenuItem3); } } } private void MenuItem_Click(object sender, EventArgs e) { string text = ""; text = ((ToolStripMenuItem)sender).Tag.ToString().Trim(); int num = -1; try { num = Convert.ToInt32(text); } catch (Exception) { num = -1; } for (int i = 0; i < mXL.mListXianLuData.Count; i++) { if (mXL.mListXianLuData[i].mID_XianLu == num) { mTheXianLuData.CopyFrom_XianLuData(mXL.mListXianLuData[i]); if (mDlg_GanTaList == null) { mDlg_GanTaList = new FormGanTaList(); mDlg_GanTaList.desktop = this; } mDlg_GanTaList.MyInput_XianLuData(); mDlg_GanTaList.ShowDialog(this); break; } } } private void MenuItem2_Click(object sender, EventArgs e) { string text = ""; text = ((ToolStripMenuItem)sender).Tag.ToString().Trim(); Thread thread = null; int num = -1; try { num = Convert.ToInt32(text); } catch (Exception) { num = -1; } for (int i = 0; i < mXL.mListXianLuData.Count; i++) { if (mXL.mListXianLuData[i].mID_XianLu == num) { DialogResult dialogResult = DialogResult.None; dialogResult = MessageBox.Show("将要删除线路:" + mXL.mListXianLuData[i].mName_XianLu + ",此操作不可恢复。确定继续吗?", "确认", MessageBoxButtons.OKCancel); if (dialogResult == DialogResult.OK) { mThread = new Thread(MyDeleteXianLu); mThread.Start(); } Thread.Sleep(50); if (dialogResult == DialogResult.OK) { thread = new Thread(MyThread_after_delete_XianLu); thread.Start(); } break; } } } private void MenuItem3_Click(object sender, EventArgs e) { string text = ""; text = ((ToolStripMenuItem)sender).Tag.ToString().Trim(); Thread thread = null; int num = -1; try { num = Convert.ToInt32(text); } catch (Exception) { num = -1; } for (int i = 0; i < mTask.mListDetails.Count; i++) { if (mTask.mListDetails[i].mTaskID_Detail == num) { DialogResult dialogResult = DialogResult.None; dialogResult = MessageBox.Show("将要删除任务:" + mTask.mListDetails[i].mTaskData.mName_Task + ",此操作不可恢复。确定继续吗?", "确认", MessageBoxButtons.OKCancel); if (dialogResult == DialogResult.OK) { mIndex_ListControl = i; mThread = new Thread(MyDeleteTask); mThread.Start(); } Thread.Sleep(50); if (dialogResult == DialogResult.OK) { thread = new Thread(MyThread_after_delete_XianLu); thread.Start(); } break; } } } private void MyThread_after_delete_XianLu() { if (mThread != null) { mThread.Join(); Thread.Sleep(100); mThread = null; MyRefresh_ToolStripMenuItem(); } } private void MyXianLu_LoadFromFile() { mXL.MyLoadXianLu(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_XianLu.txt"); for (int i = 0; i < mXL.mListXianLuControl.Count; i++) { Panel panel = null; panel = mXL.GetXianLuControl_Panel(i); if (panel != null) { panel.MouseDown += panel_XianLu_MouseDown; } } } private void MyGanTa_LoadFromFile() { mXL.MyLoadGanTa(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_GanTa.txt"); } private void MyTGanTa_LoadFromFile() { mTask.MyLoadTGanTa(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_TGanTa.txt"); } private void MyXianLu_InitForTest() { mXL.Add1XianLuControl(1, "线路1名称", "交流", 110, 20, XianLuData.mNextID_static, 0, 0, 0); mXL.GetLastXianLuControl_Panel().MouseDown += panel_XianLu_MouseDown; mXL.Add1XianLuControl(0, "线路2名称", "直流", 500, 34, XianLuData.mNextID_static, 0, 0, 0); mXL.GetLastXianLuControl_Panel().MouseDown += panel_XianLu_MouseDown; } private void MyTask_LoadFromFile() { mTask.MyLoadTask(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_Task.txt"); for (int i = 0; i < mTask.mListDetails.Count; i++) { Panel panel = null; panel = mTask.mListDetails[i].mTaskControl.mPanel_Task; if (panel == null) { continue; } panel.MouseDown += panel_Task_MouseDown; Button button = null; button = mTask.mListDetails[i].mTaskControl.mStart_Task_Button; if (button != null) { button.Click += buttonStart_Click; button = null; button = mTask.mListDetails[i].mTaskControl.mResult_Task_Button; if (button != null) { button.Click += buttonLook_Click; } } } } private void MyTask_InitForTest() { int num = 0; TaskData taskData = new TaskData(); taskData.mTypeCode_Task = 1; taskData.mName_Task = "任务Alpha"; taskData.mXianLuID_Task = 2; taskData.mXianLuName_Task = "线路2名称"; taskData.mXianLuJLZL_Task = "直流"; taskData.mDYDJ_Task = 500; TaskDetail taskDetail = new TaskDetail(); taskDetail.mTaskID_Detail = taskData.mID_Task; taskDetail.mXianLuID_Detail = taskData.mXianLuID_Task; num = mTask.mListDetails.Count; mTask.mListDetails.Add(taskDetail); mTask.Add1TaskData(num, taskData); mTask.Add1TaskControl(num, taskData); mTask.mListDetails[num].mTaskGroup.mID_Task = taskDetail.mTaskID_Detail; mTask.mListDetails[num].mTaskControl.mPanel_Task.MouseDown += panel_Task_MouseDown; mTask.mListDetails[num].mTaskControl.mStart_Task_Button.DoubleClick += buttonStart_Click; mTask.mListDetails[num].mTaskControl.mResult_Task_Button.DoubleClick += buttonLook_Click; taskData = new TaskData(); taskData.mTypeCode_Task = 1; taskData.mName_Task = "任务Belta"; taskData.mXianLuID_Task = 1; taskData.mXianLuName_Task = "线路1名称"; taskData.mXianLuJLZL_Task = "交流"; taskData.mDYDJ_Task = 120; taskDetail = new TaskDetail(); taskDetail.mTaskID_Detail = taskData.mID_Task; taskDetail.mXianLuID_Detail = taskData.mXianLuID_Task; num = mTask.mListDetails.Count; mTask.mListDetails.Add(taskDetail); mTask.Add1TaskData(num, taskData); mTask.Add1TaskControl(num, taskData); mTask.mListDetails[num].mTaskGroup.mID_Task = taskDetail.mTaskID_Detail; mTask.mListDetails[num].mTaskControl.mPanel_Task.MouseDown += panel_Task_MouseDown; mTask.mListDetails[num].mTaskControl.mStart_Task_Button.DoubleClick += buttonStart_Click; mTask.mListDetails[num].mTaskControl.mResult_Task_Button.DoubleClick += buttonLook_Click; } private void FormDesktop_FormClosing(object sender, FormClosingEventArgs e) { if (mSignal.mSaveXianLu_setting) { mXL.MySaveXianLu(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_XianLu.txt"); } if (mSignal.mSaveTask_setting) { mTask.MySaveTask(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_Task.txt"); } if (mSignal.mSaveExTask_setting) { mTask.MySaveExTask(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_ExTask.txt"); } if (mSignal.mSaveGanTa_setting) { mXL.MySaveGanTa(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_GanTa.txt"); } if (mSignal.mSaveTGanTa_setting) { mTask.MySaveTGanTa(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_TGanTa.txt"); } if (mSignal.mSaveCanShuFenJi_setting) { mAll_CanShuFenJi.MySaveCanShuFenJi(Application.StartupPath + "\\" + mSubPath_Primary + "\\LP_CanShuFenJi.txt"); } Destroy(); MyLog.Save_Log(Application.StartupPath + "\\" + mSubPath_Primary); } private void Destroy() { for (int i = 0; i < mXL.mListXianLuControl.Count; i++) { Panel panel = null; panel = mXL.GetXianLuControl_Panel(i); if (panel != null) { panel.MouseDown -= panel_XianLu_MouseDown; } } for (int j = 0; j < mTask.mListDetails.Count; j++) { if (mTask.mListDetails[j].mTaskControl != null) { Panel panel2 = null; panel2 = mTask.mListDetails[j].mTaskControl.mPanel_Task; if (panel2 != null) { panel2.MouseDown -= panel_Task_MouseDown; } } } mDlg_CreateXianLu.Destroy(); mDlg_CreateXianLu.RemoveOwnedForm(this); mDlg_CreateXianLu.Dispose(); mDlg_GanTaList.Destroy(); mDlg_GanTaList.RemoveOwnedForm(this); mDlg_GanTaList.Dispose(); mDlg_CreateGanTa.Destroy(); mDlg_CreateGanTa.RemoveOwnedForm(this); mDlg_CreateGanTa.Dispose(); mDlg_GanTa_0zhiliu.Destroy(); mDlg_GanTa_0zhiliu.RemoveOwnedForm(this); mDlg_GanTa_0zhiliu.Dispose(); mDlg_GanTa_1Hui.Destroy(); mDlg_GanTa_1Hui.RemoveOwnedForm(this); mDlg_GanTa_1Hui.Dispose(); mDlg_GanTa_2Hui.Destroy(); mDlg_GanTa_2Hui.RemoveOwnedForm(this); mDlg_GanTa_2Hui.Dispose(); mDlg_GanTa_4Hui.Destroy(); mDlg_GanTa_4Hui.RemoveOwnedForm(this); mDlg_GanTa_4Hui.Dispose(); mDlg_CanShuJiSuan.Destroy(); mDlg_CanShuJiSuan.RemoveOwnedForm(this); mDlg_CanShuJiSuan.Dispose(); mDlg_Current.Destroy(); mDlg_Current.RemoveOwnedForm(this); mDlg_Current.Dispose(); mDlg_DiShanMiDu.Destroy(); mDlg_DiShanMiDu.RemoveOwnedForm(this); mDlg_DiShanMiDu.Dispose(); mDlg_DiMainQingJiao.Destroy(); mDlg_DiMainQingJiao.RemoveOwnedForm(this); mDlg_DiMainQingJiao.Dispose(); mDlg_FangLeiJiSuan.Destroy(); mDlg_FangLeiJiSuan.RemoveOwnedForm(this); mDlg_FangLeiJiSuan.Dispose(); mDlg_FangLeiGaiZao.Destroy(); mDlg_FangLeiGaiZao.RemoveOwnedForm(this); mDlg_FangLeiGaiZao.Dispose(); mDlg_PuTongJiSuan.Destroy(); mDlg_PuTongJiSuan.RemoveOwnedForm(this); mDlg_PuTongJiSuan.Dispose(); mDlg_GJSZ_PuTongJiSuan.Destroy(); mDlg_GJSZ_PuTongJiSuan.RemoveOwnedForm(this); mDlg_GJSZ_PuTongJiSuan.Dispose(); mDlg_TongTiaoJiSuan.Destroy(); mDlg_TongTiaoJiSuan.RemoveOwnedForm(this); mDlg_TongTiaoJiSuan.Dispose(); mDlg_4FengXianPingGu.Destroy(); mDlg_4FengXianPingGu.RemoveOwnedForm(this); mDlg_4FengXianPingGu.Dispose(); mDlg_5CuoShiTuiJian.Destroy(); mDlg_5CuoShiTuiJian.RemoveOwnedForm(this); mDlg_5CuoShiTuiJian.Dispose(); mDlg_GaoFengXianYuanYin.Destroy(); mDlg_GaoFengXianYuanYin.RemoveOwnedForm(this); mDlg_GaoFengXianYuanYin.Dispose(); mDlg_6ReportTask.Destroy(); mDlg_6ReportTask.RemoveOwnedForm(this); mDlg_6ReportTask.Dispose(); mDlg_7GuZhangFuXian.Destroy(); mDlg_7GuZhangFuXian.RemoveOwnedForm(this); mDlg_7GuZhangFuXian.Dispose(); mDlgLook1_PuTongJiSuan.Destroy(); mDlgLook1_PuTongJiSuan.RemoveOwnedForm(this); mDlgLook1_PuTongJiSuan.Dispose(); mDlgLook2FengXianPingGu.Destroy(); mDlgLook2FengXianPingGu.RemoveOwnedForm(this); mDlgLook2FengXianPingGu.Dispose(); mDlgLook3CuoShiTuiJian.Destroy(); mDlgLook3CuoShiTuiJian.RemoveOwnedForm(this); mDlgLook3CuoShiTuiJian.Dispose(); mTask.Destroy(); mXL.Destroy(); if (mFuXian != null) { mFuXian.Destroy(); } mFuXian = null; if (mTheXianLuData != null) { mTheXianLuData.Destroy(); } mTheXianLuData = null; if (mTheTaskData != null) { mTheTaskData.Destroy(); } mTheTaskData = null; if (mGaiZao_TaskData != null) { mGaiZao_TaskData.Destroy(); } mGaiZao_TaskData = null; if (mTheGanTaData != null) { mTheGanTaData.Destroy(); } mTheGanTaData = null; if (mAddTaskData != null) { mAddTaskData.Destroy(); } mAddTaskData = null; if (m4TaskData_FengXianPingGu != null) { m4TaskData_FengXianPingGu.Destroy(); } m4TaskData_FengXianPingGu = null; if (m5TaskData_CuoShiTuiJian != null) { m5TaskData_CuoShiTuiJian.Destroy(); } m5TaskData_CuoShiTuiJian = null; if (m6TaskData_Report != null) { m6TaskData_Report.Destroy(); } m6TaskData_Report = null; if (mRightXianLuData != null) { mRightXianLuData.Destroy(); } mRightXianLuData = null; if (mRightTaskData != null) { mRightTaskData.Destroy(); } mRightTaskData = null; if (mRightGroup != null) { mRightGroup.Destroy(); } mRightGroup = null; if (mAll_CanShuFenJi != null) { mAll_CanShuFenJi.Destroy(); } mAll_CanShuFenJi = null; mDisplayAllXianLu.Destroy(); } private void Init_Map_Object() { mAxMap.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR; mAxMap.TileProvider = tkTileProvider.ProviderNone; mAxMap.KnownExtents = tkKnownExtents.keUSA; } private void buttonCreateXianLu_Click(object sender, EventArgs e) { MySetFormTitle(this, ""); if (mDlg_CreateXianLu == null) { mDlg_CreateXianLu = new FormCreateXianLu(); mDlg_CreateXianLu.desktop = this; } DialogResult dialogResult = DialogResult.None; if (mDlg_CreateXianLu.mFirst_Enter) { mDlg_CreateXianLu.MyInput_XianLuData(); } dialogResult = mDlg_CreateXianLu.ShowDialog(this); if (dialogResult != DialogResult.OK) { return; } mDlg_CreateXianLu.MyOutput_XianLuData(); if (mXL.IsRepeatXianLuName(mTheXianLuData.mName_XianLu.Trim())) { MessageBox.Show("线路名称重名错误,请重新输入! '" + mTheXianLuData.mName_XianLu + "'"); return; } mXL.Add1XianLuControl(mTheXianLuData.mHuiLuNo_XianLu, mTheXianLuData.mName_XianLu, mTheXianLuData.mJLZL_XianLu, mTheXianLuData.mDYDJ_XianLu, mTheXianLuData.mGanTaNumber_XianLu, XianLuData.mNextID_static, mTheXianLuData.mPrepare1_LightingCurrent, mTheXianLuData.mPrepare2_DiShanMiDu, mTheXianLuData.mPrepare3_DiMianQingJiao); mXL.GetLastXianLuControl_Panel().MouseDown += panel_XianLu_MouseDown; MyRefresh_ToolStripMenuItem(); mTheXianLuData.CopyFrom_XianLuData(mXL.GetLastXianLuData()); if (mDlg_GanTaList == null) { mDlg_GanTaList = new FormGanTaList(); mDlg_GanTaList.desktop = this; } mDlg_GanTaList.MyInput_XianLuData(); mDlg_GanTaList.ShowDialog(this); } private void buttonCanShuJiSuan_Click(object sender, EventArgs e) { MySetFormTitle(this, ""); mDlg_CanShuJiSuan.ShowDialog(this); } private void MyDeleteXianLu() { if (mIndex_ListControl < 0 || mIndex_ListControl >= mXL.mListXianLuData.Count) { MyLog.AddLog($"MyDeleteXianLu() 线路数据下标{mIndex_ListControl}越界:[0,{mXL.mListXianLuData.Count - 1}]"); return; } Panel panel = null; panel = mXL.GetXianLuControl_Panel(mIndex_ListControl); if (panel != null) { panel.MouseDown -= panel_XianLu_MouseDown; flowLayoutPanel_LeftListXianLu.Controls.Remove(panel); } int mID_XianLu = mXL.mListXianLuData[mIndex_ListControl].mID_XianLu; string text = ""; text = mXL.Delete1_XianLuControl_and_XianLuData(mIndex_ListControl); if (!text.Equals("OK")) { MyLog.AddLog("MyDeleteXianLu() Delete1_XianLuControl_and_XianLuData()=" + text); } try { int num = mIndex_ListControl; for (int i = 0; i < mTask.mListDetails.Count; i++) { if (mID_XianLu == mTask.mListDetails[i].mXianLuID_Detail) { mIndex_ListControl = i; MyDeleteTask(); } } mIndex_ListControl = num; } catch (Exception ex) { MyLog.AddLog("MyDeleteXianLu() 删除关联任务,遇到异常(" + ex.Message + ")."); } } private void MyDeleteTask() { if (mIndex_ListControl < 0 || mIndex_ListControl >= mTask.mListDetails.Count) { MyLog.AddLog($"MyDeleteTask() 任务数据下标{mIndex_ListControl}越界:[0,{mTask.mListDetails.Count - 1}]"); return; } Panel panel = null; panel = mTask.mListDetails[mIndex_ListControl].mTaskControl.mPanel_Task; if (panel != null) { panel.MouseDown -= panel_Task_MouseDown; flowLayoutPanel_RightListTask.Controls.Remove(panel); } string text = ""; text = mTask.Delete1_TaskControl_and_TaskData(mIndex_ListControl); if (!text.Equals("OK")) { MyLog.AddLog("MyDeleteTask() Delete1_TaskControl_and_TaskData()=" + text); } if (mTask.mListDetails.Count == 0) { mAll_CanShuFenJi.MyDeleteAll(); } } private void buttonLightningProofCompute_Click(object sender, EventArgs e) { MySetFormTitle(this, ""); mDlg_FangLeiJiSuan.MyInput_TaskData(); mDlg_FangLeiJiSuan.ShowDialog(this); } private void buttonFangLeiGaiZao_Click(object sender, EventArgs e) { MySetFormTitle(this, ""); mDlg_FangLeiGaiZao.MyInput_TaskData(); mDlg_FangLeiGaiZao.ShowDialog(this); } private void buttonPingGu_Click(object sender, EventArgs e) { MySetFormTitle(this, ""); mDlg_4FengXianPingGu.ShowDialog(this); } private void buttonReport_Click(object sender, EventArgs e) { DialogResult dialogResult = DialogResult.None; dialogResult = mDlg_6ReportTask.ShowDialog(this); if (dialogResult == DialogResult.OK) { Thread thread = new Thread(MyThread_SendTaskData_ReportTask); thread.Start(); } } private void MyThread_SendTaskData_ReportTask() { for (int i = 0; i < 10; i++) { if (mAddTaskData.mID_Task <= 0) { break; } Thread.Sleep(1000); } mAddTaskData.copyFrom_TaskData(mDlg_6ReportTask.mTaskData); MySendForm_TaskData(this, mAddTaskData); } private void TestDraw() { string text = ""; List list = new List(); List list2 = new List(); mDisplayAllXianLu.MyClear(); DisplayGanTaIn1XianLu.MyCenterSet(110.0, 23.0); for (int i = 0; i < mXL.mListXianLuControl.Count; i++) { if (mXL.mListXianLuControl[i].mShow_XianLu_CheckBox.CheckState != CheckState.Checked || i >= mXL.mListXianLuData.Count || !mXL.mListXianLuData[i].mShow_XianLu) { continue; } text += $" {mXL.mListXianLuData[i].mID_XianLu}"; if (i < mXL.mListGanTas.Count && mXL.mListGanTas[i].mListGanTaData.Count != 0) { list.Clear(); list2.Clear(); for (int j = 0; j < mXL.mListGanTas[i].mListGanTaData.Count; j++) { list.Add(mXL.mListGanTas[i].mListGanTaData[j].mJingDu_GanTa); list2.Add(mXL.mListGanTas[i].mListGanTaData[j].mWeiDu_GanTa); } mDisplayAllXianLu.Add1XianLu_JingDu_WeiDu(list, list2, mXL.mListXianLuData[i].mID_XianLu); } } mDisplayAllXianLu.MyMinMax_JingWeiDu(); mDisplayAllXianLu.MyBuildXY(); mDisplayAllXianLu.mFileName_province = Application.StartupPath + "\\" + mSubPath_Primary + "\\province.shp"; text = mDisplayAllXianLu.MyInfor_JingDu_WeiDu(); text = ((!string.IsNullOrEmpty(text)) ? ("选中线路编号:" + text) : "未选中线路编号"); MySetFormTitle(this, text ?? ""); if (GanTas.mName_GanTaModels.Count > 0) { mDisplayAllXianLu.MyLinesPattern(this, ref mAxMap); } if (GanTas.mName_GanTaModels.Count <= 0) { } } private void buttonRepeat_Click(object sender, EventArgs e) { MySetFormTitle(this, ""); mDlg_7GuZhangFuXian.ShowDialog(this); } private void label_Num_GanTa_DoubleClick(object sender, EventArgs e) { } private void panel_XianLu_DoubleClick(object sender, EventArgs e) { string text = ""; text = ((Panel)sender).Tag.ToString(); int num = -1; try { num = Convert.ToInt32(text.Trim()); } catch (Exception) { num = -2; MyLog.AddLog("panel_XianLu_DoubleClick() 未匹配,无效线路编号,tag=" + text); } bool flag = false; int index = 0; for (int i = 0; i < mXL.mListXianLuData.Count; i++) { if (mXL.mListXianLuData[i].mID_XianLu == num) { index = i; flag = true; break; } } if (!flag) { MessageBox.Show("线路编号无效:" + text); return; } mIndex_ListControl = index; mNo_ListControl = 1; mTheXianLuData.CopyFrom_XianLuData(mXL.mListXianLuData[index]); if (mDlg_GanTaList == null) { mDlg_GanTaList = new FormGanTaList(); mDlg_GanTaList.desktop = this; } mDlg_GanTaList.MyInput_XianLuData(); mDlg_GanTaList.ShowDialog(this); } private void panel_XianLu_MouseDown(object sender, MouseEventArgs e) { string text = ""; text = ((Panel)sender).Tag.ToString(); int num = -1; try { num = Convert.ToInt32(text.Trim()); } catch (Exception) { num = -2; MyLog.AddLog("panel_XianLu_MouseDown() 未匹配,无效线路编号,tag=" + text); } bool flag = false; int num2 = 0; for (int i = 0; i < mXL.mListXianLuData.Count; i++) { if (mXL.mListXianLuData[i].mID_XianLu == num) { num2 = i; flag = true; break; } } if (!flag) { MessageBox.Show("线路编号无效:" + text); return; } mIndex_ListControl = num2; mNo_ListControl = 1; } private void toolStripMenuItem1_Click(object sender, EventArgs e) { string text = ""; text = ((ToolStripMenuItem)sender).Text; if (text.Equals("详情")) { mTheXianLuData.CopyFrom_XianLuData(mXL.mListXianLuData[mIndex_ListControl]); if (mDlg_GanTaList == null) { mDlg_GanTaList = new FormGanTaList(); mDlg_GanTaList.desktop = this; } mDlg_GanTaList.MyInput_XianLuData(); mDlg_GanTaList.ShowDialog(this); } } private void toolStripMenuItem2_Click(object sender, EventArgs e) { string text = ""; text = ((ToolStripMenuItem)sender).Text; if (!text.Equals("删除")) { return; } DialogResult dialogResult = DialogResult.None; if (mIndex_ListControl < 0) { MySetFormTitle(this, "未选中线路。"); return; } if (mIndex_ListControl >= mXL.mListXianLuData.Count) { MySetFormTitle(this, "线路已删除。"); return; } dialogResult = MessageBox.Show("将要删除线路:" + mXL.mListXianLuData[mIndex_ListControl].mName_XianLu + ",此操作不可恢复。确定继续吗?", "确认", MessageBoxButtons.OKCancel); if (dialogResult == DialogResult.OK) { Thread thread = new Thread(MyDeleteXianLu); thread.Start(); } } private void 详情ToolStripMenuItem1_Click(object sender, EventArgs e) { } private void toolStripMenuItem3_Click(object sender, EventArgs e) { string text = ""; text = ((ToolStripMenuItem)sender).Text; if (!text.Equals("删除")) { return; } DialogResult dialogResult = DialogResult.None; if (mIndex_ListControl < 0) { MySetFormTitle(this, "未选中任务。"); return; } if (mIndex_ListControl >= mTask.mListDetails.Count) { MySetFormTitle(this, "任务已删除。"); return; } dialogResult = MessageBox.Show("将要删除任务:" + mTask.mListDetails[mIndex_ListControl].mTaskData.mName_Task + ",此操作不可恢复。确定继续吗?", "确认", MessageBoxButtons.OKCancel); if (dialogResult == DialogResult.OK) { Thread thread = new Thread(MyDeleteTask); thread.Start(); } } private void panel_Task_MouseDown(object sender, MouseEventArgs e) { string text = ""; text = ((Panel)sender).Tag.ToString(); int num = -1; try { num = Convert.ToInt32(text.Trim()); } catch (Exception) { num = -2; MyLog.AddLog("panel_Task_MouseDown() 未匹配,无效任务编号,tag=" + text); } MySetFormTitle(this, $"任务编号:{num}"); bool flag = false; int num2 = 0; for (int i = 0; i < mTask.mListDetails.Count; i++) { if (mTask.mListDetails[i].mTaskID_Detail == num) { num2 = i; flag = true; break; } } if (!flag) { MessageBox.Show("任务编号无效:" + text); return; } mIndex_ListControl = num2; mNo_ListControl = 2; } private void panel_Task_DoubleClick(object sender, EventArgs e) { string text = ""; text = ((Panel)sender).Tag.ToString(); int num = -1; try { num = Convert.ToInt32(text.Trim()); } catch (Exception) { num = -2; MyLog.AddLog("panel_Task_DoubleClick() 未匹配,无效任务编号,tag=" + text); } MySetFormTitle(this, $"任务编号:{num}"); bool flag = false; int num2 = 0; for (int i = 0; i < mTask.mListDetails.Count; i++) { if (mTask.mListDetails[i].mTaskID_Detail == num) { num2 = i; flag = true; break; } } if (!flag) { MessageBox.Show("任务编号无效:" + text); return; } mIndex_ListControl = num2; mNo_ListControl = 2; } private void buttonStart_Click(object sender, EventArgs e) { if (!mAfterInit || mBusy_Start) { return; } mBusy_Start = true; string text = ((Button)sender).Tag.ToString().Trim(); MySetFormTitle(this, ""); if (string.IsNullOrEmpty(text)) { MyLog.AddLog("buttonStart_Click(),tag为空。"); mBusy_Start = false; return; } int num = 0; try { num = Convert.ToInt32(text); } catch (Exception) { num = 0; } bool flag = false; for (int i = 0; i < mTask.mListDetails.Count; i++) { if (num == mTask.mListDetails[i].mTaskID_Detail) { mIndex_ListControl = i; mNo_ListControl = 2; flag = true; break; } } if (!flag) { MyLog.AddLog("buttonStart_Click(),ID_Control未找到匹配的任务。"); mBusy_Start = false; return; } for (int j = 0; j < mTask.mListDetails.Count; j++) { if (mTask.GetTaskControl_ButtonStart(j).Tag.ToString().Trim().Equals(text)) { MySetButtonEnabled(mTask.GetTaskControl_ButtonStart(j), value: false); } } Thread thread = new Thread(MyThread_Start); thread.Start(text); } private void MyThread_Start(object obj_tag) { string text = ""; string value = obj_tag.ToString().Trim(); int num = 0; try { num = Convert.ToInt32(value); } catch (Exception) { num = 0; } int index = -1; for (int i = 0; i < mTask.mListDetails.Count; i++) { if (mTask.mListDetails[i].mTaskID_Detail == num) { index = i; break; } } text = mFunc.MyStart(num, mTask.mListDetails, mXL.mListXianLuData, mXL.mListGanTas); for (int j = 0; j < mTask.mListDetails.Count; j++) { if (mTask.GetTaskControl_ButtonStart(j).Tag.ToString().Trim().Equals(value)) { MySetButtonEnabled(mTask.GetTaskControl_ButtonStart(j), value: true); } } if (!text.Equals("OK")) { MySetFormTitle(this, text); } if (text.Equals("OK") && mTask.mListDetails[index].mTaskData.mTypeCode_Task == 5) { MySetFormTitle(this, "报告文件名=" + mReport.mFileName_jss); mTask.mListDetails[index].mTaskData.mFName_Prepare = MyReport.jss_subpath + "\\" + mReport.mFileName_jss; } mBusy_Start = false; } private void buttonLook_Click(object sender, EventArgs e) { string value = ((Button)sender).Tag.ToString().Trim(); MySetFormTitle(this, ""); bool flag = false; int index = 0; int num = 0; if (string.IsNullOrEmpty(value)) { MyLog.AddLog("buttonLook_Click(), tag为空。"); return; } try { num = Convert.ToInt32(value); } catch (Exception) { num = -1; } for (int i = 0; i < mTask.mListDetails.Count; i++) { if (mTask.mListDetails[i] != null && num == mTask.mListDetails[i].mTaskID_Detail) { index = i; mRightTaskData.copyFrom_TaskData(mTask.mListDetails[i].mTaskData); flag = true; break; } } if (!flag) { MyLog.AddLog($"buttonLook_Click() 未找到匹配任务(ID_Task={num})。"); return; } bool flag2 = false; for (int j = 0; j < mXL.mListXianLuData.Count; j++) { if (mRightTaskData.mXianLuName_Task.Equals(mXL.mListXianLuData[j].mName_XianLu)) { mRightXianLuData.CopyFrom_XianLuData(mXL.mListXianLuData[j]); flag2 = true; break; } } if (!flag2) { MyLog.AddLog($"buttonLook_Click() 未找到匹配线路(foundNameXL={flag2})。"); return; } switch (mRightTaskData.mTypeCode_Task) { case 1: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:普通计算。"); return; } break; case 2: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:风险评估。"); return; } break; case 3: case 302: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:措施推荐。"); return; } break; case 4: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:同跳计算。"); return; } break; case 5: if (mRightTaskData.Complete >= 0) { MySetFormTitle(this, mRightTaskData.mFName_Prepare ?? ""); return; } break; case 6: case 602: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:安装避雷器。"); return; } break; case 11: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:雷电流幅值计算。"); return; } break; case 12: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:地闪密度。"); return; } break; case 13: if (mRightTaskData.Complete != 1) { MySetFormTitle(this, "未完成:地面倾角。"); return; } break; } bool flag3 = false; for (int k = 0; k < mTask.mListDetails.Count; k++) { if (mTask.mListDetails[k] != null && num == mTask.mListDetails[k].mTaskID_Detail) { mRightGroup.copyFrom_TaskGroup(mTask.mListDetails[k].mTaskGroup); flag3 = true; break; } } if (!flag3) { MyLog.AddLog($"buttonLook_Click() 未找到匹配任务组(ID_Task={num})。"); return; } switch (mRightTaskData.mTypeCode_Task) { case 1: mDlgLook1_PuTongJiSuan.MySet_mIndex_detail_Look1(index); mDlgLook1_PuTongJiSuan.ShowDialog(this); break; case 2: mDlgLook2FengXianPingGu.ShowDialog(this); break; case 3: case 6: case 302: case 602: mDlgLook3CuoShiTuiJian.MySet_mIndex_detail_Look3(index); mDlgLook3CuoShiTuiJian.ShowDialog(this); break; case 4: mDlgLook1_PuTongJiSuan.MySet_mIndex_detail_Look1(index); mDlgLook1_PuTongJiSuan.ShowDialog(this); break; } } private void checkBox_XianLu_CheckedChanged(object sender, EventArgs e) { bool flag = false; flag = ((CheckBox)sender).CheckState == CheckState.Checked; int num = 0; try { num = Convert.ToInt32(((CheckBox)sender).Tag.ToString()); } catch (Exception) { num = -1; } bool flag2 = false; for (int i = 0; i < mXL.mListXianLuData.Count; i++) { if (num == mXL.mListXianLuData[i].mID_XianLu) { mXL.mListXianLuData[i].mShow_XianLu = flag; flag2 = true; break; } } if (!flag2) { MyLog.AddLog($"checkBox_XianLu_CheckedChanged() 未找到匹配线路(id_XianLu={num})。"); MessageBox.Show($"checkBox_XianLu_CheckedChanged() 未找到匹配线路(id_XianLu={num})。"); } } private void button1_Click(object sender, EventArgs e) { TestDraw(); } private void axMap_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { Keys keyCode = e.KeyCode; Keys keys = keyCode; if ((uint)(keys - 37) <= 3u) { e.IsInputKey = true; } } private Shapefile CreateLines() { Shapefile shapefile = null; if (shapefile == null) { shapefile = new ShapefileClass(); } shapefile.CreateNew("", ShpfileType.SHP_POLYLINE); int num = 500; int num2 = 50; for (int i = 0; i < 3; i++) { Shape shape = new ShapeClass(); shape.Create(ShpfileType.SHP_POLYLINE); MapWinGIS.Point point = new PointClass(); point.x = 0.0; point.y = i * num2; int pointIndex = shape.numPoints; shape.InsertPoint(point, ref pointIndex); point = new PointClass(); point.x = num; point.y = i * num2; pointIndex = shape.numPoints; shape.InsertPoint(point, ref pointIndex); pointIndex = shapefile.NumShapes; shapefile.EditInsertShape(shape, ref pointIndex); } return shapefile; } public void LinePattern(AxMap axMap1) { axMap1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR; Shapefile shapefile = CreateLines(); axMap1.AddLayer(shapefile, visible: true); Utils utils = new UtilsClass(); LinePattern linePattern = new LinePatternClass(); linePattern.AddLine(utils.ColorByName(tkMapColor.Black), 6f, tkDashStyle.dsSolid); linePattern.AddLine(utils.ColorByName(tkMapColor.White), 5f, tkDashStyle.dsDot); ShapefileCategory shapefileCategory = shapefile.Categories.Add("Railroad"); shapefileCategory.DrawingOptions.LinePattern = linePattern; shapefileCategory.DrawingOptions.UseLinePattern = true; ((IShapefile)shapefile).set_ShapeCategory(0, 0); linePattern = new LinePatternClass(); linePattern.AddLine(utils.ColorByName(tkMapColor.DarkBlue), 6f, tkDashStyle.dsSolid); linePattern.AddLine(utils.ColorByName(tkMapColor.LightBlue), 4f, tkDashStyle.dsSolid); shapefileCategory = shapefile.Categories.Add("River"); shapefileCategory.DrawingOptions.LinePattern = linePattern; shapefileCategory.DrawingOptions.UseLinePattern = true; ((IShapefile)shapefile).set_ShapeCategory(1, 1); linePattern = new LinePatternClass(); linePattern.AddLine(utils.ColorByName(tkMapColor.Gray), 8f, tkDashStyle.dsSolid); linePattern.AddLine(utils.ColorByName(tkMapColor.Yellow), 7f, tkDashStyle.dsSolid); LineSegment lineSegment = linePattern.AddMarker(tkDefaultPointSymbol.dpsArrowRight); lineSegment.Color = utils.ColorByName(tkMapColor.Orange); lineSegment.MarkerSize = 10f; lineSegment.MarkerInterval = 32f; shapefileCategory = shapefile.Categories.Add("Direction"); shapefileCategory.DrawingOptions.LinePattern = linePattern; shapefileCategory.DrawingOptions.UseLinePattern = true; ((IShapefile)shapefile).set_ShapeCategory(2, 2); } public void MySetFormTitle(Form form, string value) { if (form.InvokeRequired) { delegateFormTitle method = MySetFormTitle; form.Invoke(method, form, value); } else { form.Text = mTitle + " " + value; } } public void MySendForm_TaskData(Form form, TaskData value) { if (form.InvokeRequired) { delegateFormSendTaskData method = MySendForm_TaskData; form.Invoke(method, form, value); } else if (value.mID_Task >= 0) { int num = 0; num = mTask.mListDetails.Count - 1; mTask.Add1TaskData(num, value); mTask.Add1TaskControl(num, value); mTask.mListDetails[num].mTaskGroup.mID_Task = value.mID_Task; mTask.mListDetails[num].mTaskControl.mStart_Task_Button.DoubleClick += buttonStart_Click; mTask.mListDetails[num].mTaskControl.mResult_Task_Button.DoubleClick += buttonLook_Click; Panel panel = null; panel = mTask.mListDetails[num].mTaskControl.mPanel_Task; if (panel != null) { panel.MouseDown += panel_Task_MouseDown; } Button button = null; button = mTask.mListDetails[num].mTaskControl.mStart_Task_Button; if (button != null) { button.Click += buttonStart_Click; } button = null; button = mTask.mListDetails[num].mTaskControl.mResult_Task_Button; if (button != null) { button.Click += buttonLook_Click; } value.mID_Task = -1; MyRefresh_ToolStripMenuItem(); } } public static void MySetLabelText(System.Windows.Forms.Label label, string value) { if (label.InvokeRequired) { delegateLabelText method = MySetLabelText; label.Invoke(method, label, value); } else { label.Text = value; } } public void MySetButtonEnabled(Button button, bool value) { if (button.InvokeRequired) { delegateButtonEnabled method = MySetButtonEnabled; button.Invoke(method, button, value); } else { button.Enabled = value; } } public void MyFlowLayoutPanelAddControl(FlowLayoutPanel flowLayoutPanel, Control value) { if (flowLayoutPanel.InvokeRequired) { dltFlowlayoutAddControl method = MyFlowLayoutPanelAddControl; flowLayoutPanel.Invoke(method, flowLayoutPanel, value); } else { flowLayoutPanel.Controls.Add(value); } } protected override void Dispose(bool disposing) { if (disposing && components != null) { components.Dispose(); } base.Dispose(disposing); } private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LP.FormDesktop)); this.panelCenter = new System.Windows.Forms.Panel(); this.axMap = new AxMapWinGIS.AxMap(); this.flowLayoutPanel_TopButtons = new System.Windows.Forms.FlowLayoutPanel(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.详情ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.线路详情ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); this.线路删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.任务删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.buttonCreateXianLu = new System.Windows.Forms.Button(); this.buttonCanShuJiSuan = new System.Windows.Forms.Button(); this.buttonLightningProofCompute = new System.Windows.Forms.Button(); this.buttonFangLeiGaiZao = new System.Windows.Forms.Button(); this.buttonReport = new System.Windows.Forms.Button(); this.buttonRepeat = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.flowLayoutPanel_LeftListXianLu = new System.Windows.Forms.FlowLayoutPanel(); this.label1 = new System.Windows.Forms.Label(); this.panel_XianLu = new System.Windows.Forms.Panel(); this.contextMenuStrip_Left = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); this.label_Num_GanTa = new System.Windows.Forms.Label(); this.label_NameXianLu_L = new System.Windows.Forms.Label(); this.checkBox_XianLu = new System.Windows.Forms.CheckBox(); this.label_DYDJ_L = new System.Windows.Forms.Label(); this.label_AC_DC_L = new System.Windows.Forms.Label(); this.flowLayoutPanel_RightListTask = new System.Windows.Forms.FlowLayoutPanel(); this.label2 = new System.Windows.Forms.Label(); this.panel_Task = new System.Windows.Forms.Panel(); this.contextMenuStrip_Right = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); this.buttonStart = new System.Windows.Forms.Button(); this.buttonLook = new System.Windows.Forms.Button(); this.label_NameTask = new System.Windows.Forms.Label(); this.label_NameXianLu_R = new System.Windows.Forms.Label(); this.label_DYDJ_R = new System.Windows.Forms.Label(); this.label_AC_DC_R = new System.Windows.Forms.Label(); this.panelDesktop = new System.Windows.Forms.Panel(); this.panelCenter.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)this.axMap).BeginInit(); this.flowLayoutPanel_TopButtons.SuspendLayout(); this.menuStrip1.SuspendLayout(); this.flowLayoutPanel_LeftListXianLu.SuspendLayout(); this.panel_XianLu.SuspendLayout(); this.contextMenuStrip_Left.SuspendLayout(); this.flowLayoutPanel_RightListTask.SuspendLayout(); this.panel_Task.SuspendLayout(); this.contextMenuStrip_Right.SuspendLayout(); this.panelDesktop.SuspendLayout(); base.SuspendLayout(); this.panelCenter.BackColor = System.Drawing.SystemColors.ActiveCaption; this.panelCenter.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.panelCenter.Controls.Add(this.axMap); this.panelCenter.Dock = System.Windows.Forms.DockStyle.Fill; this.panelCenter.Location = new System.Drawing.Point(240, 55); this.panelCenter.Name = "panelCenter"; this.panelCenter.Size = new System.Drawing.Size(793, 736); this.panelCenter.TabIndex = 0; this.axMap.Dock = System.Windows.Forms.DockStyle.Fill; this.axMap.Enabled = true; this.axMap.Location = new System.Drawing.Point(0, 0); this.axMap.Name = "axMap"; this.axMap.OcxState = (System.Windows.Forms.AxHost.State)resources.GetObject("axMap.OcxState"); this.axMap.Size = new System.Drawing.Size(789, 732); this.axMap.TabIndex = 0; this.axMap.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(axMap_PreviewKeyDown); this.flowLayoutPanel_TopButtons.AutoScroll = true; this.flowLayoutPanel_TopButtons.AutoSize = true; this.flowLayoutPanel_TopButtons.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.flowLayoutPanel_TopButtons.Controls.Add(this.menuStrip1); this.flowLayoutPanel_TopButtons.Controls.Add(this.buttonCreateXianLu); this.flowLayoutPanel_TopButtons.Controls.Add(this.buttonCanShuJiSuan); this.flowLayoutPanel_TopButtons.Controls.Add(this.buttonLightningProofCompute); this.flowLayoutPanel_TopButtons.Controls.Add(this.buttonFangLeiGaiZao); this.flowLayoutPanel_TopButtons.Controls.Add(this.buttonReport); this.flowLayoutPanel_TopButtons.Controls.Add(this.buttonRepeat); this.flowLayoutPanel_TopButtons.Controls.Add(this.button1); this.flowLayoutPanel_TopButtons.Dock = System.Windows.Forms.DockStyle.Top; this.flowLayoutPanel_TopButtons.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel_TopButtons.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel_TopButtons.Name = "flowLayoutPanel_TopButtons"; this.flowLayoutPanel_TopButtons.Size = new System.Drawing.Size(1273, 55); this.flowLayoutPanel_TopButtons.TabIndex = 1; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[1] { this.详情ToolStripMenuItem }); this.menuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(52, 25); this.menuStrip1.TabIndex = 3; this.menuStrip1.Text = "menuStrip1"; this.详情ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[3] { this.线路详情ToolStripMenuItem1, this.线路删除ToolStripMenuItem, this.任务删除ToolStripMenuItem }); this.详情ToolStripMenuItem.Name = "详情ToolStripMenuItem"; this.详情ToolStripMenuItem.Size = new System.Drawing.Size(44, 21); this.详情ToolStripMenuItem.Text = "操作"; this.线路详情ToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[1] { this.toolStripMenuItem4 }); this.线路详情ToolStripMenuItem1.Name = "线路详情ToolStripMenuItem1"; this.线路详情ToolStripMenuItem1.Size = new System.Drawing.Size(124, 22); this.线路详情ToolStripMenuItem1.Text = "线路详情"; this.线路详情ToolStripMenuItem1.Click += new System.EventHandler(详情ToolStripMenuItem1_Click); this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Size = new System.Drawing.Size(192, 22); this.toolStripMenuItem4.Text = "toolStripMenuItem4"; this.线路删除ToolStripMenuItem.Name = "线路删除ToolStripMenuItem"; this.线路删除ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); this.线路删除ToolStripMenuItem.Text = "线路删除"; this.任务删除ToolStripMenuItem.Name = "任务删除ToolStripMenuItem"; this.任务删除ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); this.任务删除ToolStripMenuItem.Text = "任务删除"; this.buttonCreateXianLu.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonCreateXianLu.Location = new System.Drawing.Point(55, 3); this.buttonCreateXianLu.Name = "buttonCreateXianLu"; this.buttonCreateXianLu.Size = new System.Drawing.Size(135, 45); this.buttonCreateXianLu.TabIndex = 0; this.buttonCreateXianLu.Text = "创建线路"; this.buttonCreateXianLu.UseVisualStyleBackColor = true; this.buttonCreateXianLu.Click += new System.EventHandler(buttonCreateXianLu_Click); this.buttonCanShuJiSuan.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonCanShuJiSuan.Location = new System.Drawing.Point(196, 3); this.buttonCanShuJiSuan.Name = "buttonCanShuJiSuan"; this.buttonCanShuJiSuan.Size = new System.Drawing.Size(135, 45); this.buttonCanShuJiSuan.TabIndex = 0; this.buttonCanShuJiSuan.Text = "参数计算"; this.buttonCanShuJiSuan.UseVisualStyleBackColor = true; this.buttonCanShuJiSuan.Click += new System.EventHandler(buttonCanShuJiSuan_Click); this.buttonLightningProofCompute.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonLightningProofCompute.Location = new System.Drawing.Point(337, 3); this.buttonLightningProofCompute.Name = "buttonLightningProofCompute"; this.buttonLightningProofCompute.Size = new System.Drawing.Size(135, 45); this.buttonLightningProofCompute.TabIndex = 0; this.buttonLightningProofCompute.Text = "防雷计算"; this.buttonLightningProofCompute.UseVisualStyleBackColor = true; this.buttonLightningProofCompute.Click += new System.EventHandler(buttonLightningProofCompute_Click); this.buttonFangLeiGaiZao.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonFangLeiGaiZao.Location = new System.Drawing.Point(478, 3); this.buttonFangLeiGaiZao.Name = "buttonFangLeiGaiZao"; this.buttonFangLeiGaiZao.Size = new System.Drawing.Size(135, 45); this.buttonFangLeiGaiZao.TabIndex = 0; this.buttonFangLeiGaiZao.Text = "防雷改造"; this.buttonFangLeiGaiZao.UseVisualStyleBackColor = true; this.buttonFangLeiGaiZao.Click += new System.EventHandler(buttonFangLeiGaiZao_Click); this.buttonReport.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonReport.Location = new System.Drawing.Point(619, 3); this.buttonReport.Name = "buttonReport"; this.buttonReport.Size = new System.Drawing.Size(135, 45); this.buttonReport.TabIndex = 0; this.buttonReport.Text = "报告生成"; this.buttonReport.UseVisualStyleBackColor = true; this.buttonReport.Click += new System.EventHandler(buttonReport_Click); this.buttonRepeat.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonRepeat.Location = new System.Drawing.Point(760, 3); this.buttonRepeat.Name = "buttonRepeat"; this.buttonRepeat.Size = new System.Drawing.Size(135, 45); this.buttonRepeat.TabIndex = 1; this.buttonRepeat.Text = "故障复现"; this.buttonRepeat.UseVisualStyleBackColor = true; this.buttonRepeat.Click += new System.EventHandler(buttonRepeat_Click); this.button1.Font = new System.Drawing.Font("幼圆", 18f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.button1.Location = new System.Drawing.Point(901, 3); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(135, 45); this.button1.TabIndex = 2; this.button1.Text = "绘图"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(button1_Click); this.flowLayoutPanel_LeftListXianLu.AutoScroll = true; this.flowLayoutPanel_LeftListXianLu.AutoSize = true; this.flowLayoutPanel_LeftListXianLu.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.flowLayoutPanel_LeftListXianLu.Controls.Add(this.label1); this.flowLayoutPanel_LeftListXianLu.Controls.Add(this.panel_XianLu); this.flowLayoutPanel_LeftListXianLu.Dock = System.Windows.Forms.DockStyle.Left; this.flowLayoutPanel_LeftListXianLu.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel_LeftListXianLu.Location = new System.Drawing.Point(0, 55); this.flowLayoutPanel_LeftListXianLu.Name = "flowLayoutPanel_LeftListXianLu"; this.flowLayoutPanel_LeftListXianLu.Size = new System.Drawing.Size(240, 736); this.flowLayoutPanel_LeftListXianLu.TabIndex = 4; this.label1.AutoSize = true; this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label1.Font = new System.Drawing.Font("宋体", 14.25f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.label1.Location = new System.Drawing.Point(3, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(179, 21); this.label1.TabIndex = 0; this.label1.Text = " 输电线路 "; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.panel_XianLu.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel_XianLu.ContextMenuStrip = this.contextMenuStrip_Left; this.panel_XianLu.Controls.Add(this.label_Num_GanTa); this.panel_XianLu.Controls.Add(this.label_NameXianLu_L); this.panel_XianLu.Controls.Add(this.checkBox_XianLu); this.panel_XianLu.Controls.Add(this.label_DYDJ_L); this.panel_XianLu.Controls.Add(this.label_AC_DC_L); this.panel_XianLu.Location = new System.Drawing.Point(3, 24); this.panel_XianLu.Name = "panel_XianLu"; this.panel_XianLu.Size = new System.Drawing.Size(230, 45); this.panel_XianLu.TabIndex = 1; this.panel_XianLu.DoubleClick += new System.EventHandler(panel_XianLu_DoubleClick); this.panel_XianLu.MouseDown += new System.Windows.Forms.MouseEventHandler(panel_XianLu_MouseDown); this.contextMenuStrip_Left.Items.AddRange(new System.Windows.Forms.ToolStripItem[2] { this.toolStripMenuItem1, this.toolStripMenuItem2 }); this.contextMenuStrip_Left.Name = "contextMenuStrip_Left"; this.contextMenuStrip_Left.Size = new System.Drawing.Size(101, 48); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(100, 22); this.toolStripMenuItem1.Text = "详情"; this.toolStripMenuItem1.Click += new System.EventHandler(toolStripMenuItem1_Click); this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Size = new System.Drawing.Size(100, 22); this.toolStripMenuItem2.Text = "删除"; this.toolStripMenuItem2.Click += new System.EventHandler(toolStripMenuItem2_Click); this.label_Num_GanTa.AutoSize = true; this.label_Num_GanTa.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_Num_GanTa.Location = new System.Drawing.Point(113, 26); this.label_Num_GanTa.Name = "label_Num_GanTa"; this.label_Num_GanTa.Size = new System.Drawing.Size(65, 12); this.label_Num_GanTa.TabIndex = 1; this.label_Num_GanTa.Tag = "1"; this.label_Num_GanTa.Text = "[13]个杆塔"; this.label_Num_GanTa.DoubleClick += new System.EventHandler(label_Num_GanTa_DoubleClick); this.label_NameXianLu_L.AutoSize = true; this.label_NameXianLu_L.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_NameXianLu_L.Location = new System.Drawing.Point(6, 7); this.label_NameXianLu_L.Name = "label_NameXianLu_L"; this.label_NameXianLu_L.Size = new System.Drawing.Size(53, 12); this.label_NameXianLu_L.TabIndex = 1; this.label_NameXianLu_L.Text = "线路名称"; this.checkBox_XianLu.AutoSize = true; this.checkBox_XianLu.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.checkBox_XianLu.Location = new System.Drawing.Point(189, 3); this.checkBox_XianLu.Name = "checkBox_XianLu"; this.checkBox_XianLu.Size = new System.Drawing.Size(36, 16); this.checkBox_XianLu.TabIndex = 3; this.checkBox_XianLu.Text = "显"; this.checkBox_XianLu.UseVisualStyleBackColor = true; this.checkBox_XianLu.CheckedChanged += new System.EventHandler(checkBox_XianLu_CheckedChanged); this.label_DYDJ_L.AutoSize = true; this.label_DYDJ_L.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_DYDJ_L.Location = new System.Drawing.Point(54, 26); this.label_DYDJ_L.Name = "label_DYDJ_L"; this.label_DYDJ_L.Size = new System.Drawing.Size(35, 12); this.label_DYDJ_L.TabIndex = 1; this.label_DYDJ_L.Text = "110kV"; this.label_AC_DC_L.AutoSize = true; this.label_AC_DC_L.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_AC_DC_L.Location = new System.Drawing.Point(6, 26); this.label_AC_DC_L.Name = "label_AC_DC_L"; this.label_AC_DC_L.Size = new System.Drawing.Size(29, 12); this.label_AC_DC_L.TabIndex = 1; this.label_AC_DC_L.Text = "交流"; this.flowLayoutPanel_RightListTask.AutoScroll = true; this.flowLayoutPanel_RightListTask.AutoSize = true; this.flowLayoutPanel_RightListTask.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.flowLayoutPanel_RightListTask.Controls.Add(this.label2); this.flowLayoutPanel_RightListTask.Controls.Add(this.panel_Task); this.flowLayoutPanel_RightListTask.Dock = System.Windows.Forms.DockStyle.Right; this.flowLayoutPanel_RightListTask.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel_RightListTask.Location = new System.Drawing.Point(1033, 55); this.flowLayoutPanel_RightListTask.Name = "flowLayoutPanel_RightListTask"; this.flowLayoutPanel_RightListTask.Size = new System.Drawing.Size(240, 736); this.flowLayoutPanel_RightListTask.TabIndex = 5; this.label2.AutoSize = true; this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label2.Font = new System.Drawing.Font("宋体", 14.25f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.label2.Location = new System.Drawing.Point(3, 0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(179, 21); this.label2.TabIndex = 0; this.label2.Text = " 防雷计算 "; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.panel_Task.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel_Task.ContextMenuStrip = this.contextMenuStrip_Right; this.panel_Task.Controls.Add(this.buttonStart); this.panel_Task.Controls.Add(this.buttonLook); this.panel_Task.Controls.Add(this.label_NameTask); this.panel_Task.Controls.Add(this.label_NameXianLu_R); this.panel_Task.Controls.Add(this.label_DYDJ_R); this.panel_Task.Controls.Add(this.label_AC_DC_R); this.panel_Task.Location = new System.Drawing.Point(3, 24); this.panel_Task.Name = "panel_Task"; this.panel_Task.Size = new System.Drawing.Size(230, 52); this.panel_Task.TabIndex = 2; this.panel_Task.DoubleClick += new System.EventHandler(panel_Task_DoubleClick); this.panel_Task.MouseDown += new System.Windows.Forms.MouseEventHandler(panel_Task_MouseDown); this.contextMenuStrip_Right.Items.AddRange(new System.Windows.Forms.ToolStripItem[1] { this.toolStripMenuItem3 }); this.contextMenuStrip_Right.Name = "contextMenuStrip_Right"; this.contextMenuStrip_Right.Size = new System.Drawing.Size(101, 26); this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Size = new System.Drawing.Size(100, 22); this.toolStripMenuItem3.Text = "删除"; this.toolStripMenuItem3.Click += new System.EventHandler(toolStripMenuItem3_Click); this.buttonStart.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonStart.Location = new System.Drawing.Point(119, 3); this.buttonStart.Name = "buttonStart"; this.buttonStart.Size = new System.Drawing.Size(51, 23); this.buttonStart.TabIndex = 2; this.buttonStart.Text = "开始"; this.buttonStart.UseVisualStyleBackColor = true; this.buttonStart.Click += new System.EventHandler(buttonStart_Click); this.buttonLook.Font = new System.Drawing.Font("宋体", 10.5f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134); this.buttonLook.Location = new System.Drawing.Point(174, 3); this.buttonLook.Name = "buttonLook"; this.buttonLook.Size = new System.Drawing.Size(51, 23); this.buttonLook.TabIndex = 2; this.buttonLook.Text = "查看"; this.buttonLook.UseVisualStyleBackColor = true; this.buttonLook.Click += new System.EventHandler(buttonLook_Click); this.label_NameTask.AutoSize = true; this.label_NameTask.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_NameTask.Location = new System.Drawing.Point(3, 9); this.label_NameTask.Name = "label_NameTask"; this.label_NameTask.Size = new System.Drawing.Size(113, 12); this.label_NameTask.TabIndex = 1; this.label_NameTask.Text = "任务名称1234568901"; this.label_NameXianLu_R.AutoSize = true; this.label_NameXianLu_R.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_NameXianLu_R.Location = new System.Drawing.Point(6, 33); this.label_NameXianLu_R.Name = "label_NameXianLu_R"; this.label_NameXianLu_R.Size = new System.Drawing.Size(53, 12); this.label_NameXianLu_R.TabIndex = 1; this.label_NameXianLu_R.Text = "线路名称"; this.label_DYDJ_R.AutoSize = true; this.label_DYDJ_R.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_DYDJ_R.Location = new System.Drawing.Point(149, 33); this.label_DYDJ_R.Name = "label_DYDJ_R"; this.label_DYDJ_R.Size = new System.Drawing.Size(53, 12); this.label_DYDJ_R.TabIndex = 1; this.label_DYDJ_R.Text = "电压等级"; this.label_AC_DC_R.AutoSize = true; this.label_AC_DC_R.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.label_AC_DC_R.Location = new System.Drawing.Point(101, 33); this.label_AC_DC_R.Name = "label_AC_DC_R"; this.label_AC_DC_R.Size = new System.Drawing.Size(29, 12); this.label_AC_DC_R.TabIndex = 1; this.label_AC_DC_R.Text = "交流"; this.panelDesktop.Controls.Add(this.panelCenter); this.panelDesktop.Controls.Add(this.flowLayoutPanel_LeftListXianLu); this.panelDesktop.Controls.Add(this.flowLayoutPanel_RightListTask); this.panelDesktop.Controls.Add(this.flowLayoutPanel_TopButtons); this.panelDesktop.Dock = System.Windows.Forms.DockStyle.Fill; this.panelDesktop.Location = new System.Drawing.Point(0, 0); this.panelDesktop.Name = "panelDesktop"; this.panelDesktop.Size = new System.Drawing.Size(1273, 791); this.panelDesktop.TabIndex = 6; base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(1273, 791); base.Controls.Add(this.panelDesktop); base.MainMenuStrip = this.menuStrip1; base.Name = "FormDesktop"; base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Form1"; base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(FormDesktop_FormClosing); base.Load += new System.EventHandler(FormDesktop_Load); this.panelCenter.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)this.axMap).EndInit(); this.flowLayoutPanel_TopButtons.ResumeLayout(false); this.flowLayoutPanel_TopButtons.PerformLayout(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.flowLayoutPanel_LeftListXianLu.ResumeLayout(false); this.flowLayoutPanel_LeftListXianLu.PerformLayout(); this.panel_XianLu.ResumeLayout(false); this.panel_XianLu.PerformLayout(); this.contextMenuStrip_Left.ResumeLayout(false); this.flowLayoutPanel_RightListTask.ResumeLayout(false); this.flowLayoutPanel_RightListTask.PerformLayout(); this.panel_Task.ResumeLayout(false); this.panel_Task.PerformLayout(); this.contextMenuStrip_Right.ResumeLayout(false); this.panelDesktop.ResumeLayout(false); this.panelDesktop.PerformLayout(); base.ResumeLayout(false); } }