개정판 faba1fc7
dev issue #1230 : edit aveva AttributeInfo
Change-Id: If3a14f65dc236eb73a3af73b0d26104ca0f91aa6
DTI_PID/APIDConverter/Utils/AvevaThread.cs | ||
---|---|---|
229 | 229 |
} |
230 | 230 |
public static void GetAttributeInformationFromForm() |
231 | 231 |
{ |
232 |
List<Tuple<string, string, string, string>> datas = new List<Tuple<string, string, string, string>>(); |
|
232 | 233 |
while (Running.HasFlag(ThreadType.GetAttributeInformationFromForm)) |
233 | 234 |
{ |
234 | 235 |
int handle = FindPropertiesFormHandle(); |
... | ... | |
238 | 239 |
if (control != null && control.GetType() == typeof(ComponentPropertiesUI)) |
239 | 240 |
{ |
240 | 241 |
ComponentPropertiesUI UI = control as ComponentPropertiesUI; |
242 |
|
|
241 | 243 |
string level1 = UI.Text; |
242 | 244 |
foreach (PropertyRegion region in UI.PropertyRegions) |
243 | 245 |
{ |
244 | 246 |
string level2 = region.Title; |
245 | 247 |
foreach (PropertyField field in region.PropertyFields) |
246 | 248 |
{ |
247 |
string level3 = field.Key; |
|
248 |
string displayName = field.Name; |
|
249 |
|
|
250 |
|
|
249 |
string attributeKey = field.Key; |
|
250 |
string attributeName = field.Name; |
|
251 |
datas.Add(new Tuple<string, string, string, string>(level1, level2, attributeKey, attributeName)); |
|
251 | 252 |
} |
252 | 253 |
} |
253 | 254 |
|
... | ... | |
261 | 262 |
} |
262 | 263 |
} |
263 | 264 |
} |
265 |
|
|
266 |
if (datas.Count > 0) |
|
267 |
{ |
|
268 |
if (!Project_DB.InsertAPIDAttribute(datas)) |
|
269 |
System.Windows.Forms.MessageBox.Show("Fail save to database...", "APID Converter", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); |
|
270 |
} |
|
264 | 271 |
} |
265 | 272 |
|
273 |
|
|
266 | 274 |
public static int FindPropertiesFormHandle() |
267 | 275 |
{ |
268 | 276 |
int result = 0; |
내보내기 Unified diff