OSAE.OSAEObject.Property C# (CSharp) Method

Property() public method

public Property ( string prop ) : OSAE.OSAEObjectProperty
prop string
return OSAE.OSAEObjectProperty
        public OSAEObjectProperty Property(string prop)
        {
            foreach (OSAEObjectProperty p in Properties)
            {
                if (String.Equals(p.Name, prop, StringComparison.OrdinalIgnoreCase)) return p;
            }

            return null;
        }

Usage Example

 // Code to Initialize your custom User Control
 public CustomUserControl(OSAEObject sObj, string ControlName)
 {
     InitializeComponent();
     _controlname = ControlName;
     screenObject = sObj;
     _mjpeg = new MjpegDecoder();
     _mjpeg.FrameReady += mjpeg_FrameReady;
     _mjpeg.Error += _mjpeg_Error;
     var imgsWidth = OSAEObjectPropertyManager.GetObjectPropertyValue(sObj.Property("Object Name").Value, "Width").Value;
     var imgsHeight = OSAEObjectPropertyManager.GetObjectPropertyValue(sObj.Property("Object Name").Value, "Height").Value;
     streamURI = OSAEObjectPropertyManager.GetObjectPropertyValue(sObj.Property("Object Name").Value, "Stream Address").Value;
     if (imgsWidth != "") { imgWidth = Convert.ToDouble(imgsWidth); }
     if (imgsHeight != "") { imgHeight = Convert.ToDouble(imgsHeight); }
     this.Width = imgWidth;
     this.Height = imgHeight;
     image.Width = imgWidth;
     image.Height = imgHeight;
     if (streamURI == null)
     {
         this.Log.Error("Stream Path Not Found: " + streamURI);
         message.Content = "Can Not Open: " + streamURI;
     }
     else
     {
         streamURI = renameingSys(streamURI);
         this.Log.Info("Streaming: " + streamURI);
         _mjpeg.ParseStream(new Uri(streamURI));
     }
 }
All Usage Examples Of OSAE.OSAEObject::Property