123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using System.Collections;
- namespace FPER
- {
-
-
-
-
-
-
- public partial class Form_Popup_CutInfo : Form
- {
-
- public delegate void SetList_Callback(ArrayList Data);
- public delegate void SetForm_Callback(Form Data);
-
- MDIParent mdi = null;
-
- public Form_Popup_CutInfo(MDIParent mdiparent)
- {
- InitializeComponent();
-
- mdi = mdiparent;
-
- this.Load += new EventHandler(Form_Popup_OtherFireAlarm_Load);
-
- this.FormClosing += new FormClosingEventHandler(Form_Popup_OtherFireAlarm_FormClosing);
-
- mdi.Event.CutInfoPopup_Update_Inform_Event += new _Event.CutInfoPopup_Update_Handler(_Event_CutInfoPopup_Update_Inform_Event);
- }
-
- public void Form_Popup_OtherFireAlarm_Load(object sender, EventArgs e)
- {
-
- mdi.Popup.Form_Popup_CutInfo_Enable = true;
-
- _Event_CutInfoPopup_Update_Inform_Event();
- }
-
- public void Form_Popup_OtherFireAlarm_FormClosing(object sender, FormClosingEventArgs e)
- {
-
- this.Hide();
-
- mdi.Popup.Form_Popup_CutInfo_Enable = false;
-
- mdi.Event.CutInfoPopup_Update_Inform_Event -= new _Event.CutInfoPopup_Update_Handler(_Event_CutInfoPopup_Update_Inform_Event);
- }
-
- public void _Event_CutInfoPopup_Update_Inform_Event()
- {
-
- Listview_Fire_Display(mdi.Popup.Form_Popup_CutInfo_List);
-
- Form_Update(this);
- }
-
- public void Listview_Fire_Display(ArrayList Data)
- {
- if (this.listView_CutList.InvokeRequired)
- {
- SetList_Callback d = new SetList_Callback(Listview_Fire_Display);
- this.listView_CutList.Invoke(d, new object[] { Data });
- }
- else
- {
- this.listView_CutList.Items.Clear();
- if (Data != null)
- {
-
- for (int i = 1; i <= Data.Count; i++)
- {
- Listview_AddItem(i, (EventLogInfo)Data[i - 1]);
- }
- }
- }
- }
-
- public void Listview_AddItem(int order, EventLogInfo Data)
- {
-
- string[] data = { " " + order.ToString(), Data.Message };
- ListViewItem item = new ListViewItem(data);
- item.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
- listView_CutList.Items.Add(item);
- }
-
- public void Form_Update(Form Data)
- {
- if (this.InvokeRequired)
- {
- SetForm_Callback d = new SetForm_Callback(Form_Update);
- this.Invoke(d, new object[] { Data });
- }
- else
- {
- this.Update();
- }
- }
- }
- }
|