private void SearchAlarmProperty(string path, object obj)
        {
            if (obj == null) return;

            PropertyInfo[] propList = obj.GetType().GetProperties();
            foreach (PropertyInfo info in propList)
            {
                if (IsAlarmProperty(info))
                {
                    int alarmNo;
                    try
                    {
                        alarmNo = (int)info.GetValue(obj, null);
                        AlarmPropertyInfo alarmPropertyInfo =
                            new AlarmPropertyInfo(obj, path, info.Name, alarmNo);
                        _alarmPropertyList.Add(alarmPropertyInfo);
                    }
                    catch
                    {
                    }
                }
                else if (IsFAAttribute(info))
                {
                    object objValue = null;
                    try
                    {
                        objValue = info.GetValue(obj, null);
                    }
                    catch
                    {
                        continue;
                    }

                    if (objValue != null)
                        SearchAlarmProperty(path + "." + info.Name, objValue);
                }
            }
        }
        private void SearchRedefinitionsAlarm(AlarmPropertyInfo info)
        {
            foreach (AlarmPropertyInfo item in _alarmPropertyList)
            {
                if (info != item)
                {
                    if (info.AlarmNo == item.AlarmNo)
                    {
                        if (_redefinitionsTreeViewItems.ContainsKey(info.AlarmNo) == false)
                        {
                            TreeViewItem tvItem = new TreeViewItem();
                            tvItem.Header = info.AlarmNo.ToString();
                            ListView listView = new ListView();
                            SetListViewContentAlignmentStrech(listView);
                            listView.View = GetAlarmPropertyInfoGridView();
                            tvItem.Items.Add(listView);
                            treeViewRedefinitionsAlarm.Items.Add(tvItem);
                            _redefinitionsTreeViewItems.Add(info.AlarmNo, listView);
                            listView.Items.Add(info);
                        }

                        if (_redefinitionsTreeViewItems[info.AlarmNo].Items.Contains(item) == false)
                            _redefinitionsTreeViewItems[info.AlarmNo].Items.Add(item);
                    }
                }
            }
        }
        private bool IsUnregisteredAlarm(AlarmPropertyInfo info)
        {
            foreach (FALibrary.Alarm.FAAlarm item in FALibrary.Alarm.FAAlarmManager.Instance.Items.Values)
            {
                if (info.AlarmNo == item.AlarmNo)
                    return false;
            }

            return true;
        }