示例#1
0
        public static List <DataTypeOSMElement> getAllTypes_possibleValues()
        {
            List <DataTypeOSMElement> displayedGuiElements = GeneralProperties.getAllTypes_possibleValues();

            displayedGuiElements.AddRange(BrailleRepresentation.getAllTypes_possibleValues());
            return(displayedGuiElements);
        }
示例#2
0
        /// <summary>
        /// Gives all Types of <see cref="OSMElement"/>
        /// </summary>
        /// <returns>list of all Types of <see cref="OSMElement"/> with possible values OR range</returns>
        public static List <String> getAllTypes()
        {
            List <String> displayedGuiElements = GeneralProperties.getAllTypes();

            displayedGuiElements.AddRange(BrailleRepresentation.getAllTypes());
            return(displayedGuiElements);
        }
示例#3
0
 /// <summary>
 /// Gets a specified property
 /// </summary>
 /// <param name="elementName">name of the wanted property</param>
 /// <param name="propertiesBraille">properties of the node</param>
 /// <param name="propertyType">the datatype of the property</param>
 /// <returns>the wanted property from <para>properties</para> </returns>
 public static object getPropertyElement(String elementName, BrailleRepresentation propertiesBraille, out Type propertyType)
 {
     try
     { //see http://stackoverflow.com/questions/1196991/get-property-value-from-string-using-reflection-in-c-sharp#
         propertyType = propertiesBraille.GetType().GetProperty(elementName).PropertyType;
         return(propertiesBraille.GetType().GetProperty(elementName).GetValue(propertiesBraille, null));
     }
     catch
     {
         throw new Exception("Exception in OSMElement.BrailleRepresentaion: An attempt was made to query a non-existent property ('" + elementName + "')");
     }
 }
示例#4
0
 /// <summary>
 /// Gets a specified property
 /// </summary>
 /// <param name="elementName">name of the wanted property</param>
 /// <param name="osmElement">properties of the node</param>
 /// <returns>the wanted property from <para>properties</para> </returns>
 public static object getElement(String elementName, OSMElement osmElement)
 {
     if (GeneralProperties.getAllTypes().Contains(elementName))
     {
         return(GeneralProperties.getPropertyElement(elementName, osmElement.properties));
     }
     if (BrailleRepresentation.getAllTypes().Contains(elementName))
     {
         return(BrailleRepresentation.getPropertyElement(elementName, osmElement.brailleRepresentation));
     }
     //TODO: Events
     return(null);
 }
示例#5
0
 public OSMElement()
 {
     properties            = new GeneralProperties();
     brailleRepresentation = new BrailleRepresentation();
     //events = new OSMEvents();
 }
示例#6
0
        /// <summary>
        /// Gets a specified property
        /// </summary>
        /// <param name="elementName">name of the wanted property</param>
        /// <param name="propertiesBraille">properties of the node</param>
        /// <returns>the wanted property from <para>properties</para> </returns>
        public static object getPropertyElement(String elementName, BrailleRepresentation propertiesBraille)
        {
            Type t;

            return(getPropertyElement(elementName, propertiesBraille, out t));
        }
示例#7
0
        public override bool Equals(object obj)
        {
            if ((this == null && obj != null) || (this != null && obj == null))
            {
                return(false);
            }
            if (!obj.GetType().Equals(typeof(BrailleRepresentation)))
            {
                return(false);
            }
            BrailleRepresentation brailleR = (BrailleRepresentation)obj;
            bool result = true;

            if (this.boarder != null)
            {
                result = this.boarder.Equals(brailleR.boarder);
            }
            result = result && this.contrast.Equals(brailleR.contrast);
            if (this.displayedGuiElementType != null)
            {
                result = result && this.displayedGuiElementType.Equals(brailleR.displayedGuiElementType);
            }
            if (!this.groupelementsOfSameType.Equals(new GroupelementsOfSameType()))
            {
                result = result && this.groupelementsOfSameType.Equals(brailleR.groupelementsOfSameType);
            }
            result = result && this.isGroupChild.Equals(brailleR.isGroupChild);
            result = result && this.isScrollbarShow.Equals(brailleR.isScrollbarShow);
            result = result && this.isVisible.Equals(brailleR.isVisible);
            //  if (this.jaggedMatrix != null) { result = result && this.jaggedMatrix.Equals(brailleR.jaggedMatrix); }
            if (this.margin != null)
            {
                result = result && this.margin.Equals(brailleR.margin);
            }
            if (this.matrix != null)
            {
                result = result && this.matrix.Equals(brailleR.matrix);
            }
            if (this.padding != null)
            {
                result = result && this.padding.Equals(brailleR.padding);
            }
            if (this.screenName != null)
            {
                result = result && this.screenName.Equals(brailleR.screenName);
            }
            if (this.templateFullName != null)
            {
                result = result && this.templateFullName.Equals(brailleR.templateFullName);
            }
            if (this.templateNamspace != null)
            {
                result = result && this.templateNamspace.Equals(brailleR.templateNamspace);
            }
            if (this.textAcronym != null)
            {
                result = result && this.textAcronym.Equals(brailleR.textAcronym);
            }
            if (this.typeOfView != null)
            {
                result = result && this.typeOfView.Equals(brailleR.typeOfView);
            }
            if (this.uiElementSpecialContent != null)
            {
                result = result && this.uiElementSpecialContent.Equals(brailleR.uiElementSpecialContent);
            }
            if (this.viewName != null)
            {
                result = result && this.viewName.Equals(brailleR.viewName);
            }
            result = result && this.zIntex.Equals(brailleR.zIntex);
            result = result && this.zoom.Equals(brailleR.zoom);
            return(result);
        }