コード例 #1
0
        private void DrawWord(WordDescription description, Rectangle rectangle)
        {
            var graphics = Graphics.FromImage(bitmap);

            graphics.DrawString(description.Word, description.Font, description.Brush, rectangle,
                                description.StringFormat);
        }
コード例 #2
0
        public IActionResult AddWordDescription([FromBody] WordDescription wordDesc)
        {
            bool retVal = addWordDesc.Add(wordDesc);

            if (retVal == false)
            {
                return(BadRequest(new { message = "Word description dont add because application get some errors" }));
            }
            else
            {
                return(Ok(new { message = "Words description add succesfully" }));
            }
        }
コード例 #3
0
        public bool Add(WordDescription wordDesc)
        {
            try
            {
                _wordDescriptionRepo.Insert(wordDesc);
                uow.SaveChanges();
                retVal = true;
            }
            catch
            {
                retVal = false;
            }

            return(retVal);
        }