Example #1
0
 INode RenderObject(IDocument document, InlineObject obj)
 {
     return(obj switch
     {
         CodeSpan robj => RenderObject(document, robj),
         Image robj => RenderObject(document, robj),
         Link robj => RenderObject(document, robj),
         Text robj => RenderObject(document, robj),
         _ => throw new NotImplementedException(),
     });
Example #2
0
        public virtual IActionResult DecodeString([FromBody] InlineObject stringInput)
        {
            //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(200, default(OutputString));
            //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(400, default(OutputString));
            string exampleJson = null;

            exampleJson = "{\n  \"result\" : \"string\"\n}";

            var example = exampleJson != null
            ? JsonConvert.DeserializeObject <OutputString>(exampleJson)
            : default(OutputString);

            //TODO: Change the data returned
            return(new ObjectResult(example));
        }
Example #3
0
 /// <summary>
 /// Return a pointer to the unmanaged version of this callback.
 /// </summary>
 /// <param name="callback">The callback.</param>
 /// <returns>A pointer to a shadow c++ callback</returns>
 public static IntPtr ToIntPtr(InlineObject callback)
 {
     return(ToCallbackPtr <InlineObject>(callback));
 }
Example #4
0
 /// <summary>	
 ///  IDWriteTextLayout::Draw calls this application callback when it needs to draw an inline object. 	
 /// </summary>	
 /// <param name="clientDrawingContext">The application-defined drawing context passed to IDWriteTextLayout::Draw.</param>
 /// <param name="originX">X-coordinate at the top-left corner of the inline object.</param>
 /// <param name="originY">Y-coordinate at the top-left corner of the inline object.</param>
 /// <param name="inlineObject">The application-defined inline object set using IDWriteTextFormat::SetInlineObject.</param>
 /// <param name="isSideways">A Boolean flag that indicates whether the object's baseline runs alongside the baseline axis of the line.</param>
 /// <param name="isRightToLeft">A Boolean flag that indicates whether the object is in a right-to-left context, hinting that the drawing may want to mirror the normal image.</param>
 /// <param name="clientDrawingEffect">Application-defined drawing effects for the glyphs to render. Usually this argument represents effects such as the foreground brush filling the interior of a line.</param>
 /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>
 /// <unmanaged>HRESULT DrawInlineObject([None] void* clientDrawingContext,[None] FLOAT originX,[None] FLOAT originY,[None] IDWriteInlineObject* inlineObject,[None] BOOL isSideways,[None] BOOL isRightToLeft,[None] IUnknown* clientDrawingEffect)</unmanaged>
 public virtual Result DrawInlineObject(object clientDrawingContext, float originX, float originY, InlineObject inlineObject, bool isSideways, bool isRightToLeft, ComObject clientDrawingEffect)
 {
     return Result.NotImplemented;
 }
Example #5
0
        /// <summary>
        /// Start maintenance mode for routing keys
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="xVOApiId">Your API ID</param>
        /// <param name="xVOApiKey">Your API Key</param>
        /// <param name="body"></param>
        /// <returns>Task of MaintenanceModeState</returns>
        public async System.Threading.Tasks.Task <MaintenanceModeState> ApiPublicV1MaintenancemodeStartPostAsync(string xVOApiId, string xVOApiKey, InlineObject body)
        {
            Org.OpenAPITools.Client.ApiResponse <MaintenanceModeState> localVarResponse = await ApiPublicV1MaintenancemodeStartPostAsyncWithHttpInfo(xVOApiId, xVOApiKey, body);

            return(localVarResponse.Data);
        }
Example #6
0
 public Result DrawInlineObject(object clientDrawingContext, float originX, float originY, InlineObject inlineObject, bool isSideways, bool isRightToLeft, ComObject clientDrawingEffect)
 {
     throw new NotImplementedException();
 }
Example #7
0
        // -----------------------------------------------------------------
        // Fetch the next run at UIElment position. 
        // 
        //      position - current position in the text array
        //      dcp - current position in the text array 
        // -----------------------------------------------------------------
        private TextRun HandleInlineObject(StaticTextPointer position, int dcp)
        {
            Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object."); 

            TextRun run = null; 
            DependencyObject element = position.GetAdjacentElement(LogicalDirection.Forward) as DependencyObject; 
            if (element is UIElement)
            { 
                //


                TextRunProperties textProps = new TextProperties(element, position, true /* inline objects */, true /* get background */); 

                // Create object run. 
                run = new InlineObject(dcp, TextContainerHelper.EmbeddedObjectLength, (UIElement)element, textProps, _owner); 
            }
            else 
            {
                // If the embedded object is of an unknown type (not UIElement),
                // treat it as element edge.
                run = HandleElementEndEdge(position); 
            }
            return run; 
        } 
Example #8
0
 /// <summary>	
 /// <p> Sets trimming options for text overflowing the layout width. </p>	
 /// </summary>	
 /// <param name="trimmingOptions"><dd> <p>Text trimming options.</p> </dd></param>	
 /// <param name="trimmingSign"><dd> <p>Application-defined omission sign. This parameter may be <strong><c>null</c></strong>. See <strong><see cref="SharpDX.DirectWrite.InlineObject"/></strong> for more information.</p> </dd></param>	
 /// <returns><p>If this method succeeds, it returns <strong><see cref="SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref="SharpDX.Result"/></strong> error code.</p></returns>	
 /// <msdn-id>dd316712</msdn-id>	
 /// <unmanaged>HRESULT IDWriteTextFormat::SetTrimming([In] const DWRITE_TRIMMING* trimmingOptions,[In] IDWriteInlineObject* trimmingSign)</unmanaged>	
 /// <unmanaged-short>IDWriteTextFormat::SetTrimming</unmanaged-short>	
 public void SetTrimming(SharpDX.DirectWrite.Trimming trimmingOptions, InlineObject trimmingSign)
 {
     SetTrimming_(trimmingOptions, InlineObjectShadow.ToIntPtr(trimmingSign));
 }
 protected abstract void TestPost(InlineObject body);
Example #10
0
        /// <summary>
        /// Enable Track&amp;Engage Enable Track&amp;Engag
        /// </summary>
        /// <exception cref="org.egoi.client.api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"> (optional)</param>
        /// <returns>Task of TeResponse</returns>
        public async System.Threading.Tasks.Task <TeResponse> EnableTeAsync(InlineObject inlineObject = null)
        {
            ApiResponse <TeResponse> localVarResponse = await EnableTeAsyncWithHttpInfo(inlineObject);

            return(localVarResponse.Data);
        }
Example #11
0
        /// <summary>
        /// Obtain auhtorization token for other requests
        /// </summary>
        /// <exception cref="SimpleFx.Client.Generated.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"></param>
        /// <returns>Task of InlineResponse200</returns>
        public async System.Threading.Tasks.Task <InlineResponse200> ApiV3AuthKeyPostAsync(InlineObject inlineObject)
        {
            SimpleFx.Client.Generated.Client.ApiResponse <InlineResponse200> localVarResponse = await ApiV3AuthKeyPostAsyncWithHttpInfo(inlineObject);

            return(localVarResponse.Data);
        }
Example #12
0
        /// <summary>
        /// Obtain auhtorization token for other requests
        /// </summary>
        /// <exception cref="SimpleFx.Client.Generated.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"></param>
        /// <returns>Task of ApiResponse (InlineResponse200)</returns>
        public async System.Threading.Tasks.Task <SimpleFx.Client.Generated.Client.ApiResponse <InlineResponse200> > ApiV3AuthKeyPostAsyncWithHttpInfo(InlineObject inlineObject)
        {
            // verify the required parameter 'inlineObject' is set
            if (inlineObject == null)
            {
                throw new SimpleFx.Client.Generated.Client.ApiException(400, "Missing required parameter 'inlineObject' when calling AUTHENTICATIONApi->ApiV3AuthKeyPost");
            }


            SimpleFx.Client.Generated.Client.RequestOptions localVarRequestOptions = new SimpleFx.Client.Generated.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.Data = inlineObject;


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <InlineResponse200>("/api/v3/auth/key", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ApiV3AuthKeyPost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Example #13
0
        /// <summary>
        /// Obtain auhtorization token for other requests
        /// </summary>
        /// <exception cref="SimpleFx.Client.Generated.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"></param>
        /// <returns>ApiResponse of InlineResponse200</returns>
        public SimpleFx.Client.Generated.Client.ApiResponse <InlineResponse200> ApiV3AuthKeyPostWithHttpInfo(InlineObject inlineObject)
        {
            // verify the required parameter 'inlineObject' is set
            if (inlineObject == null)
            {
                throw new SimpleFx.Client.Generated.Client.ApiException(400, "Missing required parameter 'inlineObject' when calling AUTHENTICATIONApi->ApiV3AuthKeyPost");
            }

            SimpleFx.Client.Generated.Client.RequestOptions localVarRequestOptions = new SimpleFx.Client.Generated.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = SimpleFx.Client.Generated.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = SimpleFx.Client.Generated.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = inlineObject;


            // make the HTTP request
            var localVarResponse = this.Client.Post <InlineResponse200>("/api/v3/auth/key", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ApiV3AuthKeyPost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Example #14
0
 /// <summary>
 /// Obtain auhtorization token for other requests
 /// </summary>
 /// <exception cref="SimpleFx.Client.Generated.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="inlineObject"></param>
 /// <returns>InlineResponse200</returns>
 public InlineResponse200 ApiV3AuthKeyPost(InlineObject inlineObject)
 {
     SimpleFx.Client.Generated.Client.ApiResponse <InlineResponse200> localVarResponse = ApiV3AuthKeyPostWithHttpInfo(inlineObject);
     return(localVarResponse.Data);
 }
Example #15
0
        /// <summary>
        /// Enable Track&amp;Engage Enable Track&amp;Engag
        /// </summary>
        /// <exception cref="org.egoi.client.api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"> (optional)</param>
        /// <returns>Task of ApiResponse (TeResponse)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <TeResponse> > EnableTeAsyncWithHttpInfo(InlineObject inlineObject = null)
        {
            var    localVarPath         = "/my-account/actions/enable-te";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (inlineObject != null && inlineObject.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(inlineObject); // http body (model) parameter
            }
            else
            {
                localVarPostBody = inlineObject; // byte array
            }

            // authentication (Apikey) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Apikey")))
            {
                localVarHeaderParams["Apikey"] = this.Configuration.GetApiKeyWithPrefix("Apikey");
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("EnableTe", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <TeResponse>(localVarStatusCode,
                                                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                (TeResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TeResponse))));
        }
Example #16
0
 /// <summary>
 /// Return a pointer to the unmanaged version of this callback.
 /// </summary>
 /// <param name="callback">The callback.</param>
 /// <returns>A pointer to a shadow c++ callback</returns>
 public static IntPtr ToIntPtr(InlineObject callback)
 {
     return ToCallbackPtr<InlineObject>(callback);
 }
Example #17
0
 /// <summary>
 ///  Send timesheet information for a completed activity
 /// </summary>
 /// <exception cref="ASW.APIServices.Core.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="vacancyId">The ID of the vacancy</param>
 /// <param name="inlineObject"></param>
 /// <returns>Task of void</returns>
 public async System.Threading.Tasks.Task SubmitTimesheetAsync(string vacancyId, InlineObject inlineObject)
 {
     await SubmitTimesheetAsyncWithHttpInfo(vacancyId, inlineObject);
 }
Example #18
0
        public virtual IActionResult UpdateTimesheets([FromRoute][Required] string version, [FromRoute][Required] string trustCode, [FromRoute][Required] int dutyId, [FromBody] InlineObject inlineObject)
        {
            //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(200);
            //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(400, default(string));
            //TODO: Uncomment the next line to return response 401 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(401);
            //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
            // return StatusCode(404);

            throw new NotImplementedException();
        }
Example #19
0
        /// <summary>
        /// Enable Track&amp;Engage Enable Track&amp;Engag
        /// </summary>
        /// <exception cref="org.egoi.client.api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"> (optional)</param>
        /// <returns>TeResponse</returns>
        public TeResponse EnableTe(InlineObject inlineObject = null)
        {
            ApiResponse <TeResponse> localVarResponse = EnableTeWithHttpInfo(inlineObject);

            return(localVarResponse.Data);
        }
Example #20
0
 /// <summary>
 ///  Send timesheet information for a completed activity
 /// </summary>
 /// <exception cref="ASW.APIServices.Core.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="vacancyId">The ID of the vacancy</param>
 /// <param name="inlineObject"></param>
 /// <returns></returns>
 public void SubmitTimesheet(string vacancyId, InlineObject inlineObject)
 {
     SubmitTimesheetWithHttpInfo(vacancyId, inlineObject);
 }
Example #21
0
 /// <summary>
 ///
 /// </summary>
 /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="inlineObject"></param>
 /// <returns>InlineResponse200</returns>
 public InlineResponse200 SecurityLoginPost(InlineObject inlineObject)
 {
     Org.OpenAPITools.Client.ApiResponse <InlineResponse200> localVarResponse = SecurityLoginPostWithHttpInfo(inlineObject);
     return(localVarResponse.Data);
 }
Example #22
0
        /// <summary>
        ///  Send timesheet information for a completed activity
        /// </summary>
        /// <exception cref="ASW.APIServices.Core.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="vacancyId">The ID of the vacancy</param>
        /// <param name="inlineObject"></param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > SubmitTimesheetAsyncWithHttpInfo(string vacancyId, InlineObject inlineObject)
        {
            // verify the required parameter 'vacancyId' is set
            if (vacancyId == null)
            {
                throw new ApiException(400, "Missing required parameter 'vacancyId' when calling VacancyApi->SubmitTimesheet");
            }
            // verify the required parameter 'inlineObject' is set
            if (inlineObject == null)
            {
                throw new ApiException(400, "Missing required parameter 'inlineObject' when calling VacancyApi->SubmitTimesheet");
            }

            var    localVarPath         = "/vacancies/{vacancyId}/timesheet";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
            };
            String localVarHttpHeaderAccept    = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (vacancyId != null)
            {
                localVarPathParams.Add("vacancyId", this.Configuration.ApiClient.ParameterToString(vacancyId));                    // path parameter
            }
            if (inlineObject != null && inlineObject.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(inlineObject); // http body (model) parameter
            }
            else
            {
                localVarPostBody = inlineObject; // byte array
            }

            // authentication (jwt) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("SubmitTimesheet", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                                            null));
        }
Example #23
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"></param>
        /// <returns>ApiResponse of InlineResponse200</returns>
        public Org.OpenAPITools.Client.ApiResponse <InlineResponse200> SecurityLoginPostWithHttpInfo(InlineObject inlineObject)
        {
            // verify the required parameter 'inlineObject' is set
            if (inlineObject == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'inlineObject' when calling SecurityApiApi->SecurityLoginPost");
            }

            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes);

            if (localVarContentType != null)
            {
                requestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts);

            if (localVarAccept != null)
            {
                requestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            requestOptions.Data = inlineObject;


            // make the HTTP request

            var response = this.Client.Post <InlineResponse200>("/security/login", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("SecurityLoginPost", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Example #24
0
 public int CreatePDF(Stream stream)
 {
     // Get the images to use as inline objects:
     using (var imgPuffins = Image.FromFile("Resources/ImagesBis/puffins-small.jpg"))
         using (var imgFerns = Image.FromFile("Resources/ImagesBis/ferns-small.jpg"))
         {
             // The image alignment to use:
             var ia = new ImageAlign(ImageAlignHorz.Center, ImageAlignVert.Bottom, true, true, true, false, false);
             // Create and set up the document:
             var doc  = new GcPdfDocument();
             var page = doc.NewPage();
             var g    = page.Graphics;
             // Create and set up a TextLayout object to print the text:
             var tl = g.CreateTextLayout();
             tl.MaxWidth                = page.Size.Width;
             tl.MaxHeight               = page.Size.Height;
             tl.MarginLeft              = tl.MarginRight = tl.MarginTop = tl.MarginBottom = 36;
             tl.DefaultFormat.Font      = StandardFonts.Times;
             tl.DefaultFormat.FontSize  = 12;
             tl.DefaultFormat.BackColor = Color.LightGoldenrodYellow;
             tl.TextAlignment           = TextAlignment.Justified;
             // Create inline objects using the images and arbitrary sizes:
             var ioPuffins = new InlineObject(imgPuffins, 36, 24);
             var ioFerns   = new InlineObject(imgFerns, 36, 24);
             // Build up the text:
             tl.Append(
                 "The 'Inline objects' feature of the TextLayout class allows to insert arbitrary objects " +
                 "into a block of text. Those objects are then treated exactly like other text runs, " +
                 "and keep their positions relative to the surrounding text. " +
                 "In this sample, we insert some images into the text as inline objects, " +
                 "use the TextLayout class to position them along with text, and draw them " +
                 "using the GcGraphics.DrawImage method. "
                 );
             tl.Append("Here are some puffins: ");
             tl.Append(ioPuffins);
             tl.Append(" and here are some ferns: ");
             tl.Append(ioFerns);
             tl.Append(" The end.");
             //
             System.Diagnostics.Debug.Assert(tl.InlineObjects.Count == 0, "InlineObjects is filled by RecalculateGlyphs");
             // This method fetches and measures the glyphs needed to render the text,
             // because we draw the same text a few times with different layout,
             // we call this once before the loop below:
             tl.RecalculateGlyphs();
             //
             System.Diagnostics.Debug.Assert(tl.InlineObjects.Count == 2, "InlineObjects is filled by RecalculateGlyphs");
             // In a loop, draw the text and inline images in 3 different locations
             // and bounds on the page:
             for (int i = 0; i < 3; ++i)
             {
                 tl.MarginTop   = tl.ContentRectangle.Bottom + 36;
                 tl.MarginLeft  = 36 + 72 * i;
                 tl.MarginRight = 36 + 72 * i;
                 // Note passing 'false' here, we do not need to recalc the glyphs because
                 // the text has not changed:
                 tl.PerformLayout(false);
                 // Draw the text and images:
                 g.DrawTextLayout(tl, PointF.Empty);
                 foreach (var io in tl.InlineObjects)
                 {
                     g.DrawImage((Image)io.Object, io.ObjectRect.ToRectangleF(), null, ia);
                 }
             }
             // Done:
             doc.Save(stream);
             return(doc.Pages.Count);
         }
 }
Example #25
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"></param>
        /// <returns>Task of InlineResponse200</returns>
        public async System.Threading.Tasks.Task <InlineResponse200> SecurityLoginPostAsync(InlineObject inlineObject)
        {
            Org.OpenAPITools.Client.ApiResponse <InlineResponse200> localVarResponse = await SecurityLoginPostAsyncWithHttpInfo(inlineObject);

            return(localVarResponse.Data);
        }
Example #26
0
 /// <summary>
 /// Start maintenance mode for routing keys
 /// </summary>
 /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="xVOApiId">Your API ID</param>
 /// <param name="xVOApiKey">Your API Key</param>
 /// <param name="body"></param>
 /// <returns>MaintenanceModeState</returns>
 public MaintenanceModeState ApiPublicV1MaintenancemodeStartPost(string xVOApiId, string xVOApiKey, InlineObject body)
 {
     Org.OpenAPITools.Client.ApiResponse <MaintenanceModeState> localVarResponse = ApiPublicV1MaintenancemodeStartPostWithHttpInfo(xVOApiId, xVOApiKey, body);
     return(localVarResponse.Data);
 }
Example #27
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject"></param>
        /// <returns>Task of ApiResponse (InlineResponse200)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <InlineResponse200> > SecurityLoginPostAsyncWithHttpInfo(InlineObject inlineObject)
        {
            // verify the required parameter 'inlineObject' is set
            if (inlineObject == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'inlineObject' when calling SecurityApiApi->SecurityLoginPost");
            }


            Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            foreach (var contentType in @contentTypes)
            {
                requestOptions.HeaderParameters.Add("Content-Type", contentType);
            }

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            requestOptions.Data = inlineObject;


            // make the HTTP request

            var response = await this.AsynchronousClient.PostAsync <InlineResponse200>("/security/login", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("SecurityLoginPost", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Example #28
0
        /// <summary>
        /// Start maintenance mode for routing keys
        /// </summary>
        /// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="xVOApiId">Your API ID</param>
        /// <param name="xVOApiKey">Your API Key</param>
        /// <param name="body"></param>
        /// <returns>Task of ApiResponse (MaintenanceModeState)</returns>
        public async System.Threading.Tasks.Task <Org.OpenAPITools.Client.ApiResponse <MaintenanceModeState> > ApiPublicV1MaintenancemodeStartPostAsyncWithHttpInfo(string xVOApiId, string xVOApiKey, InlineObject body)
        {
            // verify the required parameter 'xVOApiId' is set
            if (xVOApiId == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'xVOApiId' when calling MaintenanceModeApi->ApiPublicV1MaintenancemodeStartPost");
            }

            // verify the required parameter 'xVOApiKey' is set
            if (xVOApiKey == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'xVOApiKey' when calling MaintenanceModeApi->ApiPublicV1MaintenancemodeStartPost");
            }

            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling MaintenanceModeApi->ApiPublicV1MaintenancemodeStartPost");
            }


            Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (xVOApiId != null)
            {
                localVarRequestOptions.HeaderParameters.Add("X-VO-Api-Id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(xVOApiId)); // header parameter
            }
            if (xVOApiKey != null)
            {
                localVarRequestOptions.HeaderParameters.Add("X-VO-Api-Key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(xVOApiKey)); // header parameter
            }
            localVarRequestOptions.Data = body;


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <MaintenanceModeState>("/api-public/v1/maintenancemode/start", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ApiPublicV1MaintenancemodeStartPost", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
 /// <summary>
 /// IDWriteTextLayout::Draw calls this application callback when it needs to draw an inline object.
 /// </summary>
 /// <param name="clientDrawingContext">The application-defined drawing context passed to IDWriteTextLayout::Draw.</param>
 /// <param name="originX">X-coordinate at the top-left corner of the inline object.</param>
 /// <param name="originY">Y-coordinate at the top-left corner of the inline object.</param>
 /// <param name="inlineObject">The application-defined inline object set using IDWriteTextFormat::SetInlineObject.</param>
 /// <param name="isSideways">A Boolean flag that indicates whether the object's baseline runs alongside the baseline axis of the line.</param>
 /// <param name="isRightToLeft">A Boolean flag that indicates whether the object is in a right-to-left context, hinting that the drawing may want to mirror the normal image.</param>
 /// <param name="clientDrawingEffect">Application-defined drawing effects for the glyphs to render. Usually this argument represents effects such as the foreground brush filling the interior of a line.</param>
 /// <returns>
 /// If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
 /// </returns>
 /// <unmanaged>HRESULT DrawInlineObject([None] void* clientDrawingContext,[None] FLOAT originX,[None] FLOAT originY,[None] IDWriteInlineObject* inlineObject,[None] BOOL isSideways,[None] BOOL isRightToLeft,[None] IUnknown* clientDrawingEffect)</unmanaged>
 public override SDX.Result DrawInlineObject(object clientDrawingContext, float originX, float originY, InlineObject inlineObject, bool isSideways, bool isRightToLeft, SDX.ComObject clientDrawingEffect)
 {
     return(SDX.Result.Ok);
 }
Example #30
0
 /// <summary>
 ///  IDWriteTextLayout::Draw calls this application callback when it needs to draw an inline object.
 /// </summary>
 /// <param name="clientDrawingContext">The application-defined drawing context passed to IDWriteTextLayout::Draw.</param>
 /// <param name="originX">X-coordinate at the top-left corner of the inline object.</param>
 /// <param name="originY">Y-coordinate at the top-left corner of the inline object.</param>
 /// <param name="inlineObject">The application-defined inline object set using IDWriteTextFormat::SetInlineObject.</param>
 /// <param name="isSideways">A Boolean flag that indicates whether the object's baseline runs alongside the baseline axis of the line.</param>
 /// <param name="isRightToLeft">A Boolean flag that indicates whether the object is in a right-to-left context, hinting that the drawing may want to mirror the normal image.</param>
 /// <param name="clientDrawingEffect">Application-defined drawing effects for the glyphs to render. Usually this argument represents effects such as the foreground brush filling the interior of a line.</param>
 /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>
 /// <unmanaged>HRESULT DrawInlineObject([None] void* clientDrawingContext,[None] FLOAT originX,[None] FLOAT originY,[None] IDWriteInlineObject* inlineObject,[None] BOOL isSideways,[None] BOOL isRightToLeft,[None] IUnknown* clientDrawingEffect)</unmanaged>
 public virtual Result DrawInlineObject(object clientDrawingContext, float originX, float originY, InlineObject inlineObject, bool isSideways, bool isRightToLeft, ComObject clientDrawingEffect)
 {
     return(Result.NotImplemented);
 }
Example #31
0
        /// <summary>
        ///  Send timesheet information for a completed activity
        /// </summary>
        /// <exception cref="ASW.APIServices.Core.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="vacancyId">The ID of the vacancy</param>
        /// <param name="inlineObject"></param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <ASW.APIServices.Core.Client.ApiResponse <Object> > SubmitTimesheetAsyncWithHttpInfo(string vacancyId, InlineObject inlineObject)
        {
            // verify the required parameter 'vacancyId' is set
            if (vacancyId == null)
            {
                throw new ASW.APIServices.Core.Client.ApiException(400, "Missing required parameter 'vacancyId' when calling VacancyApi->SubmitTimesheet");
            }

            // verify the required parameter 'inlineObject' is set
            if (inlineObject == null)
            {
                throw new ASW.APIServices.Core.Client.ApiException(400, "Missing required parameter 'inlineObject' when calling VacancyApi->SubmitTimesheet");
            }


            ASW.APIServices.Core.Client.RequestOptions localVarRequestOptions = new ASW.APIServices.Core.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (vacancyId != null)
            {
                localVarRequestOptions.PathParameters.Add("vacancyId", ASW.APIServices.Core.Client.ClientUtils.ParameterToString(vacancyId)); // path parameter
            }
            localVarRequestOptions.Data = inlineObject;

            // authentication (jwt) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + ASW.APIServices.Core.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <Object>("/vacancies/{vacancyId}/timesheet", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("SubmitTimesheet", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
 public Result DrawInlineObject(object clientDrawingContext, float originX, float originY, InlineObject inlineObject, bool isSideways, bool isRightToLeft, ComObject clientDrawingEffect)
 {
     throw new NotImplementedException();
 }
 public void DrawInlineObject(float originX, float originY, InlineObject inlineObject, bool isSideways, bool isRightToLeft, ClientDrawingEffect clientDrawingEffect)
 {
     throw new NotImplementedException();
 }
Example #34
0
 /// <summary>	
 /// Sets the inline object. 	
 /// </summary>	
 /// <remarks>	
 /// The application may call this function to specify the set of properties describing an application-defined inline object for specific range.  This inline object applies to the specified range and will be passed back to the application by way of the DrawInlineObject callback when the range is drawn. Any text in that range will be suppressed.  	
 /// </remarks>	
 /// <param name="inlineObject">An application-defined inline object.  </param>
 /// <param name="textRange">Text range to which this change applies. </param>
 /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. </returns>
 /// <unmanaged>HRESULT IDWriteTextLayout::SetInlineObject([None] IDWriteInlineObject* inlineObject,[None] DWRITE_TEXT_RANGE textRange)</unmanaged>
 public void SetInlineObject(InlineObject inlineObject, SharpDX.DirectWrite.TextRange textRange)
 {
     SetInlineObject_(InlineObjectShadow.ToIntPtr(inlineObject), textRange);
 }
 public Result DrawInlineObject(object clientDrawingContext, float originX, float originY, InlineObject inlineObject,
                                bool isSideways, bool isRightToLeft, ComObject clientDrawingEffect)
 {
     return(new Result());
 }
Example #36
0
 /// <summary>
 /// Sets the inline object.
 /// </summary>
 /// <remarks>
 /// The application may call this function to specify the set of properties describing an application-defined inline object for specific range.  This inline object applies to the specified range and will be passed back to the application by way of the DrawInlineObject callback when the range is drawn. Any text in that range will be suppressed.
 /// </remarks>
 /// <param name="inlineObject">An application-defined inline object.  </param>
 /// <param name="textRange">Text range to which this change applies. </param>
 /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. </returns>
 /// <unmanaged>HRESULT IDWriteTextLayout::SetInlineObject([None] IDWriteInlineObject* inlineObject,[None] DWRITE_TEXT_RANGE textRange)</unmanaged>
 public void SetInlineObject(InlineObject inlineObject, SharpDX.DirectWrite.TextRange textRange)
 {
     SetInlineObject_(InlineObjectShadow.ToIntPtr(inlineObject), textRange);
 }
 public virtual void TestPost(NancyContext context, InlineObject body)
 {
     TestPost(body);
 }