Beispiel #1
0
        /// <summary>
        /// Gets or creates the template dictionary from the common line properties.
        /// </summary>
        private TemplateDict GetTemplateDictionary()
        {
            TemplateDict templateDict = CommonProps.ContainsKey(TemplateDictKey) ?
                                        CommonProps[TemplateDictKey] as TemplateDict : null;

            if (templateDict == null)
            {
                templateDict = new TemplateDict();
                CommonProps.Add(TemplateDictKey, templateDict);
            }

            return(templateDict);
        }
Beispiel #2
0
        /// <summary>
        /// Gets the template dictionary from the common properties or creates it.
        /// </summary>
        private Dictionary <string, DeviceTemplate> GetTemplateDictionary()
        {
            Dictionary <string, DeviceTemplate> templateDict = CommonProps.ContainsKey(TemplateDictKey) ?
                                                               CommonProps[TemplateDictKey] as Dictionary <string, DeviceTemplate> : null;

            if (templateDict == null)
            {
                templateDict = new TemplateDict();
                CommonProps.Add(TemplateDictKey, templateDict);
            }

            return(templateDict);
        }
Beispiel #3
0
        /// <summary>
        /// Получить из общих свойств линии связи или создать список сообщений, представленных в виде object[]
        /// </summary>
        private List <object[]> GetMessageObjList()
        {
            List <object[]> messages = CommonProps.ContainsKey("Messages") ?
                                       CommonProps["Messages"] as List <object[]> : null;

            if (messages == null)
            {
                messages = new MessageObjList();
                CommonProps.Add("Messages", messages);
            }

            return(messages);
        }
Beispiel #4
0
        /// <summary>
        /// Получить из общих свойств линии связи или создать словарь шаблонов устройств
        /// </summary>
        private Dictionary <string, DeviceTemplate> GetTemplates()
        {
            Dictionary <string, DeviceTemplate> templates = CommonProps.ContainsKey("Templates") ?
                                                            CommonProps["Templates"] as Dictionary <string, DeviceTemplate> : null;

            if (templates == null)
            {
                templates = new TemplateDict();
                CommonProps.Add("Templates", templates);
            }

            return(templates);
        }