123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace IControls_FireManager
- {
- public partial class Form_MapDesigner_Rename : Form
- {
- // 원래 페이지 노드의 키와 텍스트
- public string Original_PageNodeKey = null;
- public string Original_PageNodeText = null;
- // 관할수신기 아이디 정보
- public string Seleted_RECEIVER_ID = null;
- // 생성자
- public Form_MapDesigner_Rename(string RECEIVER_ID, string PageNodeKey, string PageNodeText)
- {
- InitializeComponent();
- ///
- /// 이벤트
- ///
-
- // 폼닫기 이벤트를 등록 (이벤트 핸들러 해제용)
- this.FormClosing += new FormClosingEventHandler(CreateForm_FormClosing);
- // 윈도우 스타일 변경 이벤트 핸들러 등록
- _Event.WindowStyleSet_SendMessage_Event += new _Event.WindowStyleSet_SendMessage_Handler(_Event_WindowStyleSet_SendMessage_Event);
- ///
- /// 스타일 변경
- ///
- UI_Style_Initialize();
- // 트리 이름
- Original_PageNodeText = this.EditBox_PageName.Text = PageNodeText;
- // 실제 키값
- Original_PageNodeKey = PageNodeKey;
- // 관할 수신기 정보
- Seleted_RECEIVER_ID = RECEIVER_ID;
- }
-
- // 폼닫기 이벤트를 등록 (이벤트 핸들러 해제용)
- public void CreateForm_FormClosing(object sender, FormClosingEventArgs e)
- {
- // 윈도우 스타일 변경 이벤트 핸들러 해제
- _Event.WindowStyleSet_SendMessage_Event -= new _Event.WindowStyleSet_SendMessage_Handler(_Event_WindowStyleSet_SendMessage_Event);
- }
- // 윈도우 스타일 변경 이벤트
- public void _Event_WindowStyleSet_SendMessage_Event()
- {
- UI_Style_Initialize();
- }
- // 스타일 초기화 함수
- private void UI_Style_Initialize()
- {
-
- }
- private void UiButton_Page_Rename_Click(object sender, EventArgs e)
- {
- //공백제거
- this.EditBox_PageName.Text = this.EditBox_PageName.Text.Trim();
- // 널값 허용안함
- if (this.EditBox_PageName.Text.Length == 0 || this.EditBox_PageName.Text == null)
- {
- _Popup.Create(Popup_Type.Confirm, Popup_Style.Normal, _Text.Warnning, 300, 150, _Text.NullPageNameInform, 0);
- }
- // 특수문자 허용안함
- else if (_Error.Data_Confirm_NotDefineString(this.EditBox_PageName.Text.Trim()) != null)
- {
- return;// 상위 비교문에서 팝업처리
- }
- // 동일한 페이지 이름의 경우 변경내용없이 그냥 종료된다
- if (this.EditBox_PageName.Text == Original_PageNodeText)
- {
- // 종료
- this.Close();
- }
- // 이미 저장된 페이지 명이 있다면 경고팝업창
- else if (_Data.Check_Receiver_In_PageName(Seleted_RECEIVER_ID, this.EditBox_PageName.Text) == true)
- {
- _Popup.Create(Popup_Type.Confirm, Popup_Style.Normal, _Text.Warnning, 300, 150, _Text.ContainPageNameInform, 0);
- }
- else
- {
- // 다른이름으로 페이지명 저장
- _Event.Page_Rename_SendMessage_Write(Seleted_RECEIVER_ID, Original_PageNodeKey, this.EditBox_PageName.Text);
- // 종료
- this.Close();
- }
- }
-
-
-
- }
- }
|