MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
FormProperty.cs
1using System;
2using System.Collections.Generic;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Threading.Tasks;
9using System.Windows.Forms;
10
11namespace MyCaffe.param.ui
12{
16 public partial class FormProperty : Form
17 {
18 bool m_bNew = false;
19 string m_strName = null;
20 string m_strVal = null;
21
28 public FormProperty(bool bNew, string strName, string strVal)
29 {
30 InitializeComponent();
31
32 m_bNew = bNew;
33 m_strName = strName;
34 m_strVal = strVal;
35 }
36
40 public string Key
41 {
42 get { return m_strName; }
43 }
44
48 public string Value
49 {
50 get { return m_strVal; }
51 }
52
53 private void FormProperty_Load(object sender, EventArgs e)
54 {
55 edtName.Text = m_strName;
56 edtValue.Text = m_strVal;
57
58 if (m_bNew)
59 Text = "New Property";
60 }
61
62 private void btnOK_Click(object sender, EventArgs e)
63 {
64 m_strName = edtName.Text;
65 m_strVal = edtValue.Text;
66 }
67
68 private void timerUI_Tick(object sender, EventArgs e)
69 {
70 if (edtName.Text.Length > 0 && edtValue.Text.Length > 0)
71 btnOK.Enabled = true;
72 else
73 btnOK.Enabled = false;
74 }
75 }
76}
The FormProperty window is used to edit a given key/value pair.
Definition: FormProperty.cs:17
string Value
Returns the property value.
Definition: FormProperty.cs:49
FormProperty(bool bNew, string strName, string strVal)
The constructor.
Definition: FormProperty.cs:28
string Key
Returns the Key (e.g. the property name).
Definition: FormProperty.cs:41