示例#1
0
        public String generateGRequest()
        {
            string url = "";

            url += HEADER;
            url += myFormat.ToString() + "?";
            //		sb.append("origin=" + myOrigin + "&");
            //		sb.append("destination=" + myDest);
            url += "origin=" + coordinateToString(myOriginCoordinates);
            url += "destination=" + coordinateToString(myDestCoordinates);
            if (myAvoid != null && !(myAvoid.Count() == 0))
            {
                url += "?";
                foreach (ToAvoidGM av in myAvoid)
                {
                    url += av.ToString() + "|";
                }
                url = url.Substring(0, url.Length - 1);
            }
            if (myMode != null)
            {
                url += "?" + myMode.ToString();
            }
            url += "&key=" + API_KEY;
            return(url);
        }
示例#2
0
        public Synthesizer(Uri endpointUri, OutputFormats outputFormats, AuthClient authorization)
        {
            SynthesizeQueue = new List <SynthesizeTask>();

            EndpointUri = endpointUri;

            DescriptionAttribute[] attributes = (DescriptionAttribute[])outputFormats.GetType().GetField(outputFormats.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false);
            string description = attributes.Length > 0 ? attributes[0].Description : string.Empty;

            OutputFormat = description;

            AuthorizationClient = authorization;
        }
示例#3
0
 public static string GetFilenameFromPattern(string pattern, OutputFormats imageFormat, ICaptureDetails captureDetails)
 {
     return(FillPattern(pattern, captureDetails, true) + "." + imageFormat.ToString().ToLower());
 }