private void Frm_NumPadUI_Load(object sender, EventArgs e) { GetKeyImages(); List <Button> btnList = new List <Button>(); btnList.Add(Btn_Key_1); btnList.Add(Btn_Key_2); btnList.Add(Btn_Key_3); btnList.Add(Btn_Key_4); btnList.Add(Btn_Key_5); btnList.Add(Btn_Key_6); btnList.Add(Btn_Key_7); btnList.Add(Btn_Key_8); btnList.Add(Btn_Key_9); btnList.Add(Btn_Key_0); btnList.Add(Btn_Key_BackSpace); btnList.Add(Btn_Key_Enter); ControlLayout ctrlLayout = new ControlLayout(); foreach (Button btn in btnList) { btn.Text = ""; ctrlLayout.MakeCurvedBorder(btn, 18, 18); } Btn_Exit.Text = ""; ctrlLayout.MakeCurvedBorder(Btn_Exit, 8, 8); }
private void Frm_KeyBoardUI_Load(object sender, EventArgs e) { ChangeShiftState(ShiftState.NONE); Lbl_invisible1.Text = ""; Lbl_invisible2.Text = ""; Lbl_invisible3.Text = ""; Lbl_invisible4.Text = ""; Lbl_invisible5.Text = ""; // Shift 작동을 위한 List 등록 btnList_Digit.Add(Btn_Key_1); btnList_Digit.Add(Btn_Key_2); btnList_Digit.Add(Btn_Key_3); btnList_Digit.Add(Btn_Key_4); btnList_Digit.Add(Btn_Key_5); btnList_Digit.Add(Btn_Key_6); btnList_Digit.Add(Btn_Key_7); btnList_Digit.Add(Btn_Key_8); btnList_Digit.Add(Btn_Key_9); btnList_Digit.Add(Btn_Key_0); btnList_Digit.Add(Btn_Key_Bar); btnList_Letter.Add(Btn_Key_A); btnList_Letter.Add(Btn_Key_B); btnList_Letter.Add(Btn_Key_C); btnList_Letter.Add(Btn_Key_D); btnList_Letter.Add(Btn_Key_E); btnList_Letter.Add(Btn_Key_F); btnList_Letter.Add(Btn_Key_G); btnList_Letter.Add(Btn_Key_H); btnList_Letter.Add(Btn_Key_I); btnList_Letter.Add(Btn_Key_J); btnList_Letter.Add(Btn_Key_K); btnList_Letter.Add(Btn_Key_L); btnList_Letter.Add(Btn_Key_M); btnList_Letter.Add(Btn_Key_N); btnList_Letter.Add(Btn_Key_O); btnList_Letter.Add(Btn_Key_P); btnList_Letter.Add(Btn_Key_Q); btnList_Letter.Add(Btn_Key_R); btnList_Letter.Add(Btn_Key_S); btnList_Letter.Add(Btn_Key_T); btnList_Letter.Add(Btn_Key_U); btnList_Letter.Add(Btn_Key_V); btnList_Letter.Add(Btn_Key_W); btnList_Letter.Add(Btn_Key_X); btnList_Letter.Add(Btn_Key_Y); btnList_Letter.Add(Btn_Key_Z); GetKeyImages(Shift.LOWER); // 텍스트 삭제 작업 & 테두리 둥글게 하는 작업을 수행 // 텍스트는 개발 환경에서의 버튼간 구분을 쉽게 하기 위해 넣었으며 // 실제 실행시에는 이미지와 겹쳐 안좋게 보이므로 실행시에는 삭제해야함 ControlLayout ctrlLayout = new ControlLayout(); ctrlLayout.MakeCurvedBorder(this, 18, 18); foreach (Button btn in btnList_Digit) { btn.Text = ""; ctrlLayout.MakeCurvedBorder(btn, 18, 18); } foreach (Button btn in btnList_Letter) { btn.Text = ""; ctrlLayout.MakeCurvedBorder(btn, 18, 18); } Btn_Key_BackSpace.Text = ""; ctrlLayout.MakeCurvedBorder(Btn_Key_BackSpace, 18, 18); Btn_Key_ShiftL.Text = ""; ctrlLayout.MakeCurvedBorder(Btn_Key_ShiftL, 18, 18); Btn_Key_ShiftR.Text = ""; ctrlLayout.MakeCurvedBorder(Btn_Key_ShiftR, 18, 18); Btn_Key_Enter.Text = ""; ctrlLayout.MakeCurvedBorder(Btn_Key_Enter, 24, 24); Btn_Exit.Text = ""; ctrlLayout.MakeCurvedBorder(Btn_Exit, 12, 12); ctrlLayout.MakeCurvedBorder(Txt_Input, 15, 15); }
private void FRM_MessageBox_Load(object sender, EventArgs e) { IniFile ini = new IniFile(); ini.Load(IniData.SettingIniFile); IniSection resSect = ini["Resources"]; string bgResPath = System.IO.Directory.GetCurrentDirectory() + $@"{resSect["ResourceFolder"]}{resSect["BGFolder"]}"; this.BackgroundImage = Image.FromFile(bgResPath + @"\bg_msg.gif"); ControlLayout ctrlLayout = new ControlLayout(); ctrlLayout.Control_Sizing(Pnl_Drag, this.Size, 1, 0.2f); ctrlLayout.Control_Positioning(Pnl_Drag, this.Size, 0.5f, 0.1f); ctrlLayout.Control_Sizing(Lbl_Title, this.Size, 0.95f, 0.15f); ctrlLayout.Control_Positioning(Lbl_Title, this.Size, 0.5f, 0.105f); Lbl_Title.ForeColor = Color.Black; ctrlLayout.Control_Sizing(Lbl_Content, this.Size, 0.95f, 0.55f); ctrlLayout.Control_Positioning(Lbl_Content, this.Size, 0.5f, 0.5f); switch (this.type) { case MessageBoxType.Normal: // 첫번째 버튼을 종료 버튼으로서 사용하고 두번째 버튼은 사용하지 않음 ctrlLayout.Control_Sizing(Btn_First, this.Size, 0.3f, 0.15f); ctrlLayout.Control_Positioning(Btn_First, this.Size, 0.5f, 0.9f); ctrlLayout.MakeCurvedBorder(Btn_First, Btn_First.Width / 8, Btn_First.Height / 4); Btn_First.MouseDown += Btn_Exit_MouseDown; Btn_First.MouseUp += Btn_Exit_MouseUp; Btn_First.Click += Btn_Exit_Click; SetBtn_Exit_Image(Btn_First, false); Btn_Second.Dispose(); break; case MessageBoxType.OkCancel: // 첫번째 버튼을 확인 버튼으로, 두번째 버튼을 취소 버튼으로 사용함 ctrlLayout.Control_Sizing(Btn_First, this.Size, 0.3f, 0.15f); ctrlLayout.Control_Positioning(Btn_First, this.Size, 0.3f, 0.9f); Btn_First.MouseDown += Btn_OK_MouseDown; Btn_First.MouseUp += Btn_OK_MouseUp; Btn_First.Click += Btn_OK_Click; SetBtn_OK_Image(Btn_First, false); ctrlLayout.Control_Sizing(Btn_Second, this.Size, 0.3f, 0.15f); ctrlLayout.Control_Positioning(Btn_Second, this.Size, 0.7f, 0.9f); Btn_Second.MouseDown += Btn_Cancel_MouseDown; Btn_Second.MouseUp += Btn_Cancel_MouseUp; Btn_Second.Click += Btn_Exit_Click; SetBtn_Exit_Image(Btn_Second, false); break; case MessageBoxType.YesNo: ctrlLayout.Control_Sizing(Btn_First, this.Size, 0.3f, 0.15f); ctrlLayout.Control_Positioning(Btn_First, this.Size, 0.3f, 0.9f); Btn_First.MouseDown += Btn_Yes_MouseDown; Btn_First.MouseUp += Btn_Yes_MouseUp; Btn_First.Click += Btn_Yes_Click; SetBtn_Yes_Image(Btn_First, false); ctrlLayout.Control_Sizing(Btn_Second, this.Size, 0.3f, 0.15f); ctrlLayout.Control_Positioning(Btn_Second, this.Size, 0.7f, 0.9f); Btn_Second.MouseDown += Btn_No_MouseDown; Btn_Second.MouseUp += Btn_No_MouseUp; Btn_Second.Click += Btn_No_Click; SetBtn_No_Image(Btn_Second, false); break; } }