コード例 #1
0
        public bool Open([Settings.Parameter("locator", "Locator of file, capture device or video stream.")] Uri.Locator resource)
        {
            bool result = false;

            if (resource.NotNull())
            {
                string crop = resource.Query["crop"];
                if (crop.NotEmpty())
                {
                    this.Crop = (Geometry2D.Integer.Shell)crop;
                }
                string scan = resource.Query["scan"];
                if (scan.NotEmpty())
                {
                    this.Scan = (Media.Scan)Enum.Parse(typeof(Media.Scan), scan, true);
                }
                this.Ratio = resource.Query["ratio"];
                resource.Query.Remove("crop", "ratio", "scan");
                result = this.backend.Open(resource);
            }
            return(result);
        }