diff --git a/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.Designer.cs b/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.Designer.cs index c68335a..d53bf5d 100644 --- a/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.Designer.cs +++ b/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.Designer.cs @@ -92,6 +92,8 @@ this.smartKeyboard.Text = "smartKeyboard1"; this.smartKeyboard.ThemeStyle = SmartX.SmartKeyboard.KEYBOARDTHEMESTYLE.CUSTOMIZED_LITE; this.smartKeyboard.TopMargin = 5; + this.smartKeyboard.OnXKeyClick += new System.EventHandler(this.smartKeyboard_OnXKeyClick); + this.smartKeyboard.KeyDown += new System.Windows.Forms.KeyEventHandler(this.smartKeyboard_KeyDown); // // DialogFormUserEditorKeyboard // diff --git a/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.cs b/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.cs index 404885b..7531c3e 100644 --- a/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.cs +++ b/INT99DC_7C/DialogForms/DialogFormUserEditorKeyboard.cs @@ -24,6 +24,7 @@ namespace INT99DC_7C.DialogForms this.textBox.Text = value; this.RetStringValue = value; + this.InitializeControl(); this.DefaultSetting(); } #endregion @@ -37,10 +38,18 @@ namespace INT99DC_7C.DialogForms #endregion #region Method + private void InitializeControl() + { + int x = 0, y = 0; + + x = Screen.PrimaryScreen.Bounds.Width / 2 - this.Size.Width / 2; + y = Screen.PrimaryScreen.Bounds.Height / 2 - this.Size.Height / 2; + + this.Location = new Point(x, y); + this.Size = new Size(710, 470); + } private void DefaultSetting() { - this.Location = new Point(112, 210); - this.smartKeyboard.TargetInputObject = this.textBox; this.smartKeyboard.KeyboardType = SmartX.SmartKeyboard.KEYBOARDTYPES.NORMAL; this.smartKeyboard.Show(); @@ -52,32 +61,36 @@ namespace INT99DC_7C.DialogForms this.DialogResult = DialogResult.OK; this.Close(); + this.Dispose(); } private void KeyActionEsc() { this.DialogResult = DialogResult.Cancel; this.Close(); + this.Dispose(); } #endregion #region Event Handler private void textBox_KeyPress(object sender, KeyPressEventArgs e) { - if (e.KeyChar == '\r') - this.KeyActionEnter(); - else if (e.KeyChar == 27) - this.KeyActionEsc(); + //if (e.KeyChar == '\r') + // this.KeyActionEnter(); + //else if (e.KeyChar == 27) + // this.KeyActionEsc(); } private void smartKeyboard_OnXKeyClick(object sender, EventArgs e) { this.KeyActionEsc(); } - #endregion - private void smartKeyboard_KeyDown(object sender, KeyEventArgs e) { - + if (e.KeyCode == Keys.Enter) + this.KeyActionEnter(); + else if (e.KeyCode == Keys.Escape) + this.KeyActionEsc(); } + #endregion } } \ No newline at end of file diff --git a/INT99DC_7C/Forms/FormUserEditor.designer.cs b/INT99DC_7C/Forms/FormUserEditor.designer.cs index 63ce8b2..a6a1eed 100644 --- a/INT99DC_7C/Forms/FormUserEditor.designer.cs +++ b/INT99DC_7C/Forms/FormUserEditor.designer.cs @@ -1257,7 +1257,7 @@ this.labelCaution1.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Regular); this.labelCaution1.InitVisible = true; this.labelCaution1.LineSpacing = 0F; - this.labelCaution1.Location = new System.Drawing.Point(27, 704); + this.labelCaution1.Location = new System.Drawing.Point(27, 693); this.labelCaution1.Name = "labelCaution1"; this.labelCaution1.Size = new System.Drawing.Size(750, 20); this.labelCaution1.TabIndex = 213; @@ -1276,7 +1276,7 @@ this.labelCaution2.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Regular); this.labelCaution2.InitVisible = true; this.labelCaution2.LineSpacing = 0F; - this.labelCaution2.Location = new System.Drawing.Point(27, 730); + this.labelCaution2.Location = new System.Drawing.Point(27, 719); this.labelCaution2.Name = "labelCaution2"; this.labelCaution2.Size = new System.Drawing.Size(750, 20); this.labelCaution2.TabIndex = 214; @@ -1295,7 +1295,7 @@ this.labelCaution.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Bold); this.labelCaution.InitVisible = true; this.labelCaution.LineSpacing = 0F; - this.labelCaution.Location = new System.Drawing.Point(27, 678); + this.labelCaution.Location = new System.Drawing.Point(27, 667); this.labelCaution.Name = "labelCaution"; this.labelCaution.Size = new System.Drawing.Size(750, 20); this.labelCaution.TabIndex = 215;