InputInfo.cs
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 App
{
public partial class InputInfo : FrmBase
{
public MetroProduct mp;
public InputInfo(MetroProduct mp)
{
this.SetLanguage(this);
InitializeComponent();
this.mp = mp;
}
private void saveButton_Click(object sender, EventArgs e)
{
saveProductName();
}
private void saveProductName()
{
mp.productName2 = this.textBox1.Text.ToString();
this.DialogResult = DialogResult.OK;
this.Close();
}
private void cancelButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void InputInfo_Load(object sender, EventArgs e)
{
this.Text = getMsg("enterProductName");
this.label1.Text = getMsg("productName");
this.saveButton.Text = getMsg("FrmAdjustbtn_Save");
this.cancelButton.Text = getMsg("FrmAdjustbtn_Cancel");
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
saveProductName();
}
}
}
}