private void GetKeyImages() { IniFile ini = new IniFile(); ini.Load(IniData.SettingIniFile); IniSection resSect = ini["Resources"]; string keyPadResPath = System.IO.Directory.GetCurrentDirectory() + $@"{resSect["ResourceFolder"]}{resSect["KeyPadFolder"]}"; Btn_Key_1.BackgroundImage = Image.FromFile(keyPadResPath + @"\n1.png"); Btn_Key_2.BackgroundImage = Image.FromFile(keyPadResPath + @"\n2.png"); Btn_Key_3.BackgroundImage = Image.FromFile(keyPadResPath + @"\n3.png"); Btn_Key_4.BackgroundImage = Image.FromFile(keyPadResPath + @"\n4.png"); Btn_Key_5.BackgroundImage = Image.FromFile(keyPadResPath + @"\n5.png"); Btn_Key_6.BackgroundImage = Image.FromFile(keyPadResPath + @"\n6.png"); Btn_Key_7.BackgroundImage = Image.FromFile(keyPadResPath + @"\n7.png"); Btn_Key_8.BackgroundImage = Image.FromFile(keyPadResPath + @"\n8.png"); Btn_Key_9.BackgroundImage = Image.FromFile(keyPadResPath + @"\n9.png"); Btn_Key_0.BackgroundImage = Image.FromFile(keyPadResPath + @"\n0.png"); this.BackgroundImage = Image.FromFile(keyPadResPath + @"\bg_num.png"); Btn_Key_BackSpace.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_arrow.png"); Btn_Key_Enter.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_enter.png"); Btn_Exit.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_exit.png"); }
// 버튼에 이미지를 할당하는 함수 private void GetKeyImages(Shift shift) { IniFile ini = new IniFile(); ini.Load(IniData.SettingIniFile); IniSection resSect = ini["Resources"]; string keyPadResPath = System.IO.Directory.GetCurrentDirectory() + $@"{resSect["ResourceFolder"]}{resSect["KeyPadFolder"]}"; if (shift == Shift.UPPER) { Btn_Key_A.BackgroundImage = Image.FromFile(keyPadResPath + @"\TA.png"); Btn_Key_B.BackgroundImage = Image.FromFile(keyPadResPath + @"\TB.png"); Btn_Key_C.BackgroundImage = Image.FromFile(keyPadResPath + @"\TC.png"); Btn_Key_D.BackgroundImage = Image.FromFile(keyPadResPath + @"\TD.png"); Btn_Key_E.BackgroundImage = Image.FromFile(keyPadResPath + @"\TE.png"); Btn_Key_F.BackgroundImage = Image.FromFile(keyPadResPath + @"\TF.png"); Btn_Key_G.BackgroundImage = Image.FromFile(keyPadResPath + @"\TG.png"); Btn_Key_H.BackgroundImage = Image.FromFile(keyPadResPath + @"\TH.png"); Btn_Key_I.BackgroundImage = Image.FromFile(keyPadResPath + @"\TI.png"); Btn_Key_J.BackgroundImage = Image.FromFile(keyPadResPath + @"\TJ.png"); Btn_Key_K.BackgroundImage = Image.FromFile(keyPadResPath + @"\TK.png"); Btn_Key_L.BackgroundImage = Image.FromFile(keyPadResPath + @"\TL.png"); Btn_Key_M.BackgroundImage = Image.FromFile(keyPadResPath + @"\TM.png"); Btn_Key_N.BackgroundImage = Image.FromFile(keyPadResPath + @"\TN.png"); Btn_Key_O.BackgroundImage = Image.FromFile(keyPadResPath + @"\TO.png"); Btn_Key_P.BackgroundImage = Image.FromFile(keyPadResPath + @"\TP.png"); Btn_Key_Q.BackgroundImage = Image.FromFile(keyPadResPath + @"\TQ.png"); Btn_Key_R.BackgroundImage = Image.FromFile(keyPadResPath + @"\TR.png"); Btn_Key_S.BackgroundImage = Image.FromFile(keyPadResPath + @"\TS.png"); Btn_Key_T.BackgroundImage = Image.FromFile(keyPadResPath + @"\TT.png"); Btn_Key_U.BackgroundImage = Image.FromFile(keyPadResPath + @"\TU.png"); Btn_Key_V.BackgroundImage = Image.FromFile(keyPadResPath + @"\TV.png"); Btn_Key_W.BackgroundImage = Image.FromFile(keyPadResPath + @"\TW.png"); Btn_Key_X.BackgroundImage = Image.FromFile(keyPadResPath + @"\TX.png"); Btn_Key_Y.BackgroundImage = Image.FromFile(keyPadResPath + @"\TY.png"); Btn_Key_Z.BackgroundImage = Image.FromFile(keyPadResPath + @"\TZ.png"); Btn_Key_1.BackgroundImage = Image.FromFile(keyPadResPath + @"\n1_Sp.png"); Btn_Key_2.BackgroundImage = Image.FromFile(keyPadResPath + @"\n2_Sp.png"); Btn_Key_3.BackgroundImage = Image.FromFile(keyPadResPath + @"\n3_Sp.png"); Btn_Key_4.BackgroundImage = Image.FromFile(keyPadResPath + @"\n4_Sp.png"); Btn_Key_5.BackgroundImage = Image.FromFile(keyPadResPath + @"\n5_Sp.png"); Btn_Key_6.BackgroundImage = Image.FromFile(keyPadResPath + @"\n6_Sp.png"); Btn_Key_7.BackgroundImage = Image.FromFile(keyPadResPath + @"\n7_Sp.png"); Btn_Key_8.BackgroundImage = Image.FromFile(keyPadResPath + @"\n8_Sp.png"); Btn_Key_9.BackgroundImage = Image.FromFile(keyPadResPath + @"\n9_Sp.png"); Btn_Key_0.BackgroundImage = Image.FromFile(keyPadResPath + @"\n0_Sp.png"); Btn_Key_Bar.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_underbar.png"); } else if (shift == Shift.LOWER) { Btn_Key_A.BackgroundImage = Image.FromFile(keyPadResPath + @"\TA_Little.png"); Btn_Key_B.BackgroundImage = Image.FromFile(keyPadResPath + @"\TB_Little.png"); Btn_Key_C.BackgroundImage = Image.FromFile(keyPadResPath + @"\TC_Little.png"); Btn_Key_D.BackgroundImage = Image.FromFile(keyPadResPath + @"\TD_Little.png"); Btn_Key_E.BackgroundImage = Image.FromFile(keyPadResPath + @"\TE_Little.png"); Btn_Key_F.BackgroundImage = Image.FromFile(keyPadResPath + @"\TF_Little.png"); Btn_Key_G.BackgroundImage = Image.FromFile(keyPadResPath + @"\TG_Little.png"); Btn_Key_H.BackgroundImage = Image.FromFile(keyPadResPath + @"\TH_Little.png"); Btn_Key_I.BackgroundImage = Image.FromFile(keyPadResPath + @"\TI_Little.png"); Btn_Key_J.BackgroundImage = Image.FromFile(keyPadResPath + @"\TJ_Little.png"); Btn_Key_K.BackgroundImage = Image.FromFile(keyPadResPath + @"\TK_Little.png"); Btn_Key_L.BackgroundImage = Image.FromFile(keyPadResPath + @"\TL_Little.png"); Btn_Key_M.BackgroundImage = Image.FromFile(keyPadResPath + @"\TM_Little.png"); Btn_Key_N.BackgroundImage = Image.FromFile(keyPadResPath + @"\TN_Little.png"); Btn_Key_O.BackgroundImage = Image.FromFile(keyPadResPath + @"\TO_Little.png"); Btn_Key_P.BackgroundImage = Image.FromFile(keyPadResPath + @"\TP_Little.png"); Btn_Key_Q.BackgroundImage = Image.FromFile(keyPadResPath + @"\TQ_Little.png"); Btn_Key_R.BackgroundImage = Image.FromFile(keyPadResPath + @"\TR_Little.png"); Btn_Key_S.BackgroundImage = Image.FromFile(keyPadResPath + @"\TS_Little.png"); Btn_Key_T.BackgroundImage = Image.FromFile(keyPadResPath + @"\TT_Little.png"); Btn_Key_U.BackgroundImage = Image.FromFile(keyPadResPath + @"\TU_Little.png"); Btn_Key_V.BackgroundImage = Image.FromFile(keyPadResPath + @"\TV_Little.png"); Btn_Key_W.BackgroundImage = Image.FromFile(keyPadResPath + @"\TW_Little.png"); Btn_Key_X.BackgroundImage = Image.FromFile(keyPadResPath + @"\TX_Little.png"); Btn_Key_Y.BackgroundImage = Image.FromFile(keyPadResPath + @"\TY_Little.png"); Btn_Key_Z.BackgroundImage = Image.FromFile(keyPadResPath + @"\TZ_Little.png"); Btn_Key_1.BackgroundImage = Image.FromFile(keyPadResPath + @"\n1.png"); Btn_Key_2.BackgroundImage = Image.FromFile(keyPadResPath + @"\n2.png"); Btn_Key_3.BackgroundImage = Image.FromFile(keyPadResPath + @"\n3.png"); Btn_Key_4.BackgroundImage = Image.FromFile(keyPadResPath + @"\n4.png"); Btn_Key_5.BackgroundImage = Image.FromFile(keyPadResPath + @"\n5.png"); Btn_Key_6.BackgroundImage = Image.FromFile(keyPadResPath + @"\n6.png"); Btn_Key_7.BackgroundImage = Image.FromFile(keyPadResPath + @"\n7.png"); Btn_Key_8.BackgroundImage = Image.FromFile(keyPadResPath + @"\n8.png"); Btn_Key_9.BackgroundImage = Image.FromFile(keyPadResPath + @"\n9.png"); Btn_Key_0.BackgroundImage = Image.FromFile(keyPadResPath + @"\n0.png"); Btn_Key_Bar.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_bar.png"); } this.BackgroundImage = Image.FromFile(keyPadResPath + @"\bg_num.png"); Btn_Key_BackSpace.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_arrow.png"); Btn_Key_Enter.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_enter.png"); Btn_Exit.BackgroundImage = Image.FromFile(keyPadResPath + @"\n_exit.png"); }
public IniSection(IniSection values, IEqualityComparer <string> stringComparer) { this.values = new Dictionary <string, IniValue>(values.values, stringComparer); }
public IniSection(IniSection values) : this(values, IniFile.DefaultComparer) { }
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; } }