Procházet zdrojové kódy

SchoolProduct model變更

jeff před 4 roky
rodič
revize
9dfb3a457f
100 změnil soubory, kde provedl 508 přidání a 12790 odebrání
  1. 0 0
      TEAMModelGrpc/Services/IBusinessService.cs
  2. 14 16
      TEAMModelGrpc/Startup.cs
  3. 0 1
      TEAMModelGrpc/TEAMModelGrpc.csproj
  4. 0 22
      TEAMModelOS.SDK/Context/Attributes/AllowCors/AllowCorsAttribute.cs
  5. 0 16
      TEAMModelOS.SDK/Context/Attributes/Azure/CosmosDBAttribute.cs
  6. 0 12
      TEAMModelOS.SDK/Context/Attributes/Azure/PartitionKeyAttribute.cs
  7. 0 54
      TEAMModelOS.SDK/Context/Exception/BizException.cs
  8. 0 87
      TEAMModelOS.SDK/Context/Filters/HttpGlobalExceptionFilter.cs
  9. 0 173
      TEAMModelOS.SDK/Context/Filters/HttpGlobalExceptionInvoke.cs
  10. 0 1
      TEAMModelOS.SDK/DI/AzureCosmos/AzureCosmosExtensions.cs
  11. 0 18
      TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosDict.cs
  12. 0 668
      TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosExOld.cs
  13. 0 18
      TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosModel.cs
  14. 0 46
      TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosUtil.cs
  15. 0 30
      TEAMModelOS.SDK/DI/AzureCosmos/Inner/IdPk.cs
  16. 24 18
      TEAMModelOS.SDK/DI/AzureCosmos/Inner/SQLHelper.cs
  17. 32 1
      TEAMModelOS.SDK/DI/AzureStorage/AzureStorageBlobExtensions.cs
  18. 0 457
      TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorConverter.cs
  19. 0 27
      TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorHSL.cs
  20. 0 72
      TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorHSV.cs
  21. 0 238
      TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorHelper.cs
  22. 0 83
      TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorRGB.cs
  23. 0 85
      TEAMModelOS.SDK/Helper/Common/StringHelper/HtmlHelper.cs
  24. 0 65
      TEAMModelOS.SDK/Helper/Common/ValidateHelper/ValidateHelper.cs
  25. 0 17
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/BrushDIBColorsEnum.cs
  26. 0 24
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/BrushEnum.cs
  27. 0 21
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/BrushHSEnum.cs
  28. 0 34
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontCharsetEnum.cs
  29. 0 22
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontClipPrecisEnum.cs
  30. 0 21
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontFFEnum.cs
  31. 0 30
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontFWEnum.cs
  32. 0 25
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontOutPrecisEnum.cs
  33. 0 18
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontPitchEnum.cs
  34. 0 22
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontQualityEnum.cs
  35. 0 103
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/GdiEnum.cs
  36. 0 187
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/GdiUtils.cs
  37. 0 657
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdi.cs
  38. 0 36
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiBrush.cs
  39. 0 102
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiFont.cs
  40. 0 15
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiObject.cs
  41. 0 30
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiPalette.cs
  42. 0 24
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiPatternBrush.cs
  43. 0 33
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiPen.cs
  44. 0 16
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiRegion.cs
  45. 0 22
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/PenEnum.cs
  46. 0 90
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/Point.cs
  47. 0 19
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/RegionEnum.cs
  48. 0 90
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/Size.cs
  49. 0 228
      TEAMModelOS.SDK/Helper/Common/WMFConverter/IO/DataInput.cs
  50. 0 132
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/Properties.cs
  51. 0 271
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgBrush.cs
  52. 0 976
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgDc.cs
  53. 0 532
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgFont.cs
  54. 0 2292
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgGdi.cs
  55. 0 77
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgObject.cs
  56. 0 67
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgPalette.cs
  57. 0 50
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgPatternBrush.cs
  58. 0 205
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgPen.cs
  59. 0 149
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgRectRegion.cs
  60. 0 38
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgRegion.cs
  61. 0 84
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Util/Base64.cs
  62. 0 15
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Util/ImageUtil.cs
  63. 0 74
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfBrush.cs
  64. 0 85
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfConstants.cs
  65. 0 250
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfFont.cs
  66. 0 1647
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfGdi.cs
  67. 0 49
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfObject.cs
  68. 0 65
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfPalette.cs
  69. 0 30
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfParseException.cs
  70. 0 821
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfParser.cs
  71. 0 52
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfPatternBrush.cs
  72. 0 75
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfPen.cs
  73. 0 92
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfRectRegion.cs
  74. 0 27
      TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfRegion.cs
  75. 0 188
      TEAMModelOS.SDK/Helper/Common/XmlHelper/Json2Xml.cs
  76. 0 67
      TEAMModelOS.SDK/Helper/Common/XmlHelper/XmlAndJson.cs
  77. 0 60
      TEAMModelOS.SDK/Helper/Common/XmlHelper/XmlSerializeHelper.cs
  78. 68 0
      TEAMModelOS.SDK/Models/Cosmos/Common/Inner/BaseItem.cs
  79. 23 0
      TEAMModelOS.SDK/Models/Cosmos/Common/Inner/Exercise.cs
  80. 24 0
      TEAMModelOS.SDK/Models/Cosmos/Common/Inner/Repair.cs
  81. 4 60
      TEAMModelOS.SDK/Models/Cosmos/Common/ItemInfo.cs
  82. 5 5
      TEAMModelOS.SDK/Models/Cosmos/Common/Knowledge.cs
  83. 0 1
      TEAMModelOS.SDK/Models/Cosmos/Common/Syllabus.cs
  84. 0 1
      TEAMModelOS.SDK/Models/Cosmos/CosmosEntity.cs
  85. 0 2
      TEAMModelOS.SDK/Models/Cosmos/School/School.cs
  86. 14 12
      TEAMModelOS/Models/SchoolInfo/SchoolProduct.cs
  87. 1 0
      TEAMModelOS.SDK/Models/Cosmos/School/Vote.cs
  88. 5 12
      TEAMModelOS.SDK/TEAMModelOS.SDK.csproj
  89. 46 0
      TEAMModelOS/ClientApp/src/assets/iconfont/demo_index.html
  90. 14 6
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.css
  91. binární
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.eot
  92. 1 1
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.js
  93. 14 0
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.json
  94. 7 1
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.svg
  95. binární
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.ttf
  96. binární
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff
  97. binární
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff2
  98. 1 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/app-nav.css
  99. 211 125
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testpop.css
  100. 0 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testpop.less

TEAMModelOS.SDK/Context/Configuration/IBusinessService.cs → TEAMModelGrpc/Services/IBusinessService.cs


+ 14 - 16
TEAMModelGrpc/Startup.cs

@@ -4,8 +4,7 @@ using System.IdentityModel.Tokens.Jwt;
 using System.Linq;
 using System.Security.Claims;
 using System.Text.Json;
-using System.Threading.Tasks;
-using Grpc.Extension.AspNetCore;
+using System.Threading.Tasks; 
 using Microsoft.AspNetCore.Authentication.JwtBearer;
 using Microsoft.AspNetCore.Builder;
 using Microsoft.AspNetCore.Hosting;
@@ -15,7 +14,6 @@ using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Hosting;
 using Microsoft.Extensions.Primitives;
 using Microsoft.IdentityModel.Tokens;
-using TEAMModelGrpc.Services;
 using TEAMModelOS.SDK.Context.Configuration;
 using TEAMModelOS.SDK.DI;
 using Microsoft.Extensions.Diagnostics.HealthChecks;
@@ -35,7 +33,7 @@ namespace TEAMModelGrpc
         {
             services.AddGrpc();
             //添加Grpc扩展
-            services.AddGrpcExtensions(_conf);
+           // services.AddGrpcExtensions(_conf);
             //Grpc健康检查
             services.AddGrpcHealthChecks()
                .AddAsyncCheck("", () =>
@@ -83,10 +81,10 @@ namespace TEAMModelGrpc
             RedisHelper.Initialization(csredis);
 
             //全局扫描基于IBusinessService接口的实现类
-            services.Scan(scan => scan.FromApplicationDependencies()
-               .AddClasses(classes => classes.AssignableTo<IBusinessService>())
-                   .AsImplementedInterfaces()
-                   .WithScopedLifetime());
+            //services.Scan(scan => scan.FromApplicationDependencies()
+            //   .AddClasses(classes => classes.AssignableTo<IBusinessService>())
+            //       .AsImplementedInterfaces()
+            //       .WithScopedLifetime());
 
         }
 
@@ -107,7 +105,7 @@ namespace TEAMModelGrpc
 
             app.UseEndpoints(endpoints =>
             {
-                endpoints.MapGrpcService<HomeWorkService>();
+               // endpoints.MapGrpcService<HomeWorkService>();
                 endpoints.MapGrpcHealthChecksService();
                 endpoints.MapGet("/generateJwtToken", context =>
                 {
@@ -122,14 +120,14 @@ namespace TEAMModelGrpc
             //CodeFirst的Grpc(会自动扫描TStartup所在程序集下的IGrpcSerivce)
 
 
-            app.UseGrpcExtensions<TEAMModelGrpc.Services.HomeWorkService>(options =>
-            {
-                //CodeFirst配制
-                options.GlobalPackage = "TMDGrpc";
-                options.ProtoNameSpace = "TMDGrpc";
-            })
+            //app.UseGrpcExtensions<TEAMModelGrpc.Services.HomeWorkService>(options =>
+            //{
+            //    //CodeFirst配制
+            //    options.GlobalPackage = "TMDGrpc";
+            //    options.ProtoNameSpace = "TMDGrpc";
+            //})
             //CodeFirst生成proto
-            .UseProtoGenerate("protos", false);
+            //.UseProtoGenerate("protos", false);
         }
 
         private string GenerateJwtToken(string name)

+ 0 - 1
TEAMModelGrpc/TEAMModelGrpc.csproj

@@ -44,6 +44,5 @@
   <ItemGroup>
     <Folder Include="GrpcHealthCheck\" />
     <Folder Include="Models\" />
-    <Folder Include="Services\" />
   </ItemGroup>
 </Project>

+ 0 - 22
TEAMModelOS.SDK/Context/Attributes/AllowCors/AllowCorsAttribute.cs

@@ -1,22 +0,0 @@
-using Microsoft.AspNetCore.Mvc.Filters;
-
-namespace TEAMModelOS.SDK.Context.Attributes.AllowCors
-{
-    /// <summary>
-    /// 跨域处理
-    /// </summary>
-    public class AllowCorsAttribute : ActionFilterAttribute
-    {
-        public override void OnActionExecuting(ActionExecutingContext filterContext)
-        {
-            var context = filterContext.HttpContext;
-            context.Response.Headers.Add("Access-Control-Allow-Origin", "*");
-            context.Response.Headers.Add("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS,POST,PUT");
-            context.Response.Headers.Add("Access-Control-Allow-Headers", "Access-Control-Allow-Headers," +
-                                         "Origin,Accept,X-Requested-With,Content-Type," +
-                                         "Access-Control-Request-Method,Access-Control-Request-Headers," +
-                                         "Content-Type,Accept,access_token,token,Authorization");
-            base.OnActionExecuting(filterContext);
-        }
-    }
-}

+ 0 - 16
TEAMModelOS.SDK/Context/Attributes/Azure/CosmosDBAttribute.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace TEAMModelOS.SDK.Context.Attributes.Azure
-{
-    [AttributeUsage(AttributeTargets.Class)]
-    public class CosmosDBAttribute: Attribute
-    {
-        //public int RU { get; set; }
-        public string Name { get; set; }
-        public bool Cache { get; set; } = false;
-        public bool Monitor { get; set; } = false;
-        public string Database { get; set; } = "TEAMModelOS";
-    }
-}

+ 0 - 12
TEAMModelOS.SDK/Context/Attributes/Azure/PartitionKeyAttribute.cs

@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace TEAMModelOS.SDK.Context.Attributes.Azure
-{
-    [AttributeUsage(AttributeTargets.Property)]
-    public class PartitionKeyAttribute : Attribute
-    {
-      // public string name { get; set; }
-    }
-}

+ 0 - 54
TEAMModelOS.SDK/Context/Exception/BizException.cs

@@ -1,54 +0,0 @@
-using System;
-
-namespace TEAMModelOS.SDK.Context.Exception
-{
-    public class BizException : System.Exception
-    {
-        public string message { get; set; } = "error";
-        public int code { get; set; } = 1;
-        public string devMessage { get; set; }
-        public BizException(String message,  int code,  string stackTrace) : base(message)
-        {
-            if (string.IsNullOrEmpty(stackTrace))
-            {
-                this.devMessage = this.StackTrace;
-            }
-            else
-            {
-                this.devMessage = stackTrace;
-            }
-            this.message = message;
-            this.code = code;
-        }
-        public BizException( String message,  int code) : base(message)
-        {
-            this.devMessage = this.StackTrace;
-            this.message = message;
-            this.code = code;
-        }
-        //
-        // 摘要:
-        //     Initializes a new instance of the System.Exception class.
-        public BizException() : base()
-        {
-            this.devMessage = this.StackTrace;
-            this.message = "error";
-            this.code = 1;
-        }
-
-        //
-        // 摘要:
-        //     Initializes a new instance of the System.Exception class with a specified error
-        //     message.
-        //
-        // 参数:
-        //   message:
-        //     The message that describes the error.
-        public BizException(string message) : base(message)
-        {
-            this.message = message;
-            this.devMessage = this.StackTrace;
-            this.code = 1;
-        }
-    }
-}

+ 0 - 87
TEAMModelOS.SDK/Context/Filters/HttpGlobalExceptionFilter.cs

@@ -1,87 +0,0 @@
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.Filters;
-using Microsoft.Extensions.Logging;
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Text;
-using System.Threading.Tasks;
-using TEAMModelOS.SDK.Context.Exception;
-using TEAMModelOS.SDK.Extension;
-using TEAMModelOS.SDK.Helper.Common.JsonHelper;
-using static TEAMModelOS.SDK.Context.Filter.HttpGlobalExceptionInvoke;
-
-namespace TEAMModelOS.SDK.Context.Filters
-{
-    /// <summary>
-    /// 全局异常处理
-    /// </summary>
-    public class HttpGlobalExceptionFilter : IExceptionFilter
-    {
-        readonly ILoggerFactory _loggerFactory;
-        readonly IWebHostEnvironment _env;
-        public HttpGlobalExceptionFilter(ILoggerFactory loggerFactory, IWebHostEnvironment env)
-        {
-            _loggerFactory = loggerFactory;
-            _env = env;
-        }
-        /// <summary>
-        /// 异常拦截
-        /// </summary>
-        /// <param name="context"></param>
-        public async void OnException(ExceptionContext context)
-        {
-            int code = context.HttpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
-            if (context.Exception is BizException)
-            {
-                context.HttpContext.Response.StatusCode = 200;
-            }
-            var errorResponse = new ErrorResponse<string>(1, context.Exception.Message);
-            // errorResponse.devMessage = context.Exception.StackTrace;
-            context.Result = new ApplicationErrorResult(errorResponse, code);
-            context.ExceptionHandled = true;
-            if (context.HttpContext.Response.StatusCode != 200)//未捕捉过并且状态码不为200
-            {
-                string msg = "";
-                switch (context.HttpContext.Response.StatusCode)
-                {
-                    case 401:
-                        msg = "Unauthorized";
-                        break;
-                    case 404:
-                        msg = "Service Not Found";
-                        break;
-                    case 502:
-                        msg = "Request Erro";
-                        break;
-                    case 500:
-                        msg = context.Exception.Message;
-                        break;
-                    case 403:
-                        msg = context.Exception.Message;
-                        break;
-                    default:
-                        msg = "Unknown Error";
-                        break;
-                }
-                await HandleExceptionAsync(context.HttpContext, context.HttpContext.Response.StatusCode, msg, context.Exception == null ? "" : context.Exception.StackTrace);
-            }
-        }
-
-        private static async Task HandleExceptionAsync(HttpContext context, int statusCode, string msg, string devmsg)
-        {
-            var data = new ErrorResponse<string>(statusCode, msg, devmsg);
-            context.Response.ContentType = "application/json;charset=utf-8";
-            await context.Response.WriteAsync(data.ToJsonString());
-        }
-    }
-    public class ApplicationErrorResult : ObjectResult
-    {
-        public ApplicationErrorResult(object value, int code) : base(value)
-        {
-            StatusCode = code;
-        }
-    }
-}

+ 0 - 173
TEAMModelOS.SDK/Context/Filters/HttpGlobalExceptionInvoke.cs

@@ -1,173 +0,0 @@
-
-using Microsoft.AspNetCore.Http;
-using System;
-using System.Threading.Tasks;
-using TEAMModelOS.SDK.Context.Constant.Common;
-using TEAMModelOS.SDK.Context.Exception;
-using TEAMModelOS.SDK.Extension;
-using TEAMModelOS.SDK.Helper.Common.JsonHelper;
-
-namespace TEAMModelOS.SDK.Context.Filter
-{
-    public class HttpGlobalExceptionInvoke
-    {
-        private readonly RequestDelegate _next;
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="next"></param>
-        public HttpGlobalExceptionInvoke(RequestDelegate next)
-        {
-            _next = next;
-        }
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="context"></param>
-        /// <returns></returns>
-        public async Task InvokeAsync(HttpContext context)
-        {
-            int bizCode = 0;
-            System.Exception exs = null;
-            bool isCatched = false;
-            try
-            {
-                await _next(context);
-            }
-            catch (System.Exception ex) //发生异常
-            {
-                exs = ex;
-                //自定义业务异常
-                if (ex is BizException)
-                {
-                    bizCode = ((BizException)ex).code;
-                    if (bizCode == 401 || bizCode == 404 || bizCode == 502 || bizCode == 403)
-                    {
-                        //context.Response.StatusCode = bizCode;
-                    }
-                    else
-                    {
-                      //  context.Response.StatusCode = 200;
-                    }
-                    // context.Response.StatusCode = ((BizException)ex).code;
-                }
-                //未知异常
-                else
-                {
-                    //context.Response.StatusCode = 500;                  
-                }
-                await HandleExceptionAsync(context, bizCode, ex.Message, ex.StackTrace);
-                isCatched = true;
-            }
-            finally
-            {
-                if (!isCatched && context.Response.StatusCode != 200)//未捕捉过并且状态码不为200
-                {
-                    string msg;
-                    switch (context.Response.StatusCode)
-                    {
-                        case 400:
-                            msg = "Bad Request";
-                            break;
-                        case 401:
-                            msg = "Unauthorized";
-                            break;
-                        case 404:
-                            msg = "Service Not Found";
-                            break;
-                        case 502:
-                            msg = "Request Erro";
-                            break;
-                        case 500:
-                            msg = exs.Message;
-                            break;
-                        case 403:
-                            msg = "金钥验证错误";
-                            break;
-                        default:
-                            msg = "Unknown Error";
-                            break;
-                    }
-                    await HandleExceptionAsync(context, bizCode, msg, exs == null ? "" : exs.StackTrace);
-                }
-            }
-        }
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="context"></param>
-        /// 
-        /// 
-        /// <param name="statusCode"></param>
-        /// <param name="msg"></param>
-        /// <returns></returns>
-        private static async Task HandleExceptionAsync(HttpContext context, int bizCode, string msg, string devmsg)
-        {
-            if (context.Response.StatusCode == 500)
-            {
-               // context.Response.StatusCode = 200;
-            }
-            var data = new ErrorResponse<string>(bizCode, msg, devmsg);
-            context.Response.ContentType = Constants.CONTENT_TYPE_JSON;
-            //if (context.Response.HasStarted) {
-            await context.Response.WriteAsync(data.ToJsonString());
-            //}
-
-        }
-        /// <summary>
-        /// 异常信息封装
-        /// </summary>
-        /// 
-
-        public class ErrorResponse<T>
-        {
-            public ErrorResponse()
-            {
-                error = new ErrorModel<T>();
-            }
-            public ErrorResponse(string message)
-            {
-                error = new ErrorModel<T>
-                {
-                    message = message,
-                    devmsg = message
-                };
-            }
-            public ErrorResponse(int code, string message)
-            {
-                error = new ErrorModel<T>
-                {
-                    message = message,
-                    devmsg = message,
-                    code = code
-                };
-
-            }
-            public ErrorResponse(int code, string message, string devMessage)
-            {
-                error = new ErrorModel<T>
-                {
-                    message = message,
-                    devmsg = message,
-                    code = code
-                };
-                error.devmsg = devMessage;
-            }
-
-           // public string jsonrpc { get; set; } = "2.0";
-           // public double id { get; set; } = 1;
-            private object result { get; set; } = null;
-            public ErrorModel<T> error { get; set; } = null;
-        }
-    }
-
-    public class ErrorModel<E>
-    {
-      //  public long responseTime = DateTime.Now.Ticks;
-        public int code { get; set; } = 1;
-        public string message { get; set; }
-        public string devmsg { get; set; }
-        public E data { get; set; }
-    }
-
-}

+ 0 - 1
TEAMModelOS.SDK/DI/AzureCosmos/AzureCosmosExtensions.cs

@@ -15,7 +15,6 @@ using System.Diagnostics;
 using Azure.Cosmos;
 using System.Text.Json;
 using System.Net;
-using TEAMModelOS.SDK.Context.Exception;
 using System.Linq.Expressions;
 using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
 using TEAMModelOS.SDK.Helper.Common.JsonHelper;

+ 0 - 18
TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosDict.cs

@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
-{
-    public class AzureCosmosDict
-    {
-        /// <summary>
-        /// 表名方式的连接
-        /// </summary>
-        public Dictionary<string, AzureCosmosModel> nameCosmos { get; set; } = new Dictionary<string, AzureCosmosModel>();
-        /// <summary>
-        /// 类类型的连接
-        /// </summary>
-        public Dictionary<string, AzureCosmosModel> typeCosmos { get; set; } = new Dictionary<string, AzureCosmosModel>();
-    }
-}

+ 0 - 668
TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosExOld.cs

@@ -1,668 +0,0 @@
-//using Azure;
-//using Azure.Cosmos;
-//using System;
-//using System.Collections.Generic;
-//using System.Diagnostics;
-//using System.IO;
-//using System.Linq;
-//using System.Text;
-//using System.Text.Json;
-//using System.Threading.Tasks;
-//using TEAMModelOS.SDK.Context.Exception;
-//using TEAMModelOS.SDK.Models;
-
-//namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
-//{
-//    public static class AzureCosmosExOld
-//    {
-//        /// <summary>
-//        /// 缓存前缀
-//        /// </summary>
-//        private const string CacheCosmosPrefix = "cosmos:";
-//        /// <summary>
-//        /// ttl时长 1秒
-//        /// </summary>
-//        private const int ttl = 1;
-//        /// <summary>
-//        /// 分页大小
-//        /// </summary>
-//        private const int pageSize = 200;
-//        /// <summary>
-//        /// 超时时间
-//        /// </summary>
-//        private const int timeoutSeconds = 86400;
-
-//        // TODO 此区需移除或优化
-//        #region 此区需移除或优化 
-
-//        public static async Task<T> SaveOrUpdate<T>(this AzureCosmosFactory azureCosmosFactory, T entity) where T : CosmosEntity
-//        {
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(typeof(T).Name);
-//            entity.pk = container.type.Name;
-//            ItemResponse<T> response = await container.container.UpsertItemAsync(item: entity);
-//            if (container.cache && RedisHelper.Instance != null)
-//            {
-//                if (!RedisHelper.Exists(CacheCosmosPrefix + container.container.Id))
-//                {
-//                    await RedisHelper.HSetAsync(CacheCosmosPrefix + container.container.Id, entity.id, entity);
-//                }
-//                else
-//                {
-//                    await RedisHelper.HSetAsync(CacheCosmosPrefix + container.container.Id, entity.id, entity);
-//                    await RedisHelper.ExpireAsync(CacheCosmosPrefix + container.container.Id, timeoutSeconds);
-//                }
-//            }
-//            return response.Value;
-//        }
-//        public static async Task<List<T>> SaveOrUpdateAll<T>(this AzureCosmosFactory azureCosmosFactory, List<T> enyites) where T : CosmosEntity
-//        {
-//            Type type = typeof(T);
-//            int pages = (int)Math.Ceiling((double)enyites.Count / pageSize);
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(type.Name);
-//            bool flag = false;
-//            if (RedisHelper.Exists(CacheCosmosPrefix + container.container.Id))
-//            {
-//                flag = true;
-//            }
-
-//            string partitionKey = AzureCosmosUtil.GetPartitionKey(type);
-
-//            Stopwatch stopwatch = Stopwatch.StartNew();
-//            for (int i = 0; i < pages; i++)
-//            {
-//                List<T> lists = enyites.Skip((i) * pageSize).Take(pageSize).ToList();
-//                List<KeyValuePair<PartitionKey, Stream>> itemsToInsert = new List<KeyValuePair<PartitionKey, Stream>>();
-//                lists.ForEach(async x =>
-//                {
-//                    x.pk = type.Name;
-//                    MemoryStream stream = new MemoryStream();
-//                    await JsonSerializer.SerializeAsync(stream, x, new JsonSerializerOptions { IgnoreNullValues = true });
-//                    object o = type.GetProperty(partitionKey).GetValue(x, null);
-//                    KeyValuePair<PartitionKey, Stream> keyValue = new KeyValuePair<PartitionKey, Stream>(new PartitionKey(o.ToString()), stream);
-//                    itemsToInsert.Add(keyValue);
-//                });
-//                List<Task> tasks = new List<Task>(lists.Count);
-//                itemsToInsert.ForEach(item =>
-//                {
-//                    tasks.Add(container.container.UpsertItemStreamAsync(item.Value, item.Key)
-//                        .ContinueWith((Task<Response> task) =>
-//                        {
-//                        }
-//                        ));
-//                });
-//                await Task.WhenAll(tasks);
-//                if (container.cache && RedisHelper.Instance != null)
-//                {
-//                    lists.ForEach(async x => {
-//                        await RedisHelper.HSetAsync(CacheCosmosPrefix + container.container.Id, x.id, x);
-//                    });
-//                }
-//            }
-//            if (container.cache && RedisHelper.Instance != null && !flag)
-//            {
-//                await RedisHelper.ExpireAsync(CacheCosmosPrefix + container.container.Id, timeoutSeconds);
-//            }
-//            stopwatch.Stop();
-//            return enyites;
-//        }
-//        public static async Task<List<int>> FindCountByDict<T>(this AzureCosmosFactory azureCosmosFactory, Dictionary<string, object> dict)
-//        {
-//            Type type = typeof(T);
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(type.Name);
-//            string pk = type.Name;
-//            StringBuilder sql = new StringBuilder("select  value count(c)  from c");
-//            AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(dict, sql, pk);
-//            if (cosmosDbQuery == null)
-//            {
-//                return new List<int> { 0 };
-//            }
-//            QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
-//            AsyncPageable<int> query = container.container.GetItemQueryIterator<int>(queryDefinition: cosmosDbQuery.CosmosQueryDefinition, requestOptions: queryRequestOptions);
-//            return await ResultsFromFeedIterator(query);
-//        }
-
-//        public static async Task<List<dynamic>> FindCountByDict(this AzureCosmosFactory azureCosmosFactory, string CollectionName, Dictionary<string, object> dict)
-//        {
-//            if (azureCosmosFactory.CosmosDict.typeCosmos.TryGetValue(CollectionName, out AzureCosmosModel container))
-//            {
-//                string pk = container.type.Name;
-//                dict.Remove("@CURRPAGE");
-//                dict.Remove("@PAGESIZE");
-//                dict.Remove("@ASC");
-//                dict.Remove("@DESC");
-//                StringBuilder sql = new StringBuilder("select  value count(c)  from c");
-//                AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(dict, sql, pk);
-//                if (cosmosDbQuery == null)
-//                {
-//                    return new List<dynamic> { 0 };
-//                }
-//                QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
-//                AsyncPageable<dynamic> query = container.container.GetItemQueryIterator<dynamic>(queryDefinition: cosmosDbQuery.CosmosQueryDefinition, requestOptions: queryRequestOptions);
-//                return await ResultsFromFeedIterator(query);
-//            }
-//            else
-//            {
-//                throw new BizException("CollectionName named:" + CollectionName + " dose not exsit in Database!");
-//            }
-//        }
-//        public static async Task<List<dynamic>> FindCountByDict(this AzureCosmosFactory azureCosmosFactory, string CollectionName, JsonElement json)
-//        {
-//            if (azureCosmosFactory.CosmosDict.typeCosmos.TryGetValue(CollectionName, out AzureCosmosModel container))
-//            {
-//                Dictionary<string, object> dict = new Dictionary<string, object>();
-//                var emobj = json.EnumerateObject();
-//                while (emobj.MoveNext())
-//                {
-//                    if (emobj.Current.Name != "@CURRPAGE" ||
-//                        emobj.Current.Name != "@PAGESIZE" ||
-//                        emobj.Current.Name != "@ASC" ||
-//                        emobj.Current.Name != "@DESC")
-//                    {
-//                        dict[emobj.Current.Name] = emobj.Current.Value;
-//                    }
-//                }
-//                string pk = container.type.Name;
-//                StringBuilder sql = new StringBuilder("select  value count(c)  from c");
-//                AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(dict, sql, pk);
-//                if (cosmosDbQuery == null)
-//                {
-//                    return new List<dynamic> { 0 };
-//                }
-//                QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
-//                AsyncPageable<dynamic> query = container.container.GetItemQueryIterator<dynamic>(queryDefinition: cosmosDbQuery.CosmosQueryDefinition, requestOptions: queryRequestOptions);
-//                return await ResultsFromFeedIterator(query);
-//            }
-//            else
-//            {
-//                throw new BizException("CollectionName named:" + CollectionName + " dose not exsit in Database!");
-//            }
-//        }
-//        public static async Task<T> Update<T>(this AzureCosmosFactory azureCosmosFactory, T entity) where T : CosmosEntity
-//        {
-//            Type type = typeof(T);
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(type.Name);
-//            string partitionKey = AzureCosmosUtil.GetPartitionKey(type);
-//            entity.pk = type.Name;
-//            object o = type.GetProperty(partitionKey).GetValue(entity, null);
-//            ItemResponse<T> response = await container.container.ReplaceItemAsync(entity, entity.id, new PartitionKey(o.ToString()));
-//            if (container.cache && RedisHelper.Instance != null)
-//            {
-//                if (!RedisHelper.Exists(CacheCosmosPrefix + container.container.Id))
-//                {
-//                    await RedisHelper.HSetAsync(CacheCosmosPrefix + container.container.Id, entity.id, entity);
-//                }
-//                else
-//                {
-//                    await RedisHelper.HSetAsync(CacheCosmosPrefix + container.container.Id, entity.id, entity);
-//                    await RedisHelper.ExpireAsync(CacheCosmosPrefix + container.container.Id, timeoutSeconds);
-//                }
-//            }
-//            return response.Value;
-//        }
-//        internal class Item
-//        {
-//            public string id { get; set; }
-//            public string pk { get; set; }
-//            public MemoryStream stream { get; set; }
-//        }
-//        public static async Task<List<T>> UpdateAll<T>(this AzureCosmosFactory azureCosmosFactory, List<T> enyites) where T : CosmosEntity
-//        {
-//            //await Task.Run(() => Parallel.ForEach(entities, new ParallelOptions { MaxDegreeOfParallelism = 2 }, (item) =>
-//            //{
-//            //    Task.WaitAll(Update(item));
-//            //}));
-//            Type type = typeof(T);
-//            int pages = (int)Math.Ceiling((double)enyites.Count / pageSize);
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(type.Name);
-//            bool flag = false;
-//            if (RedisHelper.Exists(CacheCosmosPrefix + container.container.Id))
-//            {
-//                flag = true;
-//            }
-//            string partitionKey = AzureCosmosUtil.GetPartitionKey(type);
-
-//            Stopwatch stopwatch = Stopwatch.StartNew();
-//            for (int i = 0; i < pages; i++)
-//            {
-//                List<T> lists = enyites.Skip((i) * pageSize).Take(pageSize).ToList();
-//                List<Item> itemsToInsert = new List<Item>();
-//                lists.ForEach(async x =>
-//                {
-//                    x.pk = type.Name;
-//                    MemoryStream stream = new MemoryStream();
-//                    await JsonSerializer.SerializeAsync(stream, x, new JsonSerializerOptions { IgnoreNullValues = true });
-//                    object o = type.GetProperty(partitionKey).GetValue(x, null);
-//                    Item keyValue = new Item { id = x.id, pk = o.ToString(), stream = stream };
-//                    itemsToInsert.Add(keyValue);
-//                });
-//                List<Task> tasks = new List<Task>(lists.Count);
-//                itemsToInsert.ForEach(item =>
-//                {
-//                    tasks.Add(container.container.ReplaceItemStreamAsync(item.stream, item.id, new PartitionKey(item.pk))
-//                        .ContinueWith((Task<Response> task) =>
-//                        {
-//                            //using (ResponseMessage response = task.Result)
-//                            //{
-//                            //    if (!response.IsSuccessStatusCode)
-//                            //    {
-//                            //    }
-//                            //}
-//                        }
-//                        ));
-//                });
-//                await Task.WhenAll(tasks);
-//                if (container.cache && RedisHelper.Instance != null)
-//                {
-//                    lists.ForEach(async x => {
-//                        await RedisHelper.HSetAsync(CacheCosmosPrefix + container.container.Id, x.id, x);
-//                    });
-//                }
-//            }
-//            if (container.cache && RedisHelper.Instance != null && !flag)
-//            {
-//                await RedisHelper.ExpireAsync(CacheCosmosPrefix + container.container.Id, timeoutSeconds);
-//            }
-//            stopwatch.Stop();
-//            return enyites;
-//        }
-//        public static async Task<List<T>> FindByDict<T>(this AzureCosmosFactory azureCosmosFactory, Dictionary<string, object> dict, List<string> propertys = null) where T : CosmosEntity
-//        {
-//            StringBuilder sql;
-//            sql = SQLHelper.GetSQLSelect(propertys);
-//            string pk = typeof(T).Name;
-//            AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(dict, sql, pk);
-//            QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
-//            return await ResultsFromQueryAndOptions<T>(azureCosmosFactory, cosmosDbQuery, queryRequestOptions);
-//        }
-//        public static async Task<List<T>> FindByDict<T>(this AzureCosmosFactory azureCosmosFactory, JsonElement jsonElement, List<string> propertys = null) where T : CosmosEntity
-//        {
-//            StringBuilder sql;
-//            sql = SQLHelper.GetSQLSelect(propertys);
-//            string pk = typeof(T).Name;
-//            //Dictionary<string, object> dict = new Dictionary<string, object>();
-//            /* var emobj = jsonElement.EnumerateObject();
-//             while (emobj.MoveNext())
-//             {
-//                 dict[emobj.Current.Name] = emobj.Current.Value;
-//             }
-//             //处理code
-//             if (dict.TryGetValue("code", out object _))
-//             {
-//                 dict.Remove("code");
-//             }*/
-//            AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(jsonElement, sql, pk);
-//            QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
-//            return await ResultsFromQueryAndOptions<T>(azureCosmosFactory, cosmosDbQuery, queryRequestOptions);
-//        }
-//        public static async Task<List<dynamic>> FindByDict(this AzureCosmosFactory azureCosmosFactory, string CollectionName, JsonElement json, List<string> propertys = null)
-//        {
-//            if (azureCosmosFactory.CosmosDict.typeCosmos.TryGetValue(CollectionName, out AzureCosmosModel container))
-//            {
-
-//                string pk = container.type.Name;
-//                StringBuilder sql;
-//                sql = SQLHelper.GetSQLSelect(propertys);
-//                AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(json, sql, pk);
-//                QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
-//                AsyncPageable<dynamic> query = container.container.GetItemQueryIterator<dynamic>(queryDefinition: cosmosDbQuery.CosmosQueryDefinition, requestOptions: queryRequestOptions);
-//                return await ResultsFromFeedIterator(query);
-//            }
-//            else
-//            {
-//                throw new BizException("CollectionName named:" + CollectionName + " dose not exsit in Database!");
-//            }
-//        }
-//        public static async Task<List<dynamic>> FindByDict(this AzureCosmosFactory azureCosmosFactory, string CollectionName, Dictionary<string, object> dict, List<string> propertys = null)
-//        {
-//            if (azureCosmosFactory.CosmosDict.typeCosmos.TryGetValue(CollectionName, out AzureCosmosModel container))
-//            {
-
-//                string pk = container.type.Name;
-//                StringBuilder sql;
-//                sql = SQLHelper.GetSQLSelect(propertys);
-//                AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(dict, sql, pk);
-//                QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
-//                AsyncPageable<dynamic> query = container.container.GetItemQueryIterator<dynamic>(queryDefinition: cosmosDbQuery.CosmosQueryDefinition, requestOptions: queryRequestOptions);
-//                return await ResultsFromFeedIterator(query);
-//            }
-//            else
-//            {
-//                throw new BizException("CollectionName named:" + CollectionName + " dose not exsit in Database!");
-//            }
-//        }
-//        public static async Task<List<IdPk>> DeleteAll<T>(this AzureCosmosFactory azureCosmosFactory, List<IdPk> ids) where T : CosmosEntity
-//        {
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(typeof(T).Name);
-//            List<IdPk> idPks = new List<IdPk>();
-//            if (container.monitor)
-//            {
-//                List<T> list = await azureCosmosFactory.FindByDict<T>(new Dictionary<string, object>() { { "id", ids.Select(x => x.id).ToArray() } });
-//                list = await azureCosmosFactory.DeleteTTL(list);
-//                return ids;
-//            }
-//            else
-//            {
-//                int pages = (int)Math.Ceiling((double)ids.Count / pageSize);
-//                Stopwatch stopwatch = Stopwatch.StartNew();
-//                for (int i = 0; i < pages; i++)
-//                {
-//                    List<IdPk> lists = ids.Skip((i) * pageSize).Take(pageSize).ToList();
-//                    List<Task> tasks = new List<Task>(lists.Count);
-//                    lists.ForEach(item =>
-//                    {
-//                        tasks.Add(container.container.DeleteItemStreamAsync(item.id, new PartitionKey(item.pk))
-//                            .ContinueWith((Task<Response> task) =>
-//                            {
-//                                using (Response response = task.Result)
-//                                {
-//                                    idPks.Add(new IdPk { id = item.id, pk = item.pk, Status = response.Status });
-//                                    //    if (!response.IsSuccessStatusCode)
-//                                    //    {
-//                                    //    }
-//                                }
-//                            }
-//                            ));
-//                    });
-//                    await Task.WhenAll(tasks);
-//                    if (container.cache && RedisHelper.Instance != null)
-//                    {
-//                        lists.ForEach(async x => {
-//                            await RedisHelper.HDelAsync(CacheCosmosPrefix + container.container.Id, x.id);
-//                        });
-//                    }
-//                }
-//                stopwatch.Stop();
-//                return idPks;
-//            }
-//        }
-//        public static async Task<List<IdPk>> DeleteAll<T>(this AzureCosmosFactory azureCosmosFactory, Dictionary<string, object> dict) where T : CosmosEntity
-//        {
-//            if (dict.Keys.Count > 0)
-//            {
-//                List<T> list = await azureCosmosFactory.FindByDict<T>(dict);
-
-//                return await azureCosmosFactory.DeleteAll(list);
-//            }
-//            else
-//            {
-//                throw new BizException("参数为空", 500);
-//            }
-
-//        }
-//        public static async Task<List<IdPk>> DeleteAll<T>(this AzureCosmosFactory azureCosmosFactory, JsonElement dict) where T : CosmosEntity
-//        {
-//            List<T> list = await azureCosmosFactory.FindByDict<T>(dict);
-//            return await azureCosmosFactory.DeleteAll(list);
-//        }
-//        public static async Task<List<IdPk>> DeleteAll<T>(this AzureCosmosFactory azureCosmosFactory, List<T> enyites) where T : CosmosEntity
-//        {
-//            Type type = typeof(T);
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(type.Name);
-//            List<IdPk> idPks = new List<IdPk>();
-
-//            string pk = AzureCosmosUtil.GetPartitionKey(type);
-//            if (container.monitor)
-//            {
-//                enyites = await azureCosmosFactory.DeleteTTL(enyites);
-//                foreach (T t in enyites)
-//                {
-//                    object o = type.GetProperty(pk).GetValue(t, null);
-//                    idPks.Add(new IdPk { id = t.id, pk = o.ToString(), StatusCode = HttpStatusCode.NoContent });
-//                }
-//                return idPks;
-//            }
-//            else
-//            {
-//                int pages = (int)Math.Ceiling((double)enyites.Count / pageSize);
-//                Stopwatch stopwatch = Stopwatch.StartNew();
-//                for (int i = 0; i < pages; i++)
-//                {
-//                    List<T> lists = enyites.Skip((i) * pageSize).Take(pageSize).ToList();
-//                    List<KeyValuePair<PartitionKey, string>> itemsToInsert = new List<KeyValuePair<PartitionKey, string>>();
-//                    lists.ForEach(x =>
-//                    {
-//                        object o = type.GetProperty(pk).GetValue(x, null);
-//                        KeyValuePair<PartitionKey, string> keyValue = new KeyValuePair<PartitionKey, string>(new PartitionKey(o.ToString()), x.id);
-//                        itemsToInsert.Add(keyValue);
-//                    });
-
-//                    List<Task> tasks = new List<Task>(lists.Count);
-//                    itemsToInsert.ForEach(item =>
-//                    {
-//                        tasks.Add(container.container.DeleteItemStreamAsync(item.Value, item.Key)
-//                        .ContinueWith((Task<Response> task) =>
-//                        {
-//                            using (Response response = task.Result)
-//                            {
-
-//                                idPks.Add(new IdPk { id = item.Value, pk = item.Key.ToString(), Status = response.Status });
-
-//                            }
-//                        }
-//                        ));
-//                    });
-//                    await Task.WhenAll(tasks); if (container.cache && RedisHelper.Instance != null)
-//                    {
-//                        lists.ForEach(async x => {
-//                            await RedisHelper.HDelAsync(CacheCosmosPrefix + container.container.Id, x.id);
-//                        });
-//                    }
-//                }
-//                stopwatch.Stop();
-//                return idPks;
-//            }
-//        }
-//        public static async Task<IdPk> DeleteAsync<T>(this AzureCosmosFactory azureCosmosFactory, IdPk idPk) where T : CosmosEntity
-//        {
-//            return await DeleteAsync<T>(azureCosmosFactory, idPk.id, idPk.pk);
-//        }
-//        public static async Task<IdPk> DeleteAsync<T>(this AzureCosmosFactory azureCosmosFactory, string id, string pk) where T : CosmosEntity
-//        {
-
-//            //  pk =AzureCosmosUtil.GetPartitionKey<T>();
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(typeof(T).Name);
-//            if (container.monitor)
-//            {
-//                List<T> list = await FindByDict<T>(azureCosmosFactory, new Dictionary<string, object>() { { "id", id } });
-//                if (list.Count > 0)
-//                {
-//                    await DeleteTTL<T>(azureCosmosFactory, list);
-//                    return new IdPk { id = id, pk = pk, StatusCode = HttpStatusCode.NoContent };
-//                }
-//                else
-//                {
-//                    throw new BizException("未找到ID匹配的数据,删除失败");
-//                }
-//            }
-//            else
-//            {
-//                Response response = await container.container.DeleteItemStreamAsync(id: id, partitionKey: new PartitionKey(pk));
-//                if (container.cache && RedisHelper.Instance != null)
-//                {
-//                    await RedisHelper.HDelAsync(CacheCosmosPrefix + container.container.Id, id);
-//                }
-//                return new IdPk { id = id, pk = pk, Status = response.Status };
-//            }
-
-//        }
-//        public static async Task<IdPk> DeleteAsync<T>(this AzureCosmosFactory azureCosmosFactory, T entity) where T : CosmosEntity
-//        {
-//            Type type = typeof(T);
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(type.Name);
-//            string partitionKey = AzureCosmosUtil.GetPartitionKey(type);
-
-//            object o = type.GetProperty(partitionKey).GetValue(entity, null);
-//            if (container.monitor)
-//            {
-//                await DeleteTTL<T>(azureCosmosFactory, new List<T>() { entity });
-//                return new IdPk { id = entity.id, pk = o.ToString(), StatusCode = HttpStatusCode.NoContent };
-//            }
-//            else
-//            {
-//                Response response = await container.container.DeleteItemStreamAsync(id: entity.id, partitionKey: new PartitionKey(o.ToString()));
-//                if (container.cache && RedisHelper.Instance != null)
-//                {
-//                    await RedisHelper.HDelAsync(CacheCosmosPrefix + container.container.Id, entity.id);
-//                }
-//                return new IdPk { id = entity.id, pk = partitionKey, Status = response.Status };
-//            }
-//        }
-//        public static async Task<List<T>> FindSQL<T>(this AzureCosmosFactory azureCosmosFactory, string sql, Dictionary<string, object> Parameters = null) where T : CosmosEntity
-//        {
-//            if (sql.Contains(".pk"))
-//            {
-//                AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(typeof(T).Name);
-//                QueryRequestOptions queryOptions = GetQueryRequestOptions(GetEffectivePageSize(-1, null));
-//                if (Parameters != null)
-//                {
-//                    AzureCosmosQuery cosmosDbQuery = new AzureCosmosQuery
-//                    {
-//                        QueryText = sql,
-//                        Parameters = Parameters
-//                    };
-//                    AsyncPageable<T> feedIterator = container.container
-//                    .GetItemQueryIterator<T>(cosmosDbQuery.CosmosQueryDefinition, requestOptions: queryOptions);
-//                    return await ResultsFromFeedIterator(feedIterator);
-//                }
-//                else
-//                {
-//                    QueryDefinition queryDefinition = new QueryDefinition(sql);
-//                    return await ResultsFromFeedIterator<T>(container.container.GetItemQueryIterator<T>(queryDefinition));
-//                }
-//            }
-//            else
-//            {
-//                throw new BizException("查询参数必须设置 .pk ", ResponseCode.PARAMS_ERROR);
-//            }
-//        }
-//        /// <summary>
-//        /// 偌TTL刉壺
-//        /// </summary>
-//        /// <typeparam name="T"></typeparam>
-//        /// <param name="list"></param>
-//        /// <returns></returns>
-//        private static async Task<List<T>> DeleteTTL<T>(this AzureCosmosFactory azureCosmosFactory, List<T> list) where T : CosmosEntity
-//        {
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(typeof(T).Name);
-//            list.ForEach(x => { x.ttl = ttl; });
-//            list = await DeleteTTlALL(azureCosmosFactory, list);
-//            if (container.cache && RedisHelper.Instance != null)
-//            {
-//                list.ForEach(async x => {
-//                    await RedisHelper.HDelAsync(CacheCosmosPrefix + container.container.Id, x.id);
-//                });
-//            }
-//            return list;
-//        }
-//        private static async Task<List<T>> DeleteTTlALL<T>(this AzureCosmosFactory azureCosmosFactory, List<T> enyites) where T : CosmosEntity
-//        {
-//            Type type = typeof(T);
-//            int pages = (int)Math.Ceiling((double)enyites.Count / pageSize);
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(type.Name);
-//            bool flag = false;
-//            if (RedisHelper.Exists(CacheCosmosPrefix + container.container.Id))
-//            {
-//                flag = true;
-//            }
-//            string partitionKey = AzureCosmosUtil.GetPartitionKey(type);
-
-//            Stopwatch stopwatch = Stopwatch.StartNew();
-//            for (int i = 0; i < pages; i++)
-//            {
-//                List<T> lists = enyites.Skip((i) * pageSize).Take(pageSize).ToList();
-//                List<KeyValuePair<PartitionKey, Stream>> itemsToInsert = new List<KeyValuePair<PartitionKey, Stream>>();
-//                lists.ForEach(async x =>
-//                {
-//                    x.pk = type.Name;
-//                    //x.ttl = null;
-//                    MemoryStream stream = new MemoryStream();
-//                    await JsonSerializer.SerializeAsync(stream, x, new JsonSerializerOptions { IgnoreNullValues = true });
-//                    object o = type.GetProperty(partitionKey).GetValue(x, null);
-//                    KeyValuePair<PartitionKey, Stream> keyValue = new KeyValuePair<PartitionKey, Stream>(new PartitionKey(o.ToString()), stream);
-//                    itemsToInsert.Add(keyValue);
-//                });
-//                List<Task> tasks = new List<Task>(lists.Count);
-//                itemsToInsert.ForEach(item =>
-//                {
-//                    tasks.Add(container.container.UpsertItemStreamAsync(item.Value, item.Key)
-//                        .ContinueWith((Task<Response> task) =>
-//                        {
-//                            //using (ResponseMessage response = task.Result)
-//                            //{
-//                            //    if (!response.IsSuccessStatusCode)
-//                            //    {
-//                            //    }
-//                            //}
-//                        }
-//                        ));
-//                });
-//                await Task.WhenAll(tasks);
-//                if (container.cache && RedisHelper.Instance != null)
-//                {
-//                    lists.ForEach(async x => {
-//                        await RedisHelper.HSetAsync(CacheCosmosPrefix + container.container.Id, x.id, x);
-//                    });
-//                }
-//            }
-//            if (container.cache && RedisHelper.Instance != null && !flag)
-//            {
-//                await RedisHelper.ExpireAsync(CacheCosmosPrefix + container.container.Id, timeoutSeconds);
-//            }
-//            stopwatch.Stop();
-//            return enyites;
-//        }
-//        private static QueryRequestOptions GetDefaultQueryRequestOptions(int? itemsPerPage = null, int? maxBufferedItemCount = null, int? maxConcurrency = null)
-//        {
-//            QueryRequestOptions queryRequestOptions = new QueryRequestOptions
-//            {
-//                MaxItemCount = itemsPerPage == -1 ? 1000 : itemsPerPage,
-//                MaxBufferedItemCount = maxBufferedItemCount ?? 100,
-//                MaxConcurrency = maxConcurrency ?? 50
-//            };
-//            return queryRequestOptions;
-//        }
-//        private static int GetEffectivePageSize(int itemsPerPage, int? maxItemCount)
-//        {
-//            return itemsPerPage == -1 ? maxItemCount ?? itemsPerPage : Math.Min(maxItemCount ?? itemsPerPage, itemsPerPage);
-//        }
-//        private static async Task<List<T>> ResultsFromQueryAndOptions<T>(this AzureCosmosFactory azureCosmosFactory, AzureCosmosQuery cosmosDbQuery, QueryRequestOptions queryOptions)
-//        {
-//            if (cosmosDbQuery == null)
-//            {
-//                return null;
-//            }
-//            AzureCosmosModel container = azureCosmosFactory.GetCosmosModel(typeof(T).Name);
-//            AsyncPageable<T> query = container.container.GetItemQueryIterator<T>(
-//                queryDefinition: cosmosDbQuery.CosmosQueryDefinition,
-//                requestOptions: queryOptions);
-
-//            return await ResultsFromFeedIterator(query);
-//        }
-//        private static async Task<List<T>> ResultsFromFeedIterator<T>(AsyncPageable<T> query, int? maxItemCount = null)
-//        {
-//            List<T> results = new List<T>();
-
-//            await foreach (T t in query)
-//            {
-//                results.Add(t);
-//                if (results.Count == maxItemCount)
-//                {
-//                    return results;
-//                }
-//            }
-//            return results;
-//        }
-//        private static QueryRequestOptions GetQueryRequestOptions(int itemsPerPage)
-//        {
-//            QueryRequestOptions queryRequestOptions = new QueryRequestOptions
-//            {
-//                MaxItemCount = itemsPerPage
-//            };
-
-//            return queryRequestOptions;
-//        }
-//    }
-
-//    #endregion
-//}
-//}

+ 0 - 18
TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosModel.cs

@@ -1,18 +0,0 @@
-using Azure.Cosmos;
-using Microsoft.Azure.Cosmos;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
-{
-    public class AzureCosmosModel
-    {
-        public CosmosContainer container { get; set; }
-        public bool cache { get; set; }
-        public bool monitor { get; set; } = false;
-        public Type type { get; set; }
-        public string partitionKey { get; set; }
-        public CosmosDatabase database { get; set; }
-    }
-}

+ 0 - 46
TEAMModelOS.SDK/DI/AzureCosmos/Inner/AzureCosmosUtil.cs

@@ -1,46 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using TEAMModelOS.SDK.Context.Attributes.Azure;
-using TEAMModelOS.SDK.Context.Exception;
-
-namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
-{
-   public static class AzureCosmosUtil
-    {
-        public static string GetPartitionKey(Type type)
-        {
-            PropertyInfo[] properties = type.GetProperties();
-            List<PropertyInfo> attrProperties = new List<PropertyInfo>();
-            foreach (PropertyInfo property in properties)
-            {
-                if (property.Name.Equals("PartitionKey"))
-                {
-                    attrProperties.Add(property);
-                    break;
-                }
-                object[] attributes = property.GetCustomAttributes(true);
-                foreach (object attribute in attributes) //2.通过映射,找到成员属性上关联的特性类实例,
-                {
-                    if (attribute is PartitionKeyAttribute)
-                    {
-                        attrProperties.Add(property);
-                    }
-                }
-            }
-            if (attrProperties.Count <= 0)
-            {
-                throw new BizException(type.Name + " has no PartitionKey !");
-            }
-            else
-            {
-                if (attrProperties.Count == 1)
-                {
-                    return attrProperties[0].Name;
-                }
-                else { throw new BizException(type.Name + " PartitionKey can only be single!"); }
-            }
-        }
-    }
-}

+ 0 - 30
TEAMModelOS.SDK/DI/AzureCosmos/Inner/IdPk.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Net;
-using System.Threading.Tasks;
-
-namespace TEAMModelOS.SDK.DI
-{    
-    public class IdPk
-    {
-        
-        [Required(ErrorMessage = "{0} 必须填写")]
-        public string id { get; set; }
-
-        
-        public string pk { get; set; }
-
-        /// <summary>
-        /// 删除状态 NoContent(删除成功),NotFound(未找到,删除失败)
-        /// </summary>
-       
-        public HttpStatusCode StatusCode { get;set;}
-        /// <summary>
-        /// 删除状态 NoContent(删除成功),NotFound(未找到,删除失败)
-        /// </summary>
-        
-        public int Status { get; set; }
-    }
-}

+ 24 - 18
TEAMModelOS.SDK/DI/AzureCosmos/Inner/SQLHelper.cs

@@ -6,7 +6,6 @@ using System.Linq;
 using System.Text;
 using System.Text.Json;
 using System.Text.RegularExpressions;
-using TEAMModelOS.SDK.Context.Exception;
 using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
 namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
 {
@@ -94,7 +93,7 @@ namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
                 }
                 else if (keyValuePair.Value is null)
                 {
-                    keyValuePairs.Add(keyValuePair.Key, keyValuePair.Value);
+                    //keyValuePairs.Add(keyValuePair.Key, keyValuePair.Value);
                 }
             }
 
@@ -278,7 +277,7 @@ namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
                         }
                         else
                         {
-                            throw new BizException("数组总共深度不能超过5层", ResponseCode.PARAMS_ERROR);
+                          //  throw new BizException("数组总共深度不能超过5层", ResponseCode.PARAMS_ERROR);
                         }
                         heada += 1;
 
@@ -351,12 +350,12 @@ namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
                 limitNum = int.Parse(limit.ToString());
                 if (limitNum < 0)
                 {
-                    throw new BizException("PAGESIZE can't be less than 0 !");
+                    //throw new BizException("PAGESIZE can't be less than 0 !");
                 }
                 offsetNum = (int.Parse(page.ToString()) - 1) * limitNum;
                 if (offsetNum < 0)
                 {
-                    throw new BizException("CURRPAGE can't be less than 1 !");
+                   // throw new BizException("CURRPAGE can't be less than 1 !");
                 }
             }
         }
@@ -728,20 +727,27 @@ namespace TEAMModelOS.SDK.DI.AzureCosmos.Inner
                 }
                 else
                 {
-                    Type s = value.GetType();
-                    TypeCode typeCode = Type.GetTypeCode(s);
+                    if (value != null)
+                    {
+                        Type s = value.GetType();
+                        TypeCode typeCode = Type.GetTypeCode(s);
 
-                    return typeCode switch
-                    {
-                        TypeCode.String => logicOper + " c." + key + CompareOpers[compareOperNum] + " @" + key1,// + "\'" + value.ToString() + "\'",
-                        TypeCode.Char => logicOper + " c." + key + CompareOpers[compareOperNum] + " @" + key1,//  + "\'"  + value.ToString() + "\'",
-                        TypeCode.Int32 => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,// + int.Parse(value.ToString()),
-                        TypeCode.Double => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,// + double.Parse(value.ToString()),
-                        TypeCode.Boolean => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,//  + bool.Parse(value.ToString()),
-                        TypeCode.DateTime => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,//  + (DateTime)value,
-                        TypeCode.Int64 => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,// + long.Parse(value.ToString()),
-                        _ => null,
-                    };
+                        return typeCode switch
+                        {
+                            TypeCode.String => logicOper + " c." + key + CompareOpers[compareOperNum] + " @" + key1,// + "\'" + value.ToString() + "\'",
+                            TypeCode.Char => logicOper + " c." + key + CompareOpers[compareOperNum] + " @" + key1,//  + "\'"  + value.ToString() + "\'",
+                            TypeCode.Int32 => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,// + int.Parse(value.ToString()),
+                            TypeCode.Double => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,// + double.Parse(value.ToString()),
+                            TypeCode.Boolean => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,//  + bool.Parse(value.ToString()),
+                            TypeCode.DateTime => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,//  + (DateTime)value,
+                            TypeCode.Int64 => logicOper + "  c." + key + CompareOpers[compareOperNum] + " @" + key1,// + long.Parse(value.ToString()),
+                            _ => null,
+                        };
+                    }
+                    else {
+                        return logicOper + " c." + key + CompareOpers[compareOperNum] + " @" + key1;
+                    }
+                    
                 }
             }
         }

+ 32 - 1
TEAMModelOS.SDK/DI/AzureStorage/AzureStorageBlobExtensions.cs

@@ -37,7 +37,38 @@ namespace TEAMModelOS.SDK.DI
                 return size;
             }
         }
-
+        /// <summary>        
+        /// 批量刪除Blobs
+        /// </summary>      
+        /// <param name="prefix">篩選開頭名稱,Null代表容器</param>        
+        public static async Task<bool> DelectBlobs(this BlobServiceClient client, string blobContainerName, List<Uri> blobs = null)
+        {
+            
+            try
+            {
+                BlobContainerClient bcc = client.GetBlobContainerClient(blobContainerName);
+                BlobBatchClient bbc = client.GetBlobBatchClient();
+                if (blobs.Count <= 256)
+                {
+                    await bbc.DeleteBlobsAsync(blobs);
+                    return true;
+                }
+                else
+                {
+                    int pages = (blobs.Count + 255) / 256; //256是批量操作最大值,pages = (total + max -1) / max;
+                    for (int i = 0; i < pages; i++)
+                    {
+                        List<Uri> lists = blobs.Skip((i) * 256).Take(256).ToList();
+                        await bbc.DeleteBlobsAsync(lists);
+                    }
+                    return true;
+                }
+            }
+            catch
+            {
+                return false;
+            }
+        }
         /// <summary>        
         /// 批量刪除Blobs
         /// </summary>      

+ 0 - 457
TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorConverter.cs

@@ -1,457 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-
-namespace TEAMModelOS.SDK.Helper.Common.ColorHelper
-{
-    public class ColorConverter
-    {
-        public string SetLuminanceMod(string s, double luminance)
-        {
-
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetLuminanceMod(c, luminance);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetLuminanceOff(string s, double luminance)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetLuminanceOff(c, luminance);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetTint(string s, double tint)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetTint(c, tint);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetShade(string s, double shade)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetShade(c, shade);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetSaturationMod(string s, double saturation)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetSaturationMod(c, saturation);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetSaturationOff(string s, double saturation)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetSaturationOff(c, saturation);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetBrightness(string s, double luminance)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetBrightness(c, luminance);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetHueMod(string s, double hueMod)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetHueMod(c, hueMod);
-            }
-            catch (Exception)
-            {
-                return s;
-            }
-
-        }
-        public string SetHueOff(string s, double hueOff)
-        {
-            Color c = ColorTranslator.FromHtml("#" + s);
-            try
-            {
-                return SetHueOff(c, hueOff);
-            }
-            catch
-            {
-                return s;
-            }
-
-        }
-        private double RGB_to_linearRGB(double val)
-        {
-
-            if (val < 0.0)
-                return 0.0;
-            if (val <= 0.04045)
-                return val / 12.92;
-            if (val <= 1.0)
-                return (double)Math.Pow(((val + 0.055) / 1.055), 2.4);
-
-            return 1.0;
-        }
-        private double linearRGB_to_RGB(double val)
-        {
-
-            if (val < 0.0)
-                return 0.0;
-            if (val <= 0.0031308)
-                return val * 12.92;
-            if (val < 1.0)
-                return (1.055 * Math.Pow(val, (1.0 / 2.4))) - 0.055;
-
-            return 1.0;
-            /*
-            Public Function linearRGB_to_sRGB(ByVal value As Double) As Double
-                If value < 0.0# Then Return 0.0#
-                If value <= 0.0031308# Then Return value * 12.92
-                If value < 1.0# Then Return 1.055 * (value ^ (1.0# / 2.4)) - 0.055
-                Return 1.0#
-            End Function
-            */
-
-        }
-        public string SetShade(Color c, double shade)
-        {
-            //Console.WriteLine("Shade: " + shade);
-
-            double convShade = (shade / 1000) * 0.01;
-
-            double r = (double)c.R / 255;
-            double g = (double)c.G / 255;
-            double b = (double)c.B / 255;
-
-            double rLin = RGB_to_linearRGB(r);
-            double gLin = RGB_to_linearRGB(g);
-            double bLin = RGB_to_linearRGB(b);
-
-            //Console.WriteLine("Linear R: " + rLin + "\nLinear G: " + gLin + "\nLinear B: " + bLin);
-
-            //SHADE 
-            if ((rLin * convShade) < 0)
-                rLin = 0;
-            if ((rLin * convShade) > 1)
-                rLin = 0;
-            else
-                rLin *= convShade;
-
-            if ((gLin * convShade) < 0)
-                gLin = 0;
-            if ((gLin * convShade) > 1)
-                gLin = 0;
-            else
-                gLin *= convShade;
-
-            if ((bLin * convShade) < 0)
-                bLin = 0;
-            if ((bLin * convShade) > 1)
-                bLin = 0;
-            else
-                bLin *= convShade;
-
-            //SHADEEND
-
-            r = linearRGB_to_RGB(rLin);
-            g = linearRGB_to_RGB(gLin);
-            b = linearRGB_to_RGB(bLin);
-
-            Color outColor = Color.FromArgb((int)Math.Round(r * 255), (int)Math.Round(g * 255), (int)Math.Round(b * 255));
-
-            return outColor.R.ToString("X2") + outColor.G.ToString("X2") + outColor.B.ToString("X2");
-
-        }
-        public string SetTint(Color c, double tint)
-        {
-
-            double tintConv = (tint / 1000) * 0.01;
-
-            double r = (double)c.R / 255;
-            double g = (double)c.G / 255;
-            double b = (double)c.B / 255;
-
-            double rLin = RGB_to_linearRGB(r);
-            double gLin = RGB_to_linearRGB(g);
-            double bLin = RGB_to_linearRGB(b);
-
-            /**TINT**/
-
-            if (tintConv > 0)
-                rLin = (rLin * tintConv) + (1 - tintConv);
-            else
-                rLin = rLin * (1 + tintConv);
-
-            if (tintConv > 0)
-                gLin = (gLin * tintConv) + (1 - tintConv);
-            else
-                gLin = gLin * (1 + tintConv);
-
-            if (tintConv > 0)
-                bLin = (bLin * tintConv) + (1 - tintConv);
-            else
-                bLin = bLin * (1 + tintConv);
-
-            r = linearRGB_to_RGB(rLin);
-            g = linearRGB_to_RGB(gLin);
-            b = linearRGB_to_RGB(bLin);
-
-            Color outColor = Color.FromArgb((int)Math.Round(r * 255), (int)Math.Round(g * 255), (int)Math.Round(b * 255));
-
-            return outColor.R.ToString("X2") + outColor.G.ToString("X2") + outColor.B.ToString("X2");
-        }
-        public string SetSaturationMod(Color c, double saturation)
-        {
-            double satMod = (saturation / 1000) * 0.01;
-
-            ColorHSL hsl = RGB_to_HSL(c);
-            hsl.S *= satMod;
-            c = HSL_to_RGB(hsl);
-
-            return c.R.ToString("X2") + c.G.ToString("X2") + c.B.ToString("X2");
-        }
-        public string SetSaturationOff(Color c, double saturation)
-        {
-            double satOff = (saturation / 1000) * 0.01;
-
-            ColorHSL hsl = RGB_to_HSL(c);
-            hsl.S += satOff;
-            c = HSL_to_RGB(hsl);
-
-            return c.R.ToString("X2") + c.G.ToString("X2") + c.B.ToString("X2");
-        }
-        public string SetBrightness(Color c, double brightness)
-        {
-
-            double convBrightness = brightness / 100000;
-
-            ColorHSL hsl = RGB_to_HSL(c);
-
-            hsl.L *= convBrightness;
-            c = HSL_to_RGB(hsl);
-
-            return c.R.ToString("X2") + c.G.ToString("X2") + c.B.ToString("X2");
-        }
-        public string SetLuminanceMod(Color c, double luminance)
-        {
-            double lumMod = (luminance / 1000) * 0.01;
-
-            ColorHSL hsl = RGB_to_HSL(c);
-            hsl.L *= lumMod;
-            Color outColor = HSL_to_RGB(hsl);
-
-            return outColor.R.ToString("X2") + outColor.G.ToString("X2") + outColor.B.ToString("X2");
-        }
-        public string SetLuminanceOff(Color c, double luminance)
-        {
-            double lumModOff = (luminance / 1000) * 0.01;
-
-            ColorHSL hsl = RGB_to_HSL(c);
-            hsl.L += lumModOff;
-            Color outColor = HSL_to_RGB(hsl);
-
-            return outColor.R.ToString("X2") + outColor.G.ToString("X2") + outColor.B.ToString("X2");
-        }
-        public string SetHueMod(Color c, double hue)
-        {
-
-            double hueMod = (hue / 1000) * 0.01;
-
-            ColorHSL hsl = RGB_to_HSL(c);
-            hsl.H *= hueMod;
-            Color outColor = HSL_to_RGB(hsl);
-
-            return outColor.R.ToString("X2") + outColor.G.ToString("X2") + outColor.B.ToString("X2");
-
-        }
-        public string SetHueOff(Color c, double hue)
-        {
-
-            double hueMod = (hue / 1000) * 0.01;
-
-            ColorHSL hsl = RGB_to_HSL(c);
-            hsl.H += hueMod;
-            Color outColor = HSL_to_RGB(hsl);
-            return outColor.R.ToString("X2") + outColor.G.ToString("X2") + outColor.B.ToString("X2");
-
-        }
-
-        private ColorHSL RGB_to_HSL(Color c)
-        {
-            ColorHSL hsl = new ColorHSL();
-
-            hsl.H = c.GetHue() / 360.0;
-            hsl.L = c.GetBrightness();
-            hsl.S = c.GetSaturation();
-
-            return hsl;
-        }
-        private ColorHSL CreateHSL(int r, int g, int b)
-        {
-            ColorHSL hsl = new ColorHSL();
-
-            double R = (double)r / 255;
-            double G = (double)g / 255;
-            double B = (double)b / 255;
-            double max = 0, min = 0;
-            double H = 0, S = 0, L = 0;
-            bool rBool = false, gBool = false, bBool = false;
-
-            //find max
-            if ((R > G) && (R > B))
-            {
-                max = R;
-                rBool = true;
-            }
-            else if ((G > R) && (G > B))
-            {
-                max = G;
-                gBool = true;
-            }
-            else if ((B > G) && (B > R))
-            {
-                max = B;
-                bBool = true;
-            }
-
-            if ((R < G) && (R < B))
-                min = R;
-            else if ((G < R) && (G < B))
-                min = G;
-            else if ((B < G) && (B < R))
-                min = B;
-
-            //set Luminance
-            hsl.L = (min + max) / 2;
-
-            if (min == max)
-            {
-                hsl.S = 0;
-                hsl.H = 0;
-            }
-
-            //set saturation
-            if (hsl.L < 0.5)
-                hsl.S = (max - min) / (max + min);
-            else if (hsl.L > 0.5)
-                hsl.S = (max - min) / (2.0 - max - min);
-
-            if (rBool)
-            {
-                H = ((G - B) / (max - min)) * 60.0;
-                Console.WriteLine("red");
-            }
-            if (gBool)
-            {
-                H = ((2.0 + ((B - R) / (max - min))) * 60.0);
-                Console.WriteLine("green");
-            }
-            if (bBool)
-            {
-                H = (4.0 + (R - G) / (max - min)) * 60.0;
-                Console.WriteLine("blue");
-            }
-
-            if (H < 0)
-                H += 360;
-
-            H = Math.Round(H);
-            H = H / 360;
-
-            hsl.H = H;
-
-            return hsl;
-        }
-        private Color HSL_to_RGB(ColorHSL hslColor)
-        {
-
-            double r = 0, g = 0, b = 0;
-            double temp1, temp2;
-
-
-            if (hslColor.L == 0)
-                r = g = b = 0;
-            else
-            {
-                if (hslColor.S == 0)
-                {
-                    r = g = b = hslColor.L;
-                }
-                else
-                {
-                    temp2 = ((hslColor.L <= 0.5) ? hslColor.L * (1.0 + hslColor.S) : hslColor.L + hslColor.S - (hslColor.L * hslColor.S));
-                    temp1 = 2.0 * hslColor.L - temp2;
-
-                    double[] t3 = new double[] { hslColor.H + 1.0 / 3.0, hslColor.H, hslColor.H - 1.0 / 3.0 };
-                    double[] clr = new double[] { 0, 0, 0 };
-                    for (int i = 0; i < 3; i++)
-                    {
-                        if (t3[i] < 0)
-                            t3[i] += 1.0;
-                        if (t3[i] > 1)
-                            t3[i] -= 1.0;
-
-                        if (6.0 * t3[i] < 1.0)
-                            clr[i] = temp1 + (temp2 - temp1) * t3[i] * 6.0;
-                        else if (2.0 * t3[i] < 1.0)
-                            clr[i] = temp2;
-                        else if (3.0 * t3[i] < 2.0)
-                            clr[i] = (temp1 + (temp2 - temp1) * ((2.0 / 3.0) - t3[i]) * 6.0);
-                        else
-                            clr[i] = temp1;
-                    }
-                    r = clr[0];
-                    g = clr[1];
-                    b = clr[2];
-                }
-            }
-            return Color.FromArgb((int)(255 * r), (int)(255 * g), (int)(255 * b));
-        }
-
-    }
-}

+ 0 - 27
TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorHSL.cs

@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace TEAMModelOS.SDK.Helper.Common.ColorHelper
-{
-    /// <summary>
-    /// 类      名:ColorHSL
-    /// 功      能:H 色相 \ S 饱和度(纯度) \ L 亮度 颜色模型 
-    /// </summary>
-    public class ColorHSL
-    {
-        /// <summary>
-        /// 色相
-        /// </summary>
-        public double H { get; set; }
-        /// <summary>
-        /// 饱和度(纯度)
-        /// </summary>
-        public double S { get; set; }
-
-        /// <summary>
-        /// 饱和度
-        /// </summary>
-        public double L { get; set; }
-    }
-}

+ 0 - 72
TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorHSV.cs

@@ -1,72 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace TEAMModelOS.SDK.Helper.Common.ColorHelper
-{
-    /// <summary>
-    /// 类      名:ColorHSV
-    /// 功      能:H 色相 \ S 饱和度(纯度) \ V 明度 颜色模型 
-    /// </summary>
-    public class ColorHSV
-    {
-        /// <summary>
-        /// 构造方法
-        /// </summary>
-        /// <param name="h"></param>
-        /// <param name="s"></param>
-        /// <param name="v"></param>
-        public ColorHSV(int h, int s, int v)
-        {
-            this._h = h;
-            this._s = s;
-            this._v = v;
-        }
-
-        private int _h;
-        private int _s;
-        private int _v;
-
-        /// <summary>
-        /// 色相
-        /// </summary>
-        public int H
-        {
-            get { return this._h; }
-            set
-            {
-                this._h = value;
-                this._h = this._h > 360 ? 360 : this._h;
-                this._h = this._h < 0 ? 0 : this._h;
-            }
-        }
-
-        /// <summary>
-        /// 饱和度(纯度)
-        /// </summary>
-        public int S
-        {
-            get { return this._s; }
-            set
-            {
-                this._s = value;
-                this._s = this._s > 255 ? 255 : this._s;
-                this._s = this._s < 0 ? 0 : this._s;
-            }
-        }
-
-        /// <summary>
-        /// 明度
-        /// </summary>
-        public int V
-        {
-            get { return this._v; }
-            set
-            {
-                this._v = value;
-                this._v = this._v > 255 ? 255 : this._v;
-                this._v = this._v < 0 ? 0 : this._v;
-            }
-        }
-    }
-}

+ 0 - 238
TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorHelper.cs

@@ -1,238 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Text;
-
-namespace TEAMModelOS.SDK.Helper.Common.ColorHelper
-{
-    /// <summary>
-    /// 类      名:ColorHelper
-    /// 功      能:提供从RGB到HSV/HSL色彩空间的相互转换
-    /// </summary>
-    public static class ColorHelper
-    {
-        /// <summary>
-        /// RGB转换HSV
-        /// </summary>
-        /// <param name="rgb"></param>
-        /// <returns></returns>
-        public static ColorHSV RgbToHsv(this ColorRGB rgb)
-        {
-            double min, max, tmp, H, S, V;
-            double R = rgb.R * 1.0f / 255, G = rgb.G * 1.0f / 255, B = rgb.B * 1.0f / 255;
-            tmp = Math.Min(R, G);
-            min = Math.Min(tmp, B);
-            tmp = Math.Max(R, G);
-            max = Math.Max(tmp, B);
-            // H
-            H = 0;
-            if (max == min)
-            {
-                H = 0;
-            }
-            else if (max == R && G > B)
-            {
-                H = 60 * (G - B) * 1.0f / (max - min) + 0;
-            }
-            else if (max == R && G < B)
-            {
-                H = 60 * (G - B) * 1.0f / (max - min) + 360;
-            }
-            else if (max == G)
-            {
-                H = H = 60 * (B - R) * 1.0f / (max - min) + 120;
-            }
-            else if (max == B)
-            {
-                H = H = 60 * (R - G) * 1.0f / (max - min) + 240;
-            }
-            // S
-            if (max == 0)
-            {
-                S = 0;
-            }
-            else
-            {
-                S = (max - min) * 1.0f / max;
-            }
-            // V
-            V = max;
-            return new ColorHSV((int)H, (int)(S * 255), (int)(V * 255));
-        }
-
-        /// <summary>
-        /// HSV转换RGB
-        /// </summary>
-        /// <param name="hsv"></param>
-        /// <returns></returns>
-        public static ColorRGB HsvToRgb( this ColorHSV hsv)
-        {
-            if (hsv.H == 360) hsv.H = 359; // 360为全黑,原因不明
-            double R = 0f, G = 0f, B = 0f;
-            if (hsv.S == 0)
-            {
-                return new ColorRGB(hsv.V, hsv.V, hsv.V);
-            }
-            double S = hsv.S * 1.0f / 255, V = hsv.V * 1.0f / 255;
-            int H1 = (int)(hsv.H * 1.0f / 60), H = hsv.H;
-            double F = H * 1.0f / 60 - H1;
-            double P = V * (1.0f - S);
-            double Q = V * (1.0f - F * S);
-            double T = V * (1.0f - (1.0f - F) * S);
-            switch (H1)
-            {
-                case 0: R = V; G = T; B = P; break;
-                case 1: R = Q; G = V; B = P; break;
-                case 2: R = P; G = V; B = T; break;
-                case 3: R = P; G = Q; B = V; break;
-                case 4: R = T; G = P; B = V; break;
-                case 5: R = V; G = P; B = Q; break;
-            }
-            R = R * 255;
-            G = G * 255;
-            B = B * 255;
-            while (R > 255) R -= 255;
-            while (R < 0) R += 255;
-            while (G > 255) G -= 255;
-            while (G < 0) G += 255;
-            while (B > 255) B -= 255;
-            while (B < 0) B += 255;
-            return new ColorRGB((int)R, (int)G, (int)B);
-        }
-
-        /// <summary>
-        /// RGB转换HSL
-        /// </summary>
-        /// <param name="rgb"></param>
-        /// <returns></returns>
-        public static ColorHSL RgbToHsl( this ColorRGB rgb)
-        {
-            double min, max, tmp, H = 0, S = 0, L = 0;
-            double R = rgb.R * 1.0f / 255, G = rgb.G * 1.0f / 255, B = rgb.B * 1.0f / 255;
-            tmp = Math.Min(R, G);
-            min = Math.Min(tmp, B);
-            tmp = Math.Max(R, G);
-            max = Math.Max(tmp, B);
-            L = (max + min) / 2.0d;
-            if (min == max)
-            {
-                H = S = 0;
-            }
-            else
-            {
-                double d = max - min;
-                S = L > 0.5 ? d / (2 - max - min) : d / (max + min);
-                if (max == R)
-                {
-                    H = (G - B) / d + (G < B ? 6 : 0);
-                }
-                else if (max == G)
-                {
-                    H = (G - R) / d + 2;
-                }
-                else if (max == B)
-                {
-                    H = (R - G) / d + 4;
-                }
-            }
-            H = H / 6.0F;
-            return new ColorHSL() { H = H, S = S, L = L };
-        }
-
-        public static double hue2rgb(double p, double q, double t)
-        {
-            if (t < 0) t += 1;
-
-            if (t > 1) t -= 1;
-
-            if (t < 1.0 / 6.0d) return p + (q - p) * 6 * t;
-
-            if (t < 1.0 / 2.0d) return q;
-
-            if (t < 2.0 / 3.0d) return p + (q - p) * (2.0d / 3.0d - t) * 6.0d;
-
-            return p;
-        }
-
-        /// <summary>
-        /// HSL转换RGB
-        /// </summary>
-        /// <param name="hsl"></param>
-        /// <returns></returns>
-        public static ColorRGB HslToRgb( this ColorHSL hsl)
-        {
-            var l = hsl.L;
-            var s = hsl.S;
-            var h = hsl.H;
-            double R = 0, G = 0, B = 0;
-            if (hsl.S == 0)
-            {
-                R = G = B = hsl.L;
-            }
-            else
-            {
-                var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-                var p = 2 * l - q;
-                R = hue2rgb(p, q, h + 1.0d / 3.0d);
-                G = hue2rgb(p, q, h);
-                B = hue2rgb(p, q, h - 1.0d / 3.0d);
-            }
-            R = R * 255; G = G * 255; B = B * 255;
-            return new ColorRGB(int.Parse(Math.Round(R, 0) + ""), int.Parse(Math.Round(G, 0) + ""), int.Parse(Math.Round(B, 0) + ""));
-        }
-        private static double HueToRGB(double p, double q, double h)
-        {
-            if (h < 0) h += 1;
-            if (h > 1) h -= 1;
-            if (6 * h < 1)
-            {
-                return p + ((q - p) * 6 * h);
-            }
-            if (2 * h < 1)
-            {
-                return q;
-            }
-            if (3 * h < 2)
-            {
-                return p + ((q - p) * 6 * ((2.0f / 3.0f) - h));
-            }
-            return p;
-        }
-        /// <summary>
-        /// 处理图像饱和度
-        /// </summary>
-        /// <param name="color"></param>
-        /// <param name="lumMod"></param>
-        /// <param name="lumOff"></param>
-        /// <returns></returns>
-        public static string GetColorLumModAndLumOff(Color color, int lumMod = 0, int lumOff = 0)
-        {
-            ColorHSL colorHSL = RgbToHsl(new ColorRGB(color.R, color.G, color.B));
-            colorHSL.L = colorHSL.L * lumMod / 100_000.0 + lumOff / 100_000.0;
-            ColorRGB colorRGB = HslToRgb(colorHSL);
-            return ColorTranslator.ToHtml(Color.FromArgb(colorRGB.R, colorRGB.G, colorRGB.B)).Replace("#","");
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="color">原色RGB</param>
-        /// <param name="pa">混合原色占百分比/100% </param>
-        /// <param name="Type">Shade 与黑色混合  Tint与白色混合</param>
-        /// <returns></returns>
-        public static string  GetShadeOrTintColor(Color color, double val, string Type)
-        {
-            ColorConverter converter = new ColorConverter();
-            if (Type.Equals("Shade"))
-            {
-                return converter.SetShade(color, val);
-            }
-            else if (Type.Equals("Tint"))
-            {
-                return converter.SetTint(color, val);
-            }
-            else { return ColorTranslator.ToHtml(color).Replace("#",""); }
-        }
-
-    }
-}

+ 0 - 83
TEAMModelOS.SDK/Helper/Common/ColorHelper/ColorRGB.cs

@@ -1,83 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Text;
-
-namespace TEAMModelOS.SDK.Helper.Common.ColorHelper
-{
-    /// <summary>
-    /// 类      名:ColorRGB
-    /// 功      能:R 红色 \ G 绿色 \ B 蓝色 颜色模型
-    ///                 所有颜色模型的基类,RGB是用于输出到屏幕的颜色模式,所以所有模型都将转换成RGB输出
-    /// </summary>
-    public class ColorRGB
-    {
-        /// <summary>
-        /// 构造方法
-        /// </summary>
-        /// <param name="r"></param>
-        /// <param name="g"></param>
-        /// <param name="b"></param>
-        public ColorRGB(int r, int g, int b)
-        {
-            this._r = r;
-            this._g = g;
-            this._b = b;
-        }
-
-        private int _r;
-        private int _g;
-        private int _b;
-
-        /// <summary>
-        /// 红色
-        /// </summary>
-        public int R
-        {
-            get { return this._r; }
-            set
-            {
-                this._r = value;
-                this._r = this._r > 255 ? 255 : this._r;
-                this._r = this._r < 0 ? 0 : this._r;
-            }
-        }
-
-        /// <summary>
-        /// 绿色
-        /// </summary>
-        public int G
-        {
-            get { return this._g; }
-            set
-            {
-                this._g = value;
-                this._g = this._g > 255 ? 255 : this._g;
-                this._g = this._g < 0 ? 0 : this._g;
-            }
-        }
-
-        /// <summary>
-        /// 蓝色
-        /// </summary>
-        public int B
-        {
-            get { return this._b; }
-            set
-            {
-                this._b = value;
-                this._b = this._b > 255 ? 255 : this._b;
-                this._b = this._b < 0 ? 0 : this._b;
-            }
-        }
-
-        /// <summary>
-        /// 获取实际颜色
-        /// </summary>
-        /// <returns></returns>
-        public Color GetColor()
-        {
-            return Color.FromArgb(this._r, this._g, this._b);
-        }
-    } 
-}

+ 0 - 85
TEAMModelOS.SDK/Helper/Common/StringHelper/HtmlHelper.cs

@@ -1,85 +0,0 @@
-using HtmlAgilityPack;
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Text.RegularExpressions;
-using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
-
-namespace TEAMModelOS.SDK.Helper.Common.StringHelper
-{
-    public class HtmlHelper
-    {
-        public static string DoUselessTag(string str)
-        {
-            if (str.StartsWith("</p>"))
-            {
-                str = str.Substring(4);
-            }
-            if (str.EndsWith("<p>"))
-            {
-                str = str.Substring(0, str.Length - 1 - 2);
-            }
-            if (str.EndsWith("<p >"))
-            {
-                str = str.Substring(0, str.Length - 1 - 3);
-            }
-            if (str.EndsWith("<p  >"))
-            {
-                str = str.Substring(0, str.Length - 1 - 4);
-            }
-            if (str.StartsWith("<p >") && !str.Contains("</p>"))
-            {
-                str = str.Replace("<p >", "");
-            }
-            if (str.StartsWith("<p  >") && !str.Contains("</p>"))
-            {
-                str = str.Replace("<p  >", "");
-            }
-            if (str.StartsWith("<p>") && !str.Contains("</p>"))
-            {
-                str = str.Replace("<p>", "");
-            }
-            if (str.EndsWith("</p>") && !str.Contains("<p>")&& !str.Contains("<p >") && !str.Contains("<p  >")){
-                str = str.Replace("</p>", "");
-            }
-            str= Regex.Replace(str, "<p([^>]{0,})>\\s*</p>", "");
-            return str;
-        }
-
-        /// <summary>
-        /// 从html获取文本及img的url  去掉其他标签的干扰,空格。以获取更准确的sha1校验值
-        /// </summary>
-        /// <param name="html"></param>
-        /// <returns></returns>
-        public static string DoTextImg(string html)
-        {
-            HtmlDocument doc = new HtmlDocument();
-            doc.LoadHtml(html);
-            List<string> urls = GetHtmlImageUrlList(html);
-            StringBuilder builder = new StringBuilder(doc.DocumentNode.InnerText.Replace("&nbsp;", ""));
-            if (urls.IsNotEmpty())
-            {
-                foreach (string url in urls)
-                {
-                    builder.Append(url);
-                }
-            }
-            return builder.ToString();
-        }
-
-        public static List<string> GetHtmlImageUrlList(string sHtmlText)
-        {
-            // 定义正则表达式用来匹配 img 标签   
-            Regex regImg = new Regex(@"<img\b[^<>]*?\bsrc[\s\t\r\n]*=[\s\t\r\n]*[""']?[\s\t\r\n]*(?<imgUrl>[^\s\t\r\n""'<>]*)[^<>]*?/?[\s\t\r\n]*>", RegexOptions.IgnoreCase);
-
-            // 搜索匹配的字符串   
-            MatchCollection matches = regImg.Matches(sHtmlText);
-            //string[] sUrlList = new string[matches.Count];
-            List<string> urls = new List<string>();
-            // 取得匹配项列表   
-            foreach (Match match in matches)
-                urls.Add(match.Groups["imgUrl"].Value);
-            return urls;
-        }
-    }
-}

+ 0 - 65
TEAMModelOS.SDK/Helper/Common/ValidateHelper/ValidateHelper.cs

@@ -1,65 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace TEAMModelOS.SDK.Helper.Common.ValidateHelper
-{
-    public static class ValidateHelper
-    {
-        public static string AllowCountry { get; set; }
-        /// <summary>
-        /// 验证对象是否有效
-        /// </summary>
-        /// <param name="obj">要验证的对象</param>
-        /// <param name="validationResults"></param>
-        /// <returns></returns>
-        public static bool IsValid(this object obj, Collection<ValidationResult> validationResults)
-        {
-            return Validator.TryValidateObject(obj, new ValidationContext(obj, null, null), validationResults, true);
-        }
-
-        /// <summary>
-        /// 验证对象是否有效
-        /// </summary>
-        /// <param name="obj">要验证的对象</param>
-        /// <returns></returns>
-        public static T ValidObj<T>(T value)
-        {
-            var results = new Collection<ValidationResult>();
-            var validationContext = new ValidationContext(value, null, null);
-            bool f = Validator.TryValidateObject(value, validationContext, results, true);
-            if (f)
-            {
-                return value;
-            }
-            else
-            {
-                return default(T);
-            }
-        }
-        /// <summary>
-        /// 验证对象是否有效
-        /// </summary>
-        /// <param name="obj">要验证的对象</param>
-        /// <returns></returns>
-        public static bool IsValid(object value)
-        {
-            var results = new Collection<ValidationResult>();
-            var validationContext = new ValidationContext(value, null, null);
-            bool f = Validator.TryValidateObject(value, validationContext, results, true);
-            if (!f)
-            {
-                string s = "";
-                foreach (ValidationResult result in results)
-                {
-                    IEnumerator<string> enumerator = result.MemberNames.GetEnumerator();
-                    enumerator.MoveNext();
-                    s = s + enumerator.Current + ",";
-                }
-                throw new Exception(s + "字段不正确");
-            }
-            return f;
-        }
-    }
-}

+ 0 - 17
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/BrushDIBColorsEnum.cs

@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// DIB-Colors enum.
-    /// </summary>
-    public enum BrushDIBColorsEnum
-    {
-        DIB_PAL_COLORS = 1,
-        DIB_RGB_COLORS = 0,
-    }
-}

+ 0 - 24
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/BrushEnum.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Brush enum.
-    /// </summary>
-    public enum BrushBSEnum
-    {
-        BS_DIBPATTERN = 5,
-        BS_DIBPATTERN8X8 = 8,
-        BS_DIBPATTERNPT = 6,
-        BS_HATCHED = 2,
-        BS_HOLLOW = 1,
-        BS_NULL = 1,
-        BS_PATTERN = 3,
-        BS_PATTERN8X8 = 7,
-        BS_SOLID = 0,
-    }
-}

+ 0 - 21
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/BrushHSEnum.cs

@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// HS Brush enum
-    /// </summary>
-    public enum BrushHSEnum
-    {
-        HS_HORIZONTAL = 0,
-        HS_VERTICAL = 1,
-        HS_FDIAGONAL = 2,
-        HS_BDIAGONAL = 3,
-        HS_CROSS = 4,
-        HS_DIAGCROSS = 5,
-    }
-}

+ 0 - 34
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontCharsetEnum.cs

@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Charset Enum
-    /// </summary>
-    public enum FontCharsetEnum
-    {
-        ANSI_CHARSET = 0,
-        DEFAULT_CHARSET = 1,
-        SYMBOL_CHARSET = 2,
-        MAC_CHARSET = 77,
-        SHIFTJIS_CHARSET = 128,
-        HANGUL_CHARSET = 129,
-        JOHAB_CHARSET = 130,
-        GB2312_CHARSET = 134,
-        CHINESEBIG5_CHARSET = 136,
-        GREEK_CHARSET = 161,
-        TURKISH_CHARSET = 162,
-        VIETNAMESE_CHARSET = 163,
-        ARABIC_CHARSET = 178,
-        HEBREW_CHARSET = 177,
-        BALTIC_CHARSET = 186,
-        RUSSIAN_CHARSET = 204,
-        THAI_CHARSET = 222,
-        EASTEUROPE_CHARSET = 238,
-        OEM_CHARSET = 255,
-    }
-}

+ 0 - 22
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontClipPrecisEnum.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Clip Precis Enum
-    /// </summary>
-    public enum FontClipPrecisEnum
-    {
-        CLIP_DEFAULT_PRECIS = 0,
-        CLIP_CHARACTER_PRECIS = 1,
-        CLIP_STROKE_PRECIS = 2,
-        CLIP_MASK = 15,
-        CLIP_LH_ANGLES = 16,
-        CLIP_TT_ALWAYS = 32,
-        CLIP_EMBEDDED = 128,
-    }
-}

+ 0 - 21
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontFFEnum.cs

@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Font Family Enum.
-    /// </summary>
-    public enum FontFFEnum
-    {
-        FF_DONTCARE = 0,
-        FF_ROMAN = 16,
-        FF_SWISS = 32,
-        FF_MODERN = 48,
-        FF_SCRIPT = 64,
-        FF_DECORATIVE = 80,
-    }
-}

+ 0 - 30
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontFWEnum.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Font Weight Enum.
-    /// </summary>
-    public enum FontFWEnum
-    {
-        FW_DONTCARE = 0,
-        FW_THIN = 100,
-        FW_EXTRALIGHT = 200,
-        FW_ULTRALIGHT = 200,
-        FW_LIGHT = 300,
-        FW_NORMAL = 400,
-        FW_REGULAR = 400,
-        FW_MEDIUM = 500,
-        FW_SEMIBOLD = 600,
-        FW_DEMIBOLD = 600,
-        FW_BOLD = 700,
-        FW_EXTRABOLD = 800,
-        FW_ULTRABOLD = 800,
-        FW_HEAVY = 900,
-        FW_BLACK = 900,
-    }
-}

+ 0 - 25
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontOutPrecisEnum.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Out Preciss Enum
-    /// </summary>
-    public enum FontOutPrecisEnum
-    {
-        OUT_DEFAULT_PRECIS = 0,
-        OUT_STRING_PRECIS = 1,
-        OUT_CHARACTER_PRECIS = 2,
-        OUT_STROKE_PRECIS = 3,
-        OUT_TT_PRECIS = 4,
-        OUT_DEVICE_PRECIS = 5,
-        OUT_RASTER_PRECIS = 6,
-        OUT_TT_ONLY_PRECIS = 7,
-        OUT_OUTLINE_PRECIS = 8,
-        OUT_SCREEN_OUTLINE_PRECIS = 9,
-    }
-}

+ 0 - 18
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontPitchEnum.cs

@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Pitch Enum.
-    /// </summary>
-    public enum FontPitchEnum
-    {
-        DEFAULT_PITCH = 0,
-        FIXED_PITCH = 1,
-        VARIABLE_PITCH = 2,
-    }
-}

+ 0 - 22
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/FontQualityEnum.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Quality Enum.
-    /// </summary>
-    public enum FontQualityEnum
-    {
-        DEFAULT_QUALITY = 0,
-        DRAFT_QUALITY = 1,
-        PROOF_QUALITY = 2,
-        NONANTIALIASED_QUALITY = 3,
-        ANTIALIASED_QUALITY = 4,
-        CLEARTYPE_QUALITY = 5, // Windows XP only
-    }
-
-}

+ 0 - 103
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/GdiEnum.cs

@@ -1,103 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface Enum
-    /// </summary>
-    public enum GdiEnum
-    {
-        OPAQUE = 2,
-        TRANSPARENT = 1,
-
-        TA_BASELINE = 24,
-        TA_BOTTOM = 8,
-        TA_TOP = 0,
-        TA_CENTER = 6,
-        TA_LEFT = 0,
-        TA_RIGHT = 2,
-        TA_NOUPDATECP = 0,
-        TA_RTLREADING = 256,
-        TA_UPDATECP = 1,
-        VTA_BASELINE = 24,
-        VTA_CENTER = 6,
-
-        ETO_CLIPPED = 4,
-        ETO_NUMERICSLOCAL = 1024,
-        ETO_NUMERICSLATIN = 2048,
-        ETO_GLYPH_INDEX = 16,
-        ETO_OPAQUE = 2,
-        ETO_PDY = 8192,
-        ETO_RTLREADING = 128,
-        ETO_IGNORELANGUAGE = 4096,
-
-        MM_ANISOTROPIC = 8,
-        MM_HIENGLISH = 5,
-        MM_HIMETRIC = 3,
-        MM_ISOTROPIC = 7,
-        MM_LOENGLISH = 4,
-        MM_LOMETRIC = 2,
-        MM_TEXT = 1,
-        MM_TWIPS = 6,
-
-        STRETCH_ANDSCANS = 2,
-        STRETCH_DELETESCANS = 3,
-        STRETCH_HALFTONE = 4,
-        STRETCH_ORSCANS = 2,
-        BLACKONWHITE = 2,
-        COLORONCOLOR = 3,
-        HALFTONE = 4,
-        WHITEONBLACK = 2,
-
-        ALTERNATE = 1,
-        WINDING = 2,
-
-        R2_BLACK = 1,
-        R2_COPYPEN = 13,
-        R2_MASKNOTPEN = 3,
-        R2_MASKPEN = 9,
-        R2_MASKPENNOT = 5,
-        R2_MERGENOTPEN = 12,
-        R2_MERGEPEN = 15,
-        R2_MERGEPENNOT = 14,
-        R2_NOP = 11,
-        R2_NOT = 6,
-        R2_NOTCOPYPEN = 4,
-        R2_NOTMASKPEN = 8,
-        R2_NOTMERGEPEN = 2,
-        R2_NOTXORPEN = 10,
-        R2_WHITE = 16,
-        R2_XORPEN = 7,
-
-        BLACKNESS = 66,
-        DSTINVERT = 5570569,
-        MERGECOPY = 12583114,
-        MERGEPAINT = 12255782,
-        NOTSRCCOPY = 3342344,
-        NOTSRCERASE = 1114278,
-        PATCOPY = 15728673,
-        PATINVERT = 5898313,
-        PATPAINT = 16452105,
-        SRCAND = 8913094,
-        SRCCOPY = 13369376,
-        SRCERASE = 4457256,
-        SRCINVERT = 6684742,
-        SRCPAINT = 15597702,
-        WHITENESS = 16711778,
-
-        DIB_RGB_COLORS = 0,
-        DIB_PAL_COLORS = 1,
-
-        LAYOUT_BITMAPORIENTATIONPRESERVED = 8,
-        LAYOUT_RTL = 1,
-
-        ABSOLUTE = 1,
-        RELATIVE = 2,
-
-        ASPECT_FILTERING = 1,
-    }
-}

+ 0 - 187
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/GdiUtils.cs

@@ -1,187 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Utils functions.
-    /// </summary>
-    public class GdiUtils
-    {
-        #region Local Variables
-
-        private static int[,] FBA_SHIFT_JIS = new int[,] { { 0x81, 0x9F }, { 0xE0, 0xFC } };
-        private static int[,] FBA_HANGUL_CHARSET = new int[,] { { 0x80, 0xFF } };
-        private static int[,] FBA_JOHAB_CHARSET = new int[,] { { 0x80, 0xFF } };
-        private static int[,] FBA_GB2312_CHARSET = new int[,] { { 0x80, 0xFF } };
-        private static int[,] FBA_CHINESEBIG5_CHARSET = new int[,] { { 0xA1, 0xFE } };
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Convert byte array to string using specified charset.
-        /// </summary>
-        /// <param name="chars"></param>
-        /// <param name="charset"></param>
-        /// <returns></returns>
-        public static string ConvertString(byte[] chars, int charset)
-        {
-            string str = null;
-
-            int length = 0;
-            while (length < chars.Count() && chars[length] != 0)
-            {
-                length++;
-            }
-
-            try
-            {
-                str = System.Text.Encoding.GetEncoding(GetCharset(charset)).GetString(chars).Substring(0, length);
-            }
-            catch (Exception ex)
-            {
-                try
-                {
-                    str = System.Text.Encoding.GetEncoding("US-ASCII").GetString(chars).Substring(0, length);
-                }
-                catch (Exception ex2)
-                {
-                    throw new Exception(ex.Message+ex2.Message);
-                }
-            }
-            return str;
-        }
-
-        /// <summary>
-        /// Get specified charset.
-        /// </summary>
-        /// <param name="charset"></param>
-        /// <returns></returns>
-        public static string GetCharset(int charset)
-        {
-            switch (charset)
-            {
-                case (int)FontCharsetEnum.ANSI_CHARSET:
-                    return "Cp1252";
-                case (int)FontCharsetEnum.SYMBOL_CHARSET:
-                    return "Cp1252";
-                case (int)FontCharsetEnum.MAC_CHARSET:
-                    return "MacRoman";
-                case (int)FontCharsetEnum.SHIFTJIS_CHARSET:
-                    return "MS932";
-                case (int)FontCharsetEnum.HANGUL_CHARSET:
-                    return "MS949";
-                case (int)FontCharsetEnum.JOHAB_CHARSET:
-                    return "Johab";
-                case (int)FontCharsetEnum.GB2312_CHARSET:
-                    return "MS936";
-                case (int)FontCharsetEnum.CHINESEBIG5_CHARSET:
-                    return "MS950";
-                case (int)FontCharsetEnum.GREEK_CHARSET:
-                    return "Cp1253";
-                case (int)FontCharsetEnum.TURKISH_CHARSET:
-                    return "Cp1254";
-                case (int)FontCharsetEnum.VIETNAMESE_CHARSET:
-                    return "Cp1258";
-                case (int)FontCharsetEnum.HEBREW_CHARSET:
-                    return "Cp1255";
-                case (int)FontCharsetEnum.ARABIC_CHARSET:
-                    return "Cp1256";
-                case (int)FontCharsetEnum.BALTIC_CHARSET:
-                    return "Cp1257";
-                case (int)FontCharsetEnum.RUSSIAN_CHARSET:
-                    return "Cp1251";
-                case (int)FontCharsetEnum.THAI_CHARSET:
-                    return "MS874";
-                case (int)FontCharsetEnum.EASTEUROPE_CHARSET:
-                    return "Cp1250";
-                case (int)FontCharsetEnum.OEM_CHARSET:
-                    return "Cp1252";
-                default:
-                    return "Cp1252";
-            }
-        }
-
-        /// <summary>
-        /// Get language using specified charset.
-        /// </summary>
-        /// <param name="charset"></param>
-        /// <returns></returns>
-        public static string GetLanguage(int charset)
-        {
-            switch (charset)
-            {
-                case (int)FontCharsetEnum.ANSI_CHARSET:
-                    return "en";
-                case (int)FontCharsetEnum.SYMBOL_CHARSET:
-                    return "en";
-                case (int)FontCharsetEnum.MAC_CHARSET:
-                    return "en";
-                case (int)FontCharsetEnum.SHIFTJIS_CHARSET:
-                    return "ja";
-                case (int)FontCharsetEnum.HANGUL_CHARSET:
-                    return "ko";
-                case (int)FontCharsetEnum.JOHAB_CHARSET:
-                    return "ko";
-                case (int)FontCharsetEnum.GB2312_CHARSET:
-                    return "zh-CN";
-                case (int)FontCharsetEnum.CHINESEBIG5_CHARSET:
-                    return "zh-TW";
-                case (int)FontCharsetEnum.GREEK_CHARSET:
-                    return "el";
-                case (int)FontCharsetEnum.TURKISH_CHARSET:
-                    return "tr";
-                case (int)FontCharsetEnum.VIETNAMESE_CHARSET:
-                    return "vi";
-                case (int)FontCharsetEnum.HEBREW_CHARSET:
-                    return "iw";
-                case (int)FontCharsetEnum.ARABIC_CHARSET:
-                    return "ar";
-                case (int)FontCharsetEnum.BALTIC_CHARSET:
-                    return "bat";
-                case (int)FontCharsetEnum.RUSSIAN_CHARSET:
-                    return "ru";
-                case (int)FontCharsetEnum.THAI_CHARSET:
-                    return "th";
-                case (int)FontCharsetEnum.EASTEUROPE_CHARSET:
-                    return null;
-                case (int)FontCharsetEnum.OEM_CHARSET:
-                    return null;
-                default:
-                    return null;
-            }
-        }
-
-
-        /// <summary>
-        /// Get the first byte area specified charset.
-        /// </summary>
-        /// <param name="charset"></param>
-        /// <returns></returns>
-        public static int[,] GetFirstByteArea(int charset)
-        {
-            switch (charset)
-            {
-                case (int)FontCharsetEnum.SHIFTJIS_CHARSET:
-                    return FBA_SHIFT_JIS;
-                case (int)FontCharsetEnum.HANGUL_CHARSET:
-                    return FBA_HANGUL_CHARSET;
-                case (int)FontCharsetEnum.JOHAB_CHARSET:
-                    return FBA_JOHAB_CHARSET;
-                case (int)FontCharsetEnum.GB2312_CHARSET:
-                    return FBA_GB2312_CHARSET;
-                case (int)FontCharsetEnum.CHINESEBIG5_CHARSET:
-                    return FBA_CHINESEBIG5_CHARSET;
-                default:
-                    return null;
-            }
-        }
-
-        #endregion
-    }
-}

+ 0 - 657
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdi.cs

@@ -1,657 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface - Represents graphics elements
-    /// </summary>
-    public interface IGdi
-    {
-        /// <summary>
-        /// Create header document.
-        /// </summary>
-        /// <param name="vsx"></param>
-        /// <param name="vsy"></param>
-        /// <param name="vex"></param>
-        /// <param name="vey"></param>
-        /// <param name="dpi"></param>
-        void PlaceableHeader(int vsx, int vsy, int vex, int vey, int dpi);
-
-        /// <summary>
-        /// Initialize Header document.
-        /// </summary>
-        void Header();
-
-        /// <summary>
-        /// Element is put inside a shape element and defines how an attribute of an element changes over the animation. 
-        /// The attribute will change from the initial value to the end value in the duration specified.
-        /// </summary>
-        /// <param name="palette"></param>
-        /// <param name="startIndex"></param>
-        /// <param name="entries"></param>
-        void AnimatePalette(IGdiPalette palette, int startIndex, int[] entries);
-
-        /// <summary>
-        /// Draws an elliptical arc.
-        /// </summary>
-        /// <param name="sxr"></param>
-        /// <param name="syr"></param>
-        /// <param name="exr"></param>
-        /// <param name="eyr"></param>
-        /// <param name="sxa"></param>
-        /// <param name="sya"></param>
-        /// <param name="exa"></param>
-        /// <param name="eya"></param>
-        void Arc(int sxr, int syr, int exr, int eyr,
-               int sxa, int sya, int exa, int eya);
-
-        /// <summary>
-        /// Execute a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.
-        /// </summary>
-        /// <param name="image"></param>
-        /// <param name="dx"></param>
-        /// <param name="dy"></param>
-        /// <param name="dw"></param>
-        /// <param name="dh"></param>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="rop"></param>
-        void BitBlt(byte[] image, int dx, int dy, int dw, int dh, int sx, int sy, long rop);
-
-        /// <summary>
-        /// Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a secant).
-        /// The chord is outlined by using the current pen and filled by using the current brush.
-        /// </summary>
-        /// <param name="sxr"></param>
-        /// <param name="syr"></param>
-        /// <param name="exr"></param>
-        /// <param name="eyr"></param>
-        /// <param name="sxa"></param>
-        /// <param name="sya"></param>
-        /// <param name="exa"></param>
-        /// <param name="eya"></param>
-        void Chord(int sxr, int syr, int exr, int eyr,
-                 int sxa, int sya, int exa, int eya);
-
-        /// <summary>
-        /// Creates a logical brush that has the specified style, color, and pattern.
-        /// </summary>
-        /// <param name="style"></param>
-        /// <param name="color"></param>
-        /// <param name="hatch"></param>
-        /// <returns></returns>
-        IGdiBrush CreateBrushIndirect(int style, int color, int hatch);
-
-        /// <summary>
-        /// Creates a logical font that has the specified characteristics. 
-        /// The font can subsequently be selected as the current font for any device context.
-        /// </summary>
-        /// <param name="height"></param>
-        /// <param name="width"></param>
-        /// <param name="escapement"></param>
-        /// <param name="orientation"></param>
-        /// <param name="weight"></param>
-        /// <param name="italic"></param>
-        /// <param name="underline"></param>
-        /// <param name="strikeout"></param>
-        /// <param name="charset"></param>
-        /// <param name="outPrecision"></param>
-        /// <param name="clipPrecision"></param>
-        /// <param name="quality"></param>
-        /// <param name="pitchAndFamily"></param>
-        /// <param name="faceName"></param>
-        /// <returns></returns>
-        IGdiFont CreateFontIndirect(int height, int width, int escapement,
-                         int orientation, int weight,
-                         bool italic, bool underline, bool strikeout,
-                         int charset, int outPrecision, int clipPrecision,
-                         int quality, int pitchAndFamily, byte[] faceName);
-
-        /// <summary>
-        /// Creates a logical palette.
-        /// </summary>
-        /// <param name="version"></param>
-        /// <param name="palEntry"></param>
-        /// <returns></returns>
-        IGdiPalette CreatePalette(int version, int[] palEntry);
-
-        /// <summary>
-        /// Creates a logical brush with the specified bitmap pattern.
-        /// The bitmap can be a DIB section bitmap, which is created by the CreateDIBSection function, or it can be a device-dependent bitmap.
-        /// </summary>
-        /// <param name="image"></param>
-        /// <returns></returns>
-        IGdiPatternBrush CreatePatternBrush(byte[] image);
-
-        /// <summary>
-        /// Creates a logical cosmetic pen that has the style, width, and color specified in a structure.
-        /// </summary>
-        /// <param name="style"></param>
-        /// <param name="width"></param>
-        /// <param name="color"></param>
-        /// <returns></returns>
-        IGdiPen CreatePenIndirect(int style, int width, int color);
-
-        /// <summary>
-        /// Creates a rectangular region.
-        /// </summary>
-        /// <param name="left"></param>
-        /// <param name="top"></param>
-        /// <param name="right"></param>
-        /// <param name="bottom"></param>
-        /// <returns></returns>
-        IGdiRegion CreateRectRgn(int left, int top, int right, int bottom);
-
-        /// <summary>
-        /// Deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. 
-        /// After the object is deleted, the specified handle is no longer valid.
-        /// </summary>
-        /// <param name="obj"></param>
-        void DeleteObject(IGdiObject obj);
-
-        /// <summary>
-        /// Function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.
-        /// </summary>
-        /// <param name="image"></param>
-        /// <param name="dx"></param>
-        /// <param name="dy"></param>
-        /// <param name="dw"></param>
-        /// <param name="dh"></param>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="rop"></param>
-        void DibBitBlt(byte[] image, int dx, int dy, int dw, int dh,
-               int sx, int sy, long rop);
-
-        /// <summary>
-        /// Create Dib Pattern Brush object instance.
-        /// </summary>
-        /// <param name="image"></param>
-        /// <param name="usage"></param>
-        /// <returns></returns>
-        IGdiPatternBrush DibCreatePatternBrush(byte[] image, int usage);
-
-        /// <summary>
-        /// Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. 
-        /// The system stretches or compresses the bitmap according to the stretching mode currently set in the destination device context.
-        /// </summary>
-        /// <param name="image"></param>
-        /// <param name="dx"></param>
-        /// <param name="dy"></param>
-        /// <param name="dw"></param>
-        /// <param name="dh"></param>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="sw"></param>
-        /// <param name="sh"></param>
-        /// <param name="rop"></param>
-        void DibStretchBlt(byte[] image, int dx, int dy, int dw, int dh,
-               int sx, int sy, int sw, int sh, long rop);
-
-        /// <summary>
-        /// Draws an ellipse. 
-        /// The center of the ellipse is the center of the specified bounding rectangle.
-        /// The ellipse is outlined by using the current pen and is filled by using the current brush.
-        /// </summary>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="ex"></param>
-        /// <param name="ey"></param>
-        void Ellipse(int sx, int sy, int ex, int ey);
-
-        /// <summary>
-        /// Enables an application to access the system-defined device capabilities that are not available through GDI. 
-        /// Escape calls made by an application are translated and sent to the driver.
-        /// </summary>
-        /// <param name="data"></param>
-        void Escape(byte[] data);
-
-        /// <summary>
-        ///  Creates a new clipping region that consists of the existing clipping region minus the specified rectangle.
-        /// </summary>
-        /// <param name="left"></param>
-        /// <param name="top"></param>
-        /// <param name="right"></param>
-        /// <param name="bottom"></param>
-        /// <returns></returns>
-        int ExcludeClipRect(int left, int top, int right, int bottom);
-
-        /// <summary>
-        /// Fills an area of the display surface with the current brush.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="color"></param>
-        /// <param name="type"></param>
-        void ExtFloodFill(int x, int y, int color, int type);
-
-        /// <summary>
-        /// Draws text using the currently selected font, background color, and text color. 
-        /// You can optionally provide dimensions to be used for clipping, opaquing, or both.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="options"></param>
-        /// <param name="rect"></param>
-        /// <param name="text"></param>
-        /// <param name="lpdx"></param>
-        void ExtTextOut(int x, int y, int options, int[] rect, byte[] text, int[] lpdx);
-
-        /// <summary>
-        /// Fills a region by using the specified brush.
-        /// </summary>
-        /// <param name="rgn"></param>
-        /// <param name="brush"></param>
-        void FillRgn(IGdiRegion rgn, IGdiBrush brush);
-
-        /// <summary>
-        /// Fills an area of the display surface with the current brush. 
-        /// The area is assumed to be bounded as specified by the crFill parameter.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="color"></param>
-        void FloodFill(int x, int y, int color);
-
-        /// <summary>
-        /// Draws a border around the specified region by using the specified brush.
-        /// </summary>
-        /// <param name="rgn"></param>
-        /// <param name="brush"></param>
-        /// <param name="w"></param>
-        /// <param name="h"></param>
-        void FrameRgn(IGdiRegion rgn, IGdiBrush brush, int w, int h);
-
-        /// <summary>
-        /// Creates a new clipping region from the intersection of the current clipping region and the specified rectangle.
-        /// </summary>
-        /// <param name="left"></param>
-        /// <param name="top"></param>
-        /// <param name="right"></param>
-        /// <param name="bottom"></param>
-        void IntersectClipRect(int left, int top, int right, int bottom);
-
-        /// <summary>
-        /// Inverts the colors in the specified region.
-        /// </summary>
-        /// <param name="rgn"></param>
-        void InvertRgn(IGdiRegion rgn);
-
-        /// <summary>
-        /// Draws a line from the current position up to, but not including, the specified point.
-        /// </summary>
-        /// <param name="ex"></param>
-        /// <param name="ey"></param>
-        void LineTo(int ex, int ey);
-
-        /// <summary>
-        /// Updates the current position to the specified point and optionally returns the previous position.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        void MoveToEx(int x, int y, Point old);
-
-        /// <summary>
-        /// Moves the clipping region of a device context by the specified offsets.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        void OffsetClipRgn(int x, int y);
-
-        /// <summary>
-        /// Modifies the viewport origin for a device context using the specified horizontal and vertical offsets.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="point"></param>
-        void OffsetViewportOrgEx(int x, int y, Point point);
-
-        /// <summary>
-        /// Modifies the window origin for a device context using the specified horizontal and vertical offsets.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="point"></param>
-        void OffsetWindowOrgEx(int x, int y, Point point);
-
-        /// <summary>
-        /// Paints the specified region by using the brush currently selected into the device context.
-        /// </summary>
-        /// <param name="rgn"></param>
-        void PaintRgn(IGdiRegion rgn);
-
-        /// <summary>
-        /// Paints the specified rectangle using the brush that is currently selected into the specified device context.
-        /// The brush color and the surface color or colors are combined by using the specified raster operation.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="width"></param>
-        /// <param name="height"></param>
-        /// <param name="rop"></param>
-        void PatBlt(int x, int y, int width, int height, long rop);
-
-        /// <summary>
-        /// Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. 
-        /// The pie is outlined by using the current pen and filled by using the current brush.
-        /// </summary>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="ex"></param>
-        /// <param name="ey"></param>
-        /// <param name="sxr"></param>
-        /// <param name="syr"></param>
-        /// <param name="exr"></param>
-        /// <param name="eyr"></param>
-        void Pie(int sx, int sy, int ex, int ey, int sxr, int syr, int exr, int eyr);
-
-        /// <summary>
-        /// Draws a polygon consisting of two or more vertices connected by straight lines. 
-        /// The polygon is outlined by using the current pen and filled by using the current brush and polygon fill mode.
-        /// </summary>
-        /// <param name="points"></param>
-        void Polygon(Point[] points);
-
-        /// <summary>
-        /// Element is an SVG basic shape that creates straight lines connecting several points. 
-        /// Typically a polyline is used to create open shapes as the last point doesn't have to be connected to the first point. 
-        /// </summary>
-        /// <param name="points"></param>
-        void Polyline(Point[] points);
-
-        /// <summary>
-        ///  Draws a series of closed polygons. 
-        ///  Each polygon is outlined by using the current pen and filled by using the current brush and polygon fill mode. 
-        ///  The polygons drawn by this function can overlap.
-        /// </summary>
-        /// <param name="points"></param>
-        void PolyPolygon(Point[][] points);
-
-        /// <summary>
-        /// Maps palette entries from the current logical palette to the system palette.
-        /// </summary>
-        void RealizePalette();
-
-        /// <summary>
-        /// Restores a device context (DC) to the specified state. 
-        /// The DC is restored by popping state information off a stack created by earlier calls to the SaveDC function.
-        /// </summary>
-        /// <param name="savedDC"></param>
-        void RestoreDC(int savedDC);
-
-        /// <summary>
-        /// Draws a rectangle. 
-        /// The rectangle is outlined by using the current pen and filled by using the current brush.
-        /// </summary>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="ex"></param>
-        /// <param name="ey"></param>
-        void Rectangle(int sx, int sy, int ex, int ey);
-
-        /// <summary>
-        /// Increases or decreases the size of a logical palette based on the specified value.
-        /// </summary>
-        /// <param name="palette"></param>
-        void ResizePalette(IGdiPalette palette);
-
-        /// <summary>
-        /// Draws a rectangle with rounded corners. 
-        /// The rectangle is outlined by using the current pen and filled by using the current brush.
-        /// </summary>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="ex"></param>
-        /// <param name="ey"></param>
-        /// <param name="rw"></param>
-        /// <param name="rh"></param>
-        void RoundRect(int sx, int sy, int ex, int ey, int rw, int rh);
-
-        /// <summary>
-        /// Save device context (DC).
-        /// </summary>
-        void SeveDC();
-
-        /// <summary>
-        /// Modifies the viewport for a device context using the ratios formed by the specified multiplicands and divisors.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="xd"></param>
-        /// <param name="y"></param>
-        /// <param name="yd"></param>
-        /// <param name="old"></param>
-        void ScaleViewportExtEx(int x, int xd, int y, int yd, Size old);
-
-        /// <summary>
-        /// Modifies the window for a device context using the ratios formed by the specified multiplicands and divisors.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="xd"></param>
-        /// <param name="y"></param>
-        /// <param name="yd"></param>
-        /// <param name="old"></param>
-        void ScaleWindowExtEx(int x, int xd, int y, int yd, Size old);
-
-        /// <summary>
-        /// Selects a region as the current clipping region for the specified device context.
-        /// </summary>
-        /// <param name="rgn"></param>
-        void SelectClipRgn(IGdiRegion rgn);
-
-        /// <summary>
-        /// Selects an object into the specified device context (DC). The new object replaces the previous object of the same type.
-        /// </summary>
-        /// <param name="obj"></param>
-        void SelectObject(IGdiObject obj);
-
-        /// <summary>
-        /// Selects the specified logical palette into a device context.
-        /// </summary>
-        /// <param name="palette"></param>
-        /// <param name="mode"></param>
-        void SelectPalette(IGdiPalette palette, bool mode);
-
-        /// <summary>
-        /// Sets the current background color to the specified color value, or to the nearest physical color if the device cannot represent the specified color value.
-        /// </summary>
-        /// <param name="color"></param>
-        void SetBkColor(int color);
-
-        /// <summary>
-        /// Sets the background mix mode of the specified device context. 
-        /// The background mix mode is used with text, hatched brushes, and pen styles that are not solid lines.
-        /// </summary>
-        /// <param name="mode"></param>
-        void SetBkMode(int mode);
-
-        /// <summary>
-        /// Sets the pixels in the specified rectangle on the device that is associated with the destination device context using color data from a DIB, JPEG, or PNG image.
-        /// </summary>
-        /// <param name="dx"></param>
-        /// <param name="dy"></param>
-        /// <param name="dw"></param>
-        /// <param name="dh"></param>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="startscan"></param>
-        /// <param name="scanlines"></param>
-        /// <param name="image"></param>
-        /// <param name="colorUse"></param>
-        void SetDIBitsToDevice(int dx, int dy, int dw, int dh, int sx, int sy,
-                       int startscan, int scanlines, byte[] image, int colorUse);
-
-        /// <summary>
-        /// Changes the layout of a device context (DC).
-        /// </summary>
-        /// <param name="layout"></param>
-        void SetLayout(long layout);
-
-        /// <summary>
-        /// Sets the mapping mode of the specified device context. 
-        /// The mapping mode defines the unit of measure used to transform page-space units into device-space units, and also defines the orientation of the device's x and y axes.
-        /// </summary>
-        /// <param name="mode"></param>
-        void SetMapMode(int mode);
-
-        /// <summary>
-        /// Alters the algorithm the font mapper uses when it maps logical fonts to physical fonts.
-        /// </summary>
-        /// <param name="flags"></param>
-        void SetMapperFlags(long flags);
-
-        /// <summary>
-        /// Sets RGB (red, green, blue) color values and flags in a range of entries in a logical palette.
-        /// </summary>
-        /// <param name="palette"></param>
-        /// <param name="startIndex"></param>
-        /// <param name="entries"></param>
-        void SetPaletteEntries(IGdiPalette palette, int startIndex, int[] entries);
-
-        /// <summary>
-        /// Sets the pixel at the specified coordinates to the specified color.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="color"></param>
-        void SetPixel(int x, int y, int color);
-
-        /// <summary>
-        /// Sets the polygon fill mode for functions that fill polygons.
-        /// </summary>
-        /// <param name="mode"></param>
-        void SetPolyFillMode(int mode);
-
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="mode"></param>
-        void SetRelAbs(int mode);
-
-        /// <summary>
-        /// Sets the current foreground mix mode. 
-        /// GDI uses the foreground mix mode to combine pens and interiors of filled objects with the colors already on the screen. 
-        /// The foreground mix mode defines how colors from the brush or pen and the colors in the existing image are to be combined.
-        /// </summary>
-        /// <param name="mode"></param>
-        void SetROP2(int mode);
-
-        /// <summary>
-        /// Sets the bitmap stretching mode in the specified device context.
-        /// </summary>
-        /// <param name="mode"></param>
-        void SetStretchBltMode(int mode);
-        
-        /// <summary>
-        /// Sets the text-alignment flags for the specified device context.
-        /// </summary>
-        /// <param name="align"></param>
-        void SetTextAlign(int align);
-
-        /// <summary>
-        /// Sets the intercharacter spacing. 
-        /// Intercharacter spacing is added to each character, including break characters, when the system writes a line of text.
-        /// </summary>
-        /// <param name="extra"></param>
-        void SetTextCharacterExtra(int extra);
-
-        /// <summary>
-        /// Sets the text color for the specified device context to the specified color.
-        /// </summary>
-        /// <param name="color"></param>
-        void SetTextColor(int color);
-
-        /// <summary>
-        /// Specifies the amount of space the system should add to the break characters in a string of text. 
-        /// The space is added when an application calls the TextOut or ExtTextOut functions.
-        /// </summary>
-        /// <param name="breakExtra"></param>
-        /// <param name="breakCount"></param>
-        void SetTextJustification(int breakExtra, int breakCount);
-
-        /// <summary>
-        /// Sets the horizontal and vertical extents of the viewport for a device context by using the specified values.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        void SetViewportExtEx(int x, int y, Size old);
-
-        /// <summary>
-        /// Specifies which device point maps to the window origin (0,0).
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        void SetViewportOrgEx(int x, int y, Point old);
-
-        /// <summary>
-        /// Sets the horizontal and vertical extents of the window for a device context by using the specified values.
-        /// </summary>
-        /// <param name="width"></param>
-        /// <param name="height"></param>
-        /// <param name="old"></param>
-        void SetWindowExtEx(int width, int height, Size old);
-
-        /// <summary>
-        /// Specifies which window point maps to the viewport origin (0,0).
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        void SetWindowOrgEx(int x, int y, Point old);
-
-        /// <summary>
-        /// Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. 
-        /// The system stretches or compresses the bitmap according to the stretching mode currently set in the destination device context.
-        /// </summary>
-        /// <param name="image"></param>
-        /// <param name="dx"></param>
-        /// <param name="dy"></param>
-        /// <param name="dw"></param>
-        /// <param name="dh"></param>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="sw"></param>
-        /// <param name="sh"></param>
-        /// <param name="rop"></param>
-        void StretchBlt(byte[] image, int dx, int dy, int dw, int dh,
-               int sx, int sy, int sw, int sh, long rop);
-
-        /// <summary>
-        /// Copies the color data for a rectangle of pixels in a DIB, JPEG, or PNG image to the specified destination rectangle. 
-        /// If the destination rectangle is larger than the source rectangle, this function stretches the rows and columns of color data to fit the destination rectangle. If the destination rectangle is smaller than the source rectangle, this function compresses the rows and columns by using the specified raster operation.
-        /// </summary>
-        /// <param name="dx"></param>
-        /// <param name="dy"></param>
-        /// <param name="dw"></param>
-        /// <param name="dh"></param>
-        /// <param name="sx"></param>
-        /// <param name="sy"></param>
-        /// <param name="sw"></param>
-        /// <param name="sh"></param>
-        /// <param name="image"></param>
-        /// <param name="usage"></param>
-        /// <param name="rop"></param>
-        void StretchDIBits(int dx, int dy, int dw, int dh,
-                       int sx, int sy, int sw, int sh,
-                       byte[] image, int usage, long rop);
-
-        /// <summary>
-        /// Writes a character string at the specified location, using the currently selected font, background color, and text color.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="text"></param>
-        void TextOut(int x, int y, byte[] text);
-
-        /// <summary>
-        /// 
-        /// </summary>
-        void Footer();
-    }
-}

+ 0 - 36
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiBrush.cs

@@ -1,36 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface - Represents a Brush object.
-    /// </summary>
-    public interface IGdiBrush : IGdiObject
-    {
-        #region Properties
-
-        /// <summary>
-        /// Object Style.
-        /// </summary>
-        /// <returns></returns>
-        int Style { get; }
-
-        /// <summary>
-        /// Object Color.
-        /// </summary>
-        /// <returns></returns>
-        int Color {get;}
-
-        /// <summary>
-        /// Object Hatch.
-        /// </summary>
-        /// <returns></returns>
-        int Hatch { get; }
-
-        #endregion
-    }
-}

+ 0 - 102
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiFont.cs

@@ -1,102 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface - Represents a Font object.
-    /// </summary>
-    public interface IGdiFont : IGdiObject
-    {
-        #region Properties
-
-        /// <summary>
-        /// Object Height.
-        /// </summary>
-        /// <returns></returns>
-        int Height {get;}
-
-        /// <summary>
-        /// Object Width.
-        /// </summary>
-        /// <returns></returns>
-        int Width { get; }
-
-        /// <summary>
-        /// Object Escapement.
-        /// </summary>
-        /// <returns></returns>
-        int Escapement { get; }
-
-        /// <summary>
-        /// Object Orientation.
-        /// </summary>
-        /// <returns></returns>
-        int Orientation { get; }
-
-        /// <summary>
-        /// Object Weight.
-        /// </summary>
-        /// <returns></returns>
-        int Weight { get; }
-
-        /// <summary>
-        /// Italic font.
-        /// </summary>
-        /// <returns></returns>
-        bool IsItalic { get; }
-
-        /// <summary>
-        /// Underlined font.
-        /// </summary>
-        /// <returns></returns>
-        bool IsUnderlined { get; }
-
-        /// <summary>
-        /// Striked font.
-        /// </summary>
-        /// <returns></returns>
-        bool IsStrikedOut { get; }
-
-        /// <summary>
-        /// Object Charset.
-        /// </summary>
-        /// <returns></returns>
-        int Charset { get; }
-
-        /// <summary>
-        /// Object out precision.
-        /// </summary>
-        /// <returns></returns>
-        int OutPrecision { get; }
-
-        /// <summary>
-        /// Object clip precision.
-        /// </summary>
-        /// <returns></returns>
-        int ClipPrecision { get; }
-
-        /// <summary>
-        /// Object Quality.
-        /// </summary>
-        /// <returns></returns>
-        int Quality { get; }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <returns></returns>
-        int PitchAndFamily { get; }
-
-        /// <summary>
-        /// Font face name.
-        /// </summary>
-        /// <returns></returns>
-        string FaceName { get; }
-
-        #endregion
-    }
-}

+ 0 - 15
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiObject.cs

@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphic Device Interface - Object base.
-    /// </summary>
-    public interface IGdiObject
-    {
-    }
-}

+ 0 - 30
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiPalette.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface - Represents a Palette object.
-    /// </summary>
-    public interface IGdiPalette : IGdiObject
-    {
-        #region Properties
-
-        /// <summary>
-        /// Object Version.
-        /// </summary>
-        /// <returns></returns>
-        int Version { get; }
-
-        /// <summary>
-        /// Object Entries.
-        /// </summary>
-        /// <returns></returns>
-        int[] Entries { get; }
-
-        #endregion
-    }
-}

+ 0 - 24
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiPatternBrush.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface - Represents a Pattern Brush object.
-    /// </summary>
-    public interface IGdiPatternBrush : IGdiObject
-    {
-        #region Properties
-
-        /// <summary>
-        /// Object Patterns.
-        /// </summary>
-        /// <returns></returns>
-        byte[] Pattern { get; }
-
-        #endregion
-    }
-}

+ 0 - 33
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiPen.cs

@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface - Represents a Pen object.
-    /// </summary>
-    public interface IGdiPen : IGdiObject
-    {
-        #region Properties
-
-        /// <summary>
-        /// Object Style.
-        /// </summary>
-        int Style { get; }
-
-        /// <summary>
-        /// Object Width.
-        /// </summary>
-        int Width { get; }
-
-        /// <summary>
-        /// Object Color.
-        /// </summary>
-        int Color { get; }
-
-        #endregion
-    }
-}

+ 0 - 16
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/IGdiRegion.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Graphics Device Interface - Represents a Region Object.
-    /// </summary>
-    public interface IGdiRegion : IGdiObject
-    {
-        
-    }
-}

+ 0 - 22
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/PenEnum.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Enumeração de Pen
-    /// </summary>
-    public enum PenPSEnum
-    {
-         PS_SOLID = 0,
-         PS_DASH = 1,
-         PS_DOT = 2,
-         PS_DASHDOT = 3,
-         PS_DASHDOTDOT = 4,
-         PS_NULL = 5,
-         PS_INSIDEFRAME = 6,
-    }
-}

+ 0 - 90
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/Point.cs

@@ -1,90 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Represents a point (x,y).
-    /// </summary>
-    public class Point
-    {
-        #region Properties
-
-        /// <summary>
-        /// Point X
-        /// </summary>
-        public int X { get; set; }
-
-        /// <summary>
-        /// Point Y
-        /// </summary>
-        public int Y { get; set; }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        public Point(int x, int y)
-        {
-            X = x;
-            Y = y;
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Serves as the default hash function.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            int prime = 31;
-            int result = 1;
-            result = prime * result + X;
-            result = prime * result + Y;
-            return result;
-        }
-
-        /// <summary>
-        /// Determines whether the specified object is equal to the current object.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(Object obj)
-        {
-            if (this == obj)
-                return true;
-            if (obj == null)
-                return false;
-            if (typeof(Point) != obj.GetType())
-                return false;
-            Point other = (Point)obj;
-            if (X != other.X)
-                return false;
-            if (Y != other.Y)
-                return false;
-            return true;
-        }
-
-        /// <summary>
-        /// Returns a string that represents the current object.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "Point [x=" + X + ", y=" + Y + "]";
-        }
-
-        #endregion
-    }
-}

+ 0 - 19
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/RegionEnum.cs

@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Region Enum
-    /// </summary>
-    public enum RegionEnum
-    {
-        NULLREGION = 1,
-        SIMPLEREGION = 2,
-        COMPLEXREGION = 3,
-        ERROR = 0,
-    }
-}

+ 0 - 90
TEAMModelOS.SDK/Helper/Common/WMFConverter/Gdi/Size.cs

@@ -1,90 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Gdi
-{
-    /// <summary>
-    /// Represents a size object.
-    /// </summary>
-    public class Size
-    {
-        #region Properties
-
-        /// <summary>
-        /// Width of the object.
-        /// </summary>
-        public int Width { get; set; }
-
-        /// <summary>
-        /// Height of the object.
-        /// </summary>
-        public int Height { get; set; }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="width"></param>
-        /// <param name="height"></param>
-        public Size(int width, int height)
-        {
-            Width = width;
-            Height = height;
-        }
-
-        #endregion 
-
-        #region Public Methods
-
-        /// <summary>
-        /// Serves as the default hash function.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            int prime = 31;
-            int result = 1;
-            result = prime * result + Height;
-            result = prime * result + Width;
-            return result;
-        }
-
-        /// <summary>
-        /// Determines whether the specified object is equal to the current object.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(Object obj)
-        {
-            if (this == obj)
-                return true;
-            if (obj == null)
-                return false;
-            if (typeof(Size) != obj.GetType())
-                return false;
-            Size other = (Size)obj;
-            if (Height != other.Height)
-                return false;
-            if (Width != other.Width)
-                return false;
-            return true;
-        }
-
-        /// <summary>
-        /// Returns a string that represents the current object.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "Size [width=" + Width + ", height=" + Height + "]";
-        }
-
-        #endregion
-    }
-}

+ 0 - 228
TEAMModelOS.SDK/Helper/Common/WMFConverter/IO/DataInput.cs

@@ -1,228 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.IO
-{
-    /// <summary>
-    /// Read input stream of wmf file.
-    /// </summary>
-    public class DataInput
-    {
-        #region Local Variables
-
-        private System.IO.Stream _inputStream;
-        private bool _isLittleEndian = BitConverter.IsLittleEndian;
-
-        private byte[] _buf = new byte[4];
-        private int _count = 0;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Represents the count of bytes read
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                return _count;
-            }
-            set
-            {
-                _count = value;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// Create a DataInput instance using native order.
-        /// </summary>
-        /// <param name="inputStream"></param>
-	    public DataInput(System.IO.Stream inputStream)
-        {
-            _isLittleEndian = BitConverter.IsLittleEndian;
-            _inputStream = inputStream;
-        }
-
-        /// <summary>
-        /// Default contructor.
-        /// Create a DataInput instance receving the order.
-        /// </summary>
-        /// <param name="inputStream"></param>
-        /// <param name="endian"></param>
-        public DataInput(System.IO.Stream inputStream, bool endian)
-        {
-            _inputStream = inputStream;
-            _isLittleEndian = endian;
-        }
-
-        #endregion 
-
-        #region Public Methods
-
-        /// <summary>
-        /// Reads the next one byte of this input stream as a signed 8-bit integer.
-	    /// </summary>
-	    /// <returns></returns>
-	    public int ReadByte()
-        {
-            if (_inputStream.Read(_buf, 0, 1) == 1)
-            {
-                _count += 1;
-                return (0xff & _buf[0]);
-            }
-            throw new System.IO.EndOfStreamException();
-        }
-
-        /// <summary>
-        /// Reads the next two bytes of this input stream as a signed 16-bit integer.
-        /// </summary>
-        /// <returns></returns>
-        public int ReadInt16()
-        {
-            if (_inputStream.Read(_buf, 0, 2) == 2)
-            {
-                short value = 0;
-                if (_isLittleEndian == false)
-                {
-                    value |= (short)(0xff & _buf[1]);
-                    value |= (short)((0xff & _buf[0]) << 8);
-                }
-                else
-                {
-                    value |= (short)(0xff & _buf[0]);
-                    value |= (short)((0xff & _buf[1]) << 8);
-                }
-                _count += 2;
-                return value;
-            }
-            throw new System.IO.EndOfStreamException();
-        }
-
-        /// <summary>
-        /// Reads the next four bytes of this input stream as a signed 32-bit integer.
-        /// </summary>
-        /// <returns></returns>
-	    public int ReadInt32()
-        {
-            if (_inputStream.Read(_buf, 0, 4) == 4)
-            {
-                int value = 0;
-                if (_isLittleEndian == false)
-                {
-                    value |= (0xff & _buf[3]);
-                    value |= (0xff & _buf[2]) << 8;
-                    value |= (0xff & _buf[1]) << 16;
-                    value |= (0xff & _buf[0]) << 24;
-                }
-                else
-                {
-                    value |= (0xff & _buf[0]);
-                    value |= (0xff & _buf[1]) << 8;
-                    value |= (0xff & _buf[2]) << 16;
-                    value |= (0xff & _buf[3]) << 24;
-                }
-                _count += 4;
-                return value;
-            }
-            throw new System.IO.EndOfStreamException();
-        }
-
-        /// <summary>
-        /// Reads the next two bytes of this input stream as a unsigned 16-bit integer.
-        /// </summary>
-        /// <returns></returns>
-        public int ReadUint16()
-        {
-            if (_inputStream.Read(_buf, 0, 2) == 2)
-            {
-                int value = 0;
-                if (_isLittleEndian == false)
-                {
-                    value |= (0xff & _buf[1]);
-                    value |= (0xff & _buf[0]) << 8;
-                }
-                else
-                {
-                    value |= (0xff & _buf[0]);
-                    value |= (0xff & _buf[1]) << 8;
-                }
-                _count += 2;
-                return value;
-            }
-            throw new System.IO.EndOfStreamException();
-        }
-
-        /// <summary>
-        /// Reads the next four bytes of this input stream as a unsigned 32-bit integer.
-        /// </summary>
-        /// <returns></returns>
-        public long ReadUint32()
-        {
-            if (_inputStream.Read(_buf, 0, 4) == 4)
-            {
-                long value = 0;
-                if (_isLittleEndian == false)
-                {
-                    value |= (0xff & _buf[3]);
-                    value |= (0xff & _buf[2]) << 8;
-                    value |= (0xff & _buf[1]) << 16;
-                    value |= (0xff & _buf[0]) << 24;
-                }
-                else
-                {
-                    value |= (0xff & _buf[0]);
-                    value |= (0xff & _buf[1]) << 8;
-                    value |= (0xff & _buf[2]) << 16;
-                    value |= (0xff & _buf[3]) << 24;
-                }
-                _count += 4;
-                return value;
-            }
-            throw new System.IO.EndOfStreamException();
-        }
-
-        /// <summary>
-        /// Reads the next n bytes.
-        /// </summary>
-        /// <param name="n"></param>
-        /// <returns></returns>
-	    public byte[] ReadBytes(int n)
-        {
-            byte[] array = new byte[n];
-            if (_inputStream.Read(array, 0, array.Length) == n)
-            {
-                _count += n;
-                return array;
-            }
-            throw new System.IO.EndOfStreamException();
-        }
-
-
-        /// <summary>
-        /// Close the input stream.
-        /// </summary>
-        public void Close()
-        {
-            try
-            {
-                _inputStream.Close();
-            }
-            catch (System.IO.IOException ex)
-            {
-                Console.Write(ex.Message);
-            }
-        }
-
-        #endregion 
-    }
-}

+ 0 - 132
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/Properties.cs

@@ -1,132 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    public class Properties : Dictionary<string, string>
-    {
-        public void load()
-        {
-            var props = new Properties();
-            props.Add("alternative-font.\uff2d\uff33\u0020\u30b4\u30b7\u30c3\u30af", "MS Gothic");
-            props.Add("alternative-font.\uff2d\uff33\u0020\uff30\u30b4\u30b7\u30c3\u30af", "MS PGothic");
-            props.Add("alternative-font.\uff2d\uff33\u0020\u660e\u671d", "MS Mincho");
-            props.Add("alternative-font.\uff2d\uff33\u0020\uff30\u660e\u671d", "MS PMincho");
-            props.Add("alternative-font.\u30E1\u30A4\u30EA\u30AA", "Meiryo");
-
-            props.Add("font-emheight.Andalus", "0.655150351887396");
-            props.Add("font-emheight.Angsana\u0020New", "0.740285559371046");
-            props.Add("font-emheight.AngsanaUPC", "0.740285559371046");
-            props.Add("font-emheight.Aparajita", "0.846280991735537");
-            props.Add("font-emheight.Arabic\u0020Typesetting", "0.877463581833762");
-            props.Add("font-emheight.Arial", "0.895104895104895");
-            props.Add("font-emheight.Arial\u0020Black", "0.709141274238227");
-            props.Add("font-emheight.Browallia\u0020New", "0.800312622118015");
-            props.Add("font-emheight.BrowalliaUPC", "0.800312622118015");
-            props.Add("font-emheight.Calibri", "0.8192");
-            props.Add("font-emheight.Cambria", "0.852977925864223");
-            props.Add("font-emheight.Cambria\u0020Math", "0.179208960448022");
-            props.Add("font-emheight.Comic\u0020Sans\u0020MS", "0.717589348283111");
-            props.Add("font-emheight.Consolas", "0.854045037531276");
-            props.Add("font-emheight.Constantia", "0.8192");
-            props.Add("font-emheight.Corbel", "0.8192");
-            props.Add("font-emheight.Cordia\u0020New", "0.721380767876013");
-            props.Add("font-emheight.CordiaUPC", "0.721380767876013");
-            props.Add("font-emheight.Courier\u0020New", "0.882758620689655");
-            props.Add("font-emheight.DaunPenh", "0.745540589734256");
-            props.Add("font-emheight.David", "1.01637717121588");
-            props.Add("font-emheight.DejaVu\u0020Sans", "0.859060402684564");
-            props.Add("font-emheight.DejaVu\u0020Sans\u0020Mono", "0.859060402684564");
-            props.Add("font-emheight.DejaVu\u0020Serif", "0.859060402684564");
-            props.Add("font-emheight.DilleniaUPC", "0.766323666978485");
-            props.Add("font-emheight.DokChampa", "0.516259137887572");
-            props.Add("font-emheight.Dutch801\u0020SWC", "0.844187963726298");
-            props.Add("font-emheight.Ebrima", "0.751835535976505");
-            props.Add("font-emheight.Estrangelo\u0020Edessa", "0.894323144104804");
-            props.Add("font-emheight.EucrosiaUPC", "0.816912644595134");
-            props.Add("font-emheight.Euphemia", "0.761338289962825");
-            props.Add("font-emheight.Franklin\u0020Gothic\u0020Medium", "0.881998277347115");
-            props.Add("font-emheight.FrankRuehl", "1.07563025210084");
-            props.Add("font-emheight.FreesiaUPC", "0.834046019140705");
-            props.Add("font-emheight.Gabriola", "0.543236074270557");
-            props.Add("font-emheight.Gautami", "0.575928008998875");
-            props.Add("font-emheight.Gentium\u0020Basic", "0.864135021097046");
-            props.Add("font-emheight.Gentium\u0020Book\u0020Basic", "0.864135021097046");
-            props.Add("font-emheight.Georgia", "0.880103137086377");
-            props.Add("font-emheight.Gisha", "0.853333333333333");
-            props.Add("font-emheight.Impact", "0.819855884707766");
-            props.Add("font-emheight.IrisUPC", "0.790580968924918");
-            props.Add("font-emheight.Iskoola\u0020Pota", "0.880860215053763");
-            props.Add("font-emheight.JasmineUPC", "0.945958429561201");
-            props.Add("font-emheight.Kalinga", "0.673684210526316");
-            props.Add("font-emheight.Kartika", "0.701129750085587");
-            props.Add("font-emheight.Khmer\u0020UI", "0.883520276100086");
-            props.Add("font-emheight.KodchiangUPC", "1.0173869846001");
-            props.Add("font-emheight.Kokila", "0.867429055484964");
-            props.Add("font-emheight.Lao\u0020UI", "0.751835535976505");
-            props.Add("font-emheight.Latha", "0.728825622775801");
-            props.Add("font-emheight.Leelawadee", "0.836259697835851");
-            props.Add("font-emheight.Levenim\u0020MT", "0.757676655567888");
-            props.Add("font-emheight.Liberation\u0020Sans\u0020Narrow", "0.883139284174213");
-            props.Add("font-emheight.LilyUPC", "1.04944914168588");
-            props.Add("font-emheight.Lingoes\u0020Unicode", "0.746355685131195");
-            props.Add("font-emheight.Linux\u0020Biolinum\u0020G", "0.877087794432548");
-            props.Add("font-emheight.Linux\u0020Libertine\u0020G", "0.877087794432548");
-            props.Add("font-emheight.Lucida\u0020Sans\u0020Unicode", "0.650778519224658");
-            props.Add("font-emheight.Malgun\u0020Gothic", "0.751835535976505");
-            props.Add("font-emheight.Mangal", "0.595348837209302");
-            props.Add("font-emheight.Meiryo\u0020UI", "0.787389465590158");
-            props.Add("font-emheight.Microsoft\u0020JhengHei", "0.751835535976505");
-            props.Add("font-emheight.Microsoft\u0020New\u0020Tai\u0020Lue", "0.764464352370287");
-            props.Add("font-emheight.Microsoft\u0020PhagsPa", "0.781679389312977");
-            props.Add("font-emheight.Microsoft\u0020Sans\u0020Serif", "0.883520276100086");
-            props.Add("font-emheight.Microsoft\u0020Tai\u0020Le", "0.786482334869432");
-            props.Add("font-emheight.Microsoft\u0020YaHei", "0.757676655567888");
-            props.Add("font-emheight.Microsoft\u0020Yi\u0020Baiti", "0.999024390243902");
-            props.Add("font-emheight.Miriam\u0020Fixed", "1.01285855588526");
-            props.Add("font-emheight.Miriam", "0.99514091350826");
-            props.Add("font-emheight.Mongolian\u0020Baiti", "0.940312213039486");
-            props.Add("font-emheight.MoolBoran", "0.745540589734256");
-            props.Add("font-emheight.MV\u0020Boli", "0.620606060606061");
-            props.Add("font-emheight.Narkisim", "1.0123578843302");
-            props.Add("font-emheight.Nyala", "0.957009345794393");
-            props.Add("font-emheight.Palatino\u0020Linotype", "0.741223307998552");
-            props.Add("font-emheight.Plantagenet\u0020Cherokee", "0.787995382839554");
-            props.Add("font-emheight.Raavi", "0.602352941176471");
-            props.Add("font-emheight.Rod", "1.01941264310602");
-            props.Add("font-emheight.Sakkal\u0020Majalla", "0.716083916083916");
-            props.Add("font-emheight.Segoe\u0020Print", "0.573830204539087");
-            props.Add("font-emheight.Segoe\u0020Script", "0.631319358816276");
-            props.Add("font-emheight.Segoe\u0020UI", "0.751835535976505");
-            props.Add("font-emheight.Segoe\u0020UI\u0020Symbol", "0.751835535976505");
-            props.Add("font-emheight.Shonar\u0020Bangla", "0.772538664654847");
-            props.Add("font-emheight.Shruti", "0.594830090037758");
-            props.Add("font-emheight.Simplified\u0020Arabic", "0.603240058910162");
-            props.Add("font-emheight.Simplified\u0020Arabic\u0020Fixed", "0.915921288014311");
-            props.Add("font-emheight.Swiss742\u0020SWC", "0.803452334248725");
-            props.Add("font-emheight.Sylfaen", "0.759362254356693");
-            props.Add("font-emheight.Symbol", "0.816261458748505");
-            props.Add("font-emheight.Tahoma", "0.828478964401295");
-            props.Add("font-emheight.Times\u0020New\u0020Roman", "0.90299823633157");
-            props.Add("font-emheight.Traditional\u0020Arabic", "0.66906239790918");
-            props.Add("font-emheight.Trebuchet\u0020MS", "0.861227922624054");
-            props.Add("font-emheight.Tunga", "0.602352941176471");
-            props.Add("font-emheight.Utsaah", "0.893542757417103");
-            props.Add("font-emheight.Vani", "0.593795302986373");
-            props.Add("font-emheight.Verdana", "0.822820409803134");
-            props.Add("font-emheight.Vijaya", "0.993210475266731");
-            props.Add("font-emheight.Vrinda", "0.732737030411449");
-            props.Add("font-emheight.Wingdings", "0.901011878574571");
-            props.Add("font-emheight.Meiryo", "0.666666666666667");
-
-            props.Add("font-emheight.Academy\u0020Engraved\u0020LET", "0.870748299319728");
-            props.Add("font-emheight.Alma\u0020Iso", "0.997384481255449");
-            props.Add("font-emheight.Alma\u0020Large", "1.57250859106529");
-            props.Add("font-emheight.Alma\u0020Symbol", "0.997384481255449");
-            props.Add("font-emheight.AVGmdBU", "1.00986193293886");
-        }
-    }
-}

+ 0 - 271
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgBrush.cs

@@ -1,271 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - Represents a Brush SVG object.
-    /// </summary>
-    public class SvgBrush : SvgObject, Gdi.IGdiBrush
-    {
-        #region Local Variables 
-
-        private int _style;
-        private int _color;
-        private int _hatch;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object style.
-        /// </summary>
-        public int Style
-        {
-            get
-            {
-                return _style;
-            }
-        }
-
-        /// <summary>
-        /// Object color.
-        /// </summary>
-        public int Color
-        {
-            get
-            {
-                return _color;
-            }
-        }
-
-        /// <summary>
-        /// Object hatch.
-        /// </summary>
-        public int Hatch
-        {
-            get
-            {
-                return _hatch;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        /// <param name="style"></param>
-        /// <param name="color"></param>
-        /// <param name="hatch"></param>
-        public SvgBrush(
-            SvgGdi gdi,
-            int style,
-            int color,
-            int hatch)
-            : base(gdi)
-        {
-            _style = style;
-            _color = color;
-            _hatch = hatch;
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Create element FillPatern.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public System.Xml.XmlElement CreateFillPattern(string id)
-        {
-            System.Xml.XmlElement pattern = GDI.Document.CreateElement("pattern");
-
-            if (_style == (int)Gdi.BrushBSEnum.BS_HATCHED)
-            {
-                pattern.SetAttribute("id", id);
-                pattern.SetAttribute("patternUnits", "userSpaceOnUse");
-                pattern.SetAttribute("x", "" + ToRealSize(0));
-                pattern.SetAttribute("y", "" + ToRealSize(0));
-                pattern.SetAttribute("width", "" + ToRealSize(8));
-                pattern.SetAttribute("height", "" + ToRealSize(8));
-                GDI.Document.AppendChild(pattern);
-
-                if (GDI.DC.BkMode == (int)Gdi.GdiEnum.OPAQUE)
-                {
-                    System.Xml.XmlElement rect = GDI.Document.CreateElement("rect");
-                    rect.SetAttribute("fill", ToColor(GDI.DC.BkColor));
-                    rect.SetAttribute("x", "" + ToRealSize(0));
-                    rect.SetAttribute("y", "" + ToRealSize(0));
-                    rect.SetAttribute("width", "" + ToRealSize(8));
-                    rect.SetAttribute("height", "" + ToRealSize(8));
-                    pattern.AppendChild(rect);
-                }
-
-                switch (_hatch)
-                {
-                    case (int)Gdi.BrushHSEnum.HS_HORIZONTAL:
-                        {
-                            System.Xml.XmlElement path = GDI.Document.CreateElement("line");
-                            path.SetAttribute("stroke", ToColor(_color));
-                            path.SetAttribute("x1", "" + ToRealSize(0));
-                            path.SetAttribute("y1", "" + ToRealSize(4));
-                            path.SetAttribute("x2", "" + ToRealSize(8));
-                            path.SetAttribute("y2", "" + ToRealSize(4));
-                            pattern.AppendChild(path);
-                        } break;
-                    case (int)Gdi.BrushHSEnum.HS_VERTICAL:
-                        {
-                            System.Xml.XmlElement path = GDI.Document.CreateElement("line");
-                            path.SetAttribute("stroke", ToColor(_color));
-                            path.SetAttribute("x1", "" + ToRealSize(4));
-                            path.SetAttribute("y1", "" + ToRealSize(0));
-                            path.SetAttribute("x2", "" + ToRealSize(4));
-                            path.SetAttribute("y2", "" + ToRealSize(8));
-                            pattern.AppendChild(path);
-                        } break;
-                    case (int)Gdi.BrushHSEnum.HS_FDIAGONAL:
-                        {
-                            System.Xml.XmlElement path = GDI.Document.CreateElement("line");
-                            path.SetAttribute("stroke", ToColor(_color));
-                            path.SetAttribute("x1", "" + ToRealSize(0));
-                            path.SetAttribute("y1", "" + ToRealSize(0));
-                            path.SetAttribute("x2", "" + ToRealSize(8));
-                            path.SetAttribute("y2", "" + ToRealSize(8));
-                            pattern.AppendChild(path);
-                        } break;
-                    case (int)Gdi.BrushHSEnum.HS_BDIAGONAL:
-                        {
-                            System.Xml.XmlElement path = GDI.Document.CreateElement("line");
-                            path.SetAttribute("stroke", ToColor(_color));
-                            path.SetAttribute("x1", "" + ToRealSize(0));
-                            path.SetAttribute("y1", "" + ToRealSize(8));
-                            path.SetAttribute("x2", "" + ToRealSize(8));
-                            path.SetAttribute("y2", "" + ToRealSize(0));
-                            pattern.AppendChild(path);
-                        } break;
-                    case (int)Gdi.BrushHSEnum.HS_CROSS:
-                        {
-                            System.Xml.XmlElement path1 = GDI.Document.CreateElement("line");
-                            path1.SetAttribute("stroke", ToColor(_color));
-                            path1.SetAttribute("x1", "" + ToRealSize(0));
-                            path1.SetAttribute("y1", "" + ToRealSize(4));
-                            path1.SetAttribute("x2", "" + ToRealSize(8));
-                            path1.SetAttribute("y2", "" + ToRealSize(4));
-                            pattern.AppendChild(path1);
-                            System.Xml.XmlElement path2 = GDI.Document.CreateElement("line");
-                            path2.SetAttribute("stroke", ToColor(_color));
-                            path2.SetAttribute("x1", "" + ToRealSize(4));
-                            path2.SetAttribute("y1", "" + ToRealSize(0));
-                            path2.SetAttribute("x2", "" + ToRealSize(4));
-                            path2.SetAttribute("y2", "" + ToRealSize(8));
-                            pattern.AppendChild(path2);
-                        } break;
-                    case (int)Gdi.BrushHSEnum.HS_DIAGCROSS:
-                        {
-                            System.Xml.XmlElement path1 = GDI.Document.CreateElement("line");
-                            path1.SetAttribute("stroke", ToColor(_color));
-                            path1.SetAttribute("x1", "" + ToRealSize(0));
-                            path1.SetAttribute("y1", "" + ToRealSize(0));
-                            path1.SetAttribute("x2", "" + ToRealSize(8));
-                            path1.SetAttribute("y2", "" + ToRealSize(8));
-                            pattern.AppendChild(path1);
-                            System.Xml.XmlElement path2 = GDI.Document.CreateElement("line");
-                            path2.SetAttribute("stroke", ToColor(_color));
-                            path2.SetAttribute("x1", "" + ToRealSize(0));
-                            path2.SetAttribute("y1", "" + ToRealSize(8));
-                            path2.SetAttribute("x2", "" + ToRealSize(8));
-                            path2.SetAttribute("y2", "" + ToRealSize(0));
-                            pattern.AppendChild(path2);
-                        } break;
-                }
-            }
-
-            return pattern;
-        }
-
-        /// <summary>
-        /// Serves as the default hash function.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            int PRIME = 31;
-            int result = 1;
-            result = PRIME * result + _color;
-            result = PRIME * result + _hatch;
-            result = PRIME * result + _style;
-            return result;
-        }
-
-        /// <summary>
-        /// Determines whether the specified object is equal to the current object.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(Object obj)
-        {
-            if (this == obj)
-                return true;
-            if (obj == null)
-                return false;
-            if (typeof(SvgBrush) != obj.GetType())
-                return false;
-            SvgBrush other = (SvgBrush)obj;
-            if (_color != other._color)
-                return false;
-            if (_hatch != other._hatch)
-                return false;
-            if (_style != other._style)
-                return false;
-            return true;
-        }
-
-        /// <summary>
-        /// Create element inner text.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public System.Xml.XmlText CreateTextNode(string id)
-        {
-            return GDI.Document.CreateTextNode("." + id + " { " + ToString() + " }\r\n");
-        }
-
-        /// <summary>
-        /// Returns a string that represents the current object.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-
-            // fill
-            switch (_style)
-            {
-                case (int)Gdi.BrushBSEnum.BS_SOLID:
-                    buffer.Append("fill: ").Append(ToColor(_color)).Append("; ");
-                    break;
-                case (int)Gdi.BrushBSEnum.BS_HATCHED:
-                    break;
-                default:
-                    buffer.Append("fill: none; ");
-                    break;
-            }
-
-            if (buffer.Length > 0)
-                buffer.Length = buffer.Length - 1;
-            return buffer.ToString();
-        }
-
-        #endregion
-    }
-}

+ 0 - 976
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgDc.cs

@@ -1,976 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - Represents SVG document.
-    /// </summary>
-    public class SvgDc : ICloneable
-    {
-
-        #region Local Variables
-
-        private SvgGdi _gdi;
-
-        private int _dpi = 1440;
-
-        // window
-        private int _wx = 0;
-        private int _wy = 0;
-        private int _ww = 0;
-        private int _wh = 0;
-
-        // window offset
-        private int _wox = 0;
-        private int _woy = 0;
-
-        // window scale
-        private double _wsx = 1.0;
-        private double _wsy = 1.0;
-
-        // mapping scale
-        private double _mx = 1.0;
-        private double _my = 1.0;
-
-        // viewport
-        private int _vx = 0;
-        private int _vy = 0;
-        private int _vw = 0;
-        private int _vh = 0;
-
-        // viewport offset
-        private int _vox = 0;
-        private int _voy = 0;
-
-        // viewport scale
-        private double _vsx = 1.0;
-        private double _vsy = 1.0;
-
-        // current location
-        private int _cx = 0;
-        private int _cy = 0;
-
-        // clip offset
-        private int _cox = 0;
-        private int _coy = 0;
-
-        private int _mapMode = (int)Gdi.GdiEnum.MM_TEXT;
-        private int _bkColor = 0x00FFFFFF;
-        private int _bkMode = (int)Gdi.GdiEnum.OPAQUE;
-        private int _textColor = 0x00000000;
-        private int _textSpace = 0;
-        private int _textAlign = (int)Gdi.GdiEnum.TA_TOP | (int)Gdi.GdiEnum.TA_LEFT;
-        private int _textDx = 0;
-        private int _polyFillMode = (int)Gdi.GdiEnum.ALTERNATE;
-        private int _relAbsMode = 0;
-        private int _rop2Mode = (int)Gdi.GdiEnum.R2_COPYPEN;
-        private int _stretchBltMode = (int)Gdi.GdiEnum.STRETCH_ANDSCANS;
-        private long _layout = 0;
-        private long _mapperFlags = 0;
-
-        private SvgBrush _brush = null;
-        private SvgFont _font = null;
-        private SvgPen _pen = null;
-
-        private System.Xml.XmlElement _mask = null;
-
-        #endregion 
-
-        #region Properties
-
-        /// <summary>
-        /// Background color.
-        /// </summary>
-        public int BkColor
-        {
-            get
-            {
-                return _bkColor;
-            }
-            set
-            {
-                _bkColor = value;
-            }
-        }
-
-        /// <summary>
-        /// Background mode.
-        /// </summary>
-        public int BkMode
-        {
-            get
-            {
-                return _bkMode;
-            }
-            set
-            {
-                _bkColor = value;
-            }
-        }
-
-        /// <summary>
-        /// Text color.
-        /// </summary>
-        public int TextColor
-        {
-            get
-            {
-                return _textColor;
-            }
-            set
-            {
-                _textColor = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int PolyFillMode
-        {
-            get
-            {
-                return _polyFillMode;
-
-            }
-            set
-            {
-                _polyFillMode = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int RelAbs
-        {
-            get
-            {
-                return _relAbsMode;
-            }
-            set
-            {
-                _relAbsMode = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int ROP2
-        {
-            get
-            {
-                return _rop2Mode;
-            }
-            set
-            {
-                _rop2Mode = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int StretchBltMode
-        {
-            get
-            {
-                return _stretchBltMode;
-            }
-            set
-            {
-                _stretchBltMode = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int TextSpace
-        {
-            get
-            {
-                return _textSpace;
-            }
-            set
-            {
-                _textSpace = value;
-            }
-        }
-
-        /// <summary>
-        /// Text align.
-        /// </summary>
-        public int TextAlign
-        {
-            get
-            {
-                return _textAlign;
-            }
-            set
-            {
-                _textAlign = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int TextCharacterExtra
-        {
-            get
-            {
-                return _textDx;
-            }
-            set
-            {
-                _textDx = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public long Layout
-        {
-            get
-            {
-                return _layout;
-            }
-            set
-            {
-                _layout = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public long MapperFlags
-        {
-            get
-            {
-                return _mapperFlags;
-            }
-            set
-            {
-                _mapperFlags = value;
-            }
-        }
-
-        /// <summary>
-        /// Brush instance.
-        /// </summary>
-        public SvgBrush Brush
-        {
-            get
-            {
-                return _brush;
-            }
-            set
-            {
-                _brush = value;
-            }
-        }
-
-        /// <summary>
-        /// Font instance.
-        /// </summary>
-        public SvgFont Font
-        {
-            get
-            {
-                return _font;
-            }
-            set
-            {
-                _font = value;
-            }
-        }
-
-        /// <summary>
-        /// Pen instance.
-        /// </summary>
-        public SvgPen Pen
-        {
-            get
-            {
-                return _pen;
-            }
-            set
-            {
-                _pen = value;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public System.Xml.XmlElement Mask
-        {
-            get
-            {
-                return _mask;
-            }
-            set
-            {
-                _mask = value;
-            }
-        }
-
-        /// <summary>
-        /// Current X Point.
-        /// </summary>
-        public int CurrentX
-        {
-            get
-            {
-                return _cx;
-            }
-        }
-
-        /// <summary>
-        /// Current Y Point.
-        /// </summary>
-        public int CurrentY
-        {
-            get
-            {
-                return _cy;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int OffsetClipX
-        {
-            get
-            {
-                return _cox;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int OffsetClipY
-        {
-            get
-            {
-                return _coy;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int MapMode
-        {
-            get
-            {
-                return _mapMode;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int Dpi
-        {
-            get
-            {
-                return _dpi;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int WindowX
-        {
-            get
-            {
-                return _wx;
-            }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int WindowY
-        {
-            get
-            {
-                return _wy;
-            }
-        }
-
-        /// <summary>
-        /// Represents window width.
-        /// </summary>
-        public int WindowWidth
-        {
-            get
-            {
-                return _ww;
-            }
-        }
-
-        /// <summary>
-        /// Represents window height.
-        /// </summary>
-        public int WindowHeight
-        {
-            get
-            {
-                return _wh;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default Constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        public SvgDc(SvgGdi gdi)
-        {
-            _gdi = gdi;
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Specifies which window point maps to the viewport origin (0,0).
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        public void SetWindowOrgEx(int x, int y, WMFConverter.Gdi.Point old)
-        {
-            if (old != null)
-            {
-                old.X = _wx;
-                old.Y = _wy;
-            }
-            _wx = x;
-            _wy = y;
-        }
-
-        /// <summary>
-        /// Sets the horizontal and vertical extents of the window for a device context by using the specified values.
-        /// </summary>
-        /// <param name="width"></param>
-        /// <param name="height"></param>
-        /// <param name="old"></param>
-        public void SetWindowExtEx(int width, int height, WMFConverter.Gdi.Size old)
-        {
-            if (old != null)
-            {
-                old.Width = _ww;
-                old.Height = _wh;
-            }
-            _ww = width;
-            _wh = height;
-        }
-
-        /// <summary>
-        /// Modifies the window origin for a device context using the specified horizontal and vertical offsets.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        public void OffSetWindowOrgEx(int x, int y, WMFConverter.Gdi.Point old)
-        {
-            if (old != null)
-            {
-                old.X = _wox;
-                old.Y = _woy;
-            }
-            _wox += x;
-            _woy += y;
-        }
-
-        /// <summary>
-        /// Modifies the window for a device context using the ratios formed by the specified multiplicands and divisors.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="xd"></param>
-        /// <param name="y"></param>
-        /// <param name="yd"></param>
-        /// <param name="old"></param>
-        public void ScaleWindowExtEx(int x, int xd, int y, int yd, WMFConverter.Gdi.Size old)
-        {
-            // TODO
-            _wsx = (_wsx * x) / xd;
-            _wsy = (_wsy * y) / yd;
-        }
-
-        /// <summary>
-        /// Specifies which device point maps to the window origin (0,0).
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        public void SetViewportOrgEx(int x, int y, WMFConverter.Gdi.Point old)
-        {
-            if (old != null)
-            {
-                old.X = _vx;
-                old.Y = _vy;
-            }
-            _vx = x;
-            _vy = y;
-        }
-
-        /// <summary>
-        /// Sets the horizontal and vertical extents of the viewport for a device context by using the specified values.
-        /// </summary>
-        /// <param name="width"></param>
-        /// <param name="height"></param>
-        /// <param name="old"></param>
-        public void SetViewportExtEx(int width, int height, WMFConverter.Gdi.Size old)
-        {
-            if (old != null)
-            {
-                old.Width = _vw;
-                old.Height = _vh;
-            }
-            _vw = width;
-            _vh = height;
-        }
-
-        /// <summary>
-        /// Modifies the viewport origin for a device context using the specified horizontal and vertical offsets.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        public void OffSetViewportOrgEx(int x, int y, WMFConverter.Gdi.Point old)
-        {
-            if (old != null)
-            {
-                old.X = _vox;
-                old.Y = _voy;
-            }
-            _vox = x;
-            _voy = y;
-        }
-
-        /// <summary>
-        /// Modifies the viewport for a device context using the ratios formed by the specified multiplicands and divisors.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="xd"></param>
-        /// <param name="y"></param>
-        /// <param name="yd"></param>
-        /// <param name="old"></param>
-        public void ScaleViewportExtEx(int x, int xd, int y, int yd, WMFConverter.Gdi.Size old)
-        {
-            // TODO
-            _vsx = (_vsx * x) / xd;
-            _vsy = (_vsy * y) / yd;
-        }
-
-        /// <summary>
-        /// Moves the clipping region of a device context by the specified offsets.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        public void OffSetClipRgn(int x, int y)
-        {
-            _cox = x;
-            _coy = y;
-        }
-
-        /// <summary>
-        /// Sets the mapping mode of the specified device context. 
-        /// The mapping mode defines the unit of measure used to transform page-space units into device-space units, and also defines the orientation of the device's x and y axes.
-        /// </summary>
-        /// <param name="mode"></param>
-        public void SetMapMode(int mode)
-        {
-            _mapMode = mode;
-            switch (mode)
-            {
-                case (int)Gdi.GdiEnum.MM_HIENGLISH:
-                    _mx = 0.09;
-                    _my = -0.09;
-                    break;
-                case (int)Gdi.GdiEnum.MM_LOENGLISH:
-                    _mx = 0.9;
-                    _my = -0.9;
-                    break;
-                case (int)Gdi.GdiEnum.MM_HIMETRIC:
-                    _mx = 0.03543307;
-                    _my = -0.03543307;
-                    break;
-                case (int)Gdi.GdiEnum.MM_LOMETRIC:
-                    _mx = 0.3543307;
-                    _my = -0.3543307;
-                    break;
-                case (int)Gdi.GdiEnum.MM_TWIPS:
-                    _mx = 0.0625;
-                    _my = -0.0625;
-                    break;
-                default:
-                    _mx = 1.0;
-                    _my = 1.0;
-                    break;
-            }
-        }
-
-        /// <summary>
-        /// Updates the current position to the specified point and optionally returns the previous position.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <param name="old"></param>
-        public void MoveToEx(int x, int y, WMFConverter.Gdi.Point old)
-        {
-            if (old != null)
-            {
-                old.X = _cx;
-                old.Y = _cy;
-            }
-            _cx = x;
-            _cy = y;
-        }
-
-        /// <summary>
-        /// Return the absolute X position from x point.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <returns></returns>
-        public double ToAbsoluteX(double x)
-        {
-            // TODO Handle Viewport
-            return ((_ww >= 0) ? 1 : -1) * (_mx * x - (_wx + _wox)) / _wsx;
-        }
-
-        /// <summary>
-        /// Return the absolute Y position from y point.
-        /// </summary>
-        /// <param name="y"></param>
-        /// <returns></returns>
-        public double ToAbsoluteY(double y)
-        {
-            // TODO Handle Viewport
-            return ((_wh >= 0) ? 1 : -1) * (_my * y - (_wy + _woy)) / _wsy;
-        }
-
-        /// <summary>
-        /// Return the relative X position from x point.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <returns></returns>
-        public double ToRelativeX(double x)
-        {
-            // TODO Handle Viewport
-            return ((_ww >= 0) ? 1 : -1) * (_mx * x) / _wsx;
-        }
-
-        /// <summary>
-        /// Return the relative Y position from y point.
-        /// </summary>
-        /// <param name="y"></param>
-        /// <returns></returns>
-        public double ToRelativeY(double y)
-        {
-            // TODO Handle Viewport
-            return ((_wh >= 0) ? 1 : -1) * (_my * y) / _wsy;
-        }
-
-        /// <summary>
-        /// Define Dpi value
-        /// </summary>
-        /// <param name="dpi"></param>
-        public void SetDpi(int dpi)
-        {
-            _dpi = (dpi > 0) ? dpi : 1440;
-        }
-
-        
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="rop"></param>
-        /// <returns></returns>
-        public string GetRopFilter(long rop)
-        {
-            string name = null;
-            System.Xml.XmlDocument doc = _gdi.Document;
-            
-            if (rop == (int)Gdi.GdiEnum.BLACKNESS)
-            {
-                name = "BLACKNESS_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.setIdAttribute("id", true);
-
-                    System.Xml.XmlElement feColorMatrix = doc.CreateElement("feColorMatrix");
-                    feColorMatrix.SetAttribute("type", "matrix");
-                    feColorMatrix.SetAttribute("in", "SourceGraphic");
-                    feColorMatrix.SetAttribute("values", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0");
-                    filter.AppendChild(feColorMatrix);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.NOTSRCERASE)
-            {
-                name = "NOTSRCERASE_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.setIdAttribute("id", true);
-
-                    System.Xml.XmlElement feComposite = doc.CreateElement("feComposite");
-                    feComposite.SetAttribute("in", "SourceGraphic");
-                    feComposite.SetAttribute("in2", "BackgroundImage");
-                    feComposite.SetAttribute("operator", "arithmetic");
-                    feComposite.SetAttribute("k1", "1");
-                    feComposite.SetAttribute("result", "result0");
-                    filter.AppendChild(feComposite);
-
-                    System.Xml.XmlElement feColorMatrix = doc.CreateElement("feColorMatrix");
-                    feColorMatrix.SetAttribute("in", "result0");
-                    feColorMatrix.SetAttribute("values", "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0");
-                    filter.AppendChild(feColorMatrix);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.NOTSRCCOPY)
-            {
-                name = "NOTSRCCOPY_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.setIdAttribute("id", true);
-
-                    System.Xml.XmlElement feColorMatrix = doc.CreateElement("feColorMatrix");
-                    feColorMatrix.SetAttribute("type", "matrix");
-                    feColorMatrix.SetAttribute("in", "SourceGraphic");
-                    feColorMatrix.SetAttribute("values", "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0");
-                    filter.AppendChild(feColorMatrix);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.SRCERASE)
-            {
-                name = "SRCERASE_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.setIdAttribute("id", true);
-
-                    System.Xml.XmlElement feColorMatrix = doc.CreateElement("feColorMatrix");
-                    feColorMatrix.SetAttribute("type", "matrix");
-                    feColorMatrix.SetAttribute("in", "BackgroundImage");
-                    feColorMatrix.SetAttribute("values", "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0");
-                    feColorMatrix.SetAttribute("result", "result0");
-                    filter.AppendChild(feColorMatrix);
-
-                    System.Xml.XmlElement feComposite = doc.CreateElement("feComposite");
-                    feComposite.SetAttribute("in", "SourceGraphic");
-                    feComposite.SetAttribute("in2", "result0");
-                    feComposite.SetAttribute("operator", "arithmetic");
-                    feComposite.SetAttribute("k2", "1");
-                    feComposite.SetAttribute("k3", "1");
-                    filter.AppendChild(feComposite);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.PATINVERT)
-            {
-                // TODO
-            }
-            else if (rop == (int)Gdi.GdiEnum.SRCINVERT)
-            {
-                // TODO
-            }
-            else if (rop == (int)Gdi.GdiEnum.DSTINVERT)
-            {
-                name = "DSTINVERT_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.SetIdAttribute("id", true);
-
-                    System.Xml.XmlElement feColorMatrix = doc.CreateElement("feColorMatrix");
-                    feColorMatrix.SetAttribute("type", "matrix");
-                    feColorMatrix.SetAttribute("in", "BackgroundImage");
-                    feColorMatrix.SetAttribute("values", "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0");
-                    filter.AppendChild(feColorMatrix);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.SRCAND)
-            {
-                name = "SRCAND_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.setIdAttribute("id", true);
-
-                    System.Xml.XmlElement feComposite = doc.CreateElement("feComposite");
-                    feComposite.SetAttribute("in", "SourceGraphic");
-                    feComposite.SetAttribute("in2", "BackgroundImage");
-                    feComposite.SetAttribute("operator", "arithmetic");
-                    feComposite.SetAttribute("k1", "1");
-                    filter.AppendChild(feComposite);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.MERGEPAINT)
-            {
-                name = "MERGEPAINT_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.setIdAttribute("id", true);
-
-                    System.Xml.XmlElement feColorMatrix = doc.CreateElement("feColorMatrix");
-                    feColorMatrix.SetAttribute("type", "matrix");
-                    feColorMatrix.SetAttribute("in", "SourceGraphic");
-                    feColorMatrix.SetAttribute("values", "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0");
-                    feColorMatrix.SetAttribute("result", "result0");
-                    filter.AppendChild(feColorMatrix);
-
-                    System.Xml.XmlElement feComposite = doc.CreateElement("feComposite");
-                    feComposite.SetAttribute("in", "result0");
-                    feComposite.SetAttribute("in2", "BackgroundImage");
-                    feComposite.SetAttribute("operator", "arithmetic");
-                    feComposite.SetAttribute("k1", "1");
-                    filter.AppendChild(feComposite);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.MERGECOPY)
-            {
-                // TODO
-            }
-            else if (rop == (int)Gdi.GdiEnum.SRCPAINT)
-            {
-                name = "SRCPAINT_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.setIdAttribute("id", true);
-
-                    System.Xml.XmlElement feComposite = doc.CreateElement("feComposite");
-                    feComposite.SetAttribute("in", "SourceGraphic");
-                    feComposite.SetAttribute("in2", "BackgroundImage");
-                    feComposite.SetAttribute("operator", "arithmetic");
-                    feComposite.SetAttribute("k2", "1");
-                    feComposite.SetAttribute("k3", "1");
-                    filter.AppendChild(feComposite);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-            else if (rop == (int)Gdi.GdiEnum.PATCOPY)
-            {
-                // TODO
-            }
-            else if (rop == (int)Gdi.GdiEnum.PATPAINT)
-            {
-                // TODO
-            }
-            else if (rop == (int)Gdi.GdiEnum.WHITENESS)
-            {
-                name = "WHITENESS_FILTER";
-                System.Xml.XmlElement filter = doc.GetElementById(name);
-                if (filter == null)
-                {
-                    filter = _gdi.Document.CreateElement("filter");
-                    filter.SetAttribute("id", name);
-                    //filter.SetIdAttribute("id", true);
-
-                    System.Xml.XmlElement feColorMatrix = doc.CreateElement("feColorMatrix");
-                    feColorMatrix.SetAttribute("type", "matrix");
-                    feColorMatrix.SetAttribute("in", "SourceGraphic");
-                    feColorMatrix.SetAttribute("values", "1 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0");
-                    filter.AppendChild(feColorMatrix);
-
-                    _gdi.DefsElement.AppendChild(filter);
-                }
-            }
-
-            if (name != null)
-            {
-                if (!doc.DocumentElement.HasAttribute("enable-background"))
-                {
-                    doc.DocumentElement.SetAttribute("enable-background", "new");
-                }
-                return "url(#" + name + ")";
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Clone this object.
-        /// </summary>
-        /// <returns></returns>
-        public object Clone()
-        {
-            return this.Clone();
-        }
-
-        /// <summary>
-        /// Returns a string that represents the current object.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "SvgDc [gdi=" + _gdi + ", dpi=" + _dpi + ", wx=" + _wx + ", wy="
-                    + _wy + ", ww=" + _ww + ", wh=" + _wh + ", wox=" + _wox + ", woy="
-                    + _woy + ", wsx=" + _wsx + ", wsy=" + _wsy + ", mx=" + _mx
-                    + ", my=" + _my + ", vx=" + _vx + ", vy=" + _vy + ", vw=" + _vw
-                    + ", vh=" + _vh + ", vox=" + _vox + ", voy=" + _voy + ", vsx="
-                    + _vsx + ", vsy=" + _vsy + ", cx=" + _cx + ", cy=" + _cy
-                    + ", mapMode=" + _mapMode + ", bkColor=" + _bkColor + ", bkMode="
-                    + _bkMode + ", textColor=" + _textColor + ", textSpace="
-                    + _textSpace + ", textAlign=" + _textAlign + ", textDx=" + _textDx
-                    + ", polyFillMode=" + _polyFillMode + ", relAbsMode="
-                    + _relAbsMode + ", rop2Mode=" + _rop2Mode + ", stretchBltMode="
-                    + _stretchBltMode + ", brush=" + _brush + ", font=" + _font
-                    + ", pen=" + _pen + "]";
-        }
-
-        #endregion
-    }
-}

+ 0 - 532
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgFont.cs

@@ -1,532 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - Represents a SVG Font object.
-    /// </summary>
-    public class SvgFont : SvgObject,Gdi.IGdiFont
-    {
-        #region Properties
-
-        /// <summary>
-        /// Object height.
-        /// </summary>
-        public int Height
-        {
-            get
-            {
-                return _height;
-            }
-        }
-
-        /// <summary>
-        /// Object width.
-        /// </summary>
-        public int Width
-        {
-            get
-            {
-                return _width;
-            }
-        }
-
-        /// <summary>
-        /// Object escapement.
-        /// </summary>
-        public int Escapement
-        {
-            get
-            {
-                return _escapement;
-            }
-        }
-
-        /// <summary>
-        /// Object orientation
-        /// </summary>
-        public int Orientation
-        {
-            get
-            {
-                return _orientation;
-            }
-        }
-
-        /// <summary>
-        /// Object weight.
-        /// </summary>
-        public int Weight
-        {
-            get
-            {
-                return _weight;
-            }
-        }
-
-        /// <summary>
-        /// Italic font.
-        /// </summary>
-        public bool IsItalic
-        {
-            get
-            {
-                return _italic;
-            }
-        }
-
-        /// <summary>
-        /// Underlined font.
-        /// </summary>
-        public bool IsUnderlined
-        {
-            get
-            {
-                return _underline;
-            }
-        }
-
-        /// <summary>
-        /// Striked font.
-        /// </summary>
-        public bool IsStrikedOut
-        {
-            get
-            {
-                return _strikeout;
-            }
-        }
-
-        /// <summary>
-        /// Object charset.
-        /// </summary>
-        public int Charset
-        {
-            get
-            {
-                return _charset;
-            }
-        }
-
-        /// <summary>
-        /// Object precision.
-        /// </summary>
-        public int OutPrecision
-        {
-            get
-            {
-                return _outPrecision;
-            }
-        }
-
-        /// <summary>
-        /// Object ClipPrecision.
-        /// </summary>
-        public int ClipPrecision
-        {
-            get
-            {
-                return _clipPrecision;
-            }
-        }
-
-        /// <summary>
-        /// Font quality.
-        /// </summary>
-        public int Quality
-        {
-            get
-            {
-                return _quality;
-            }
-        }
-
-        /// <summary>
-        /// Defines pitch and family.
-        /// </summary>
-        public int PitchAndFamily
-        {
-            get
-            {
-                return _pitchAndFamily;
-            }
-        }
-
-        /// <summary>
-        /// Specifies the font name.
-        /// </summary>
-        public string FaceName
-        {
-            get
-            {
-                return _faceName;
-            }
-        }
-
-        /// <summary>
-        /// Font language.
-        /// </summary>
-        public string Lang
-        {
-            get
-            {
-                return _lang;
-            }
-        }
-        
-        /// <summary>
-        /// Font size.
-        /// </summary>
-        public int FontSize
-        {
-            get
-            {
-                return Math.Abs((int)GDI.DC.ToRelativeY(_height * _heightMultiply));
-            }
-        }
-
-        #endregion
-
-        #region Local Variables
-
-        private int _height;
-        private int _width;
-        private int _escapement;
-        private int _orientation;
-        private int _weight;
-        private bool _italic;
-        private bool _underline;
-        private bool _strikeout;
-        private int _charset;
-        private int _outPrecision;
-        private int _clipPrecision;
-        private int _quality;
-        private int _pitchAndFamily;
-
-        private string _faceName;
-        private double _heightMultiply = 1.0;
-        private string _lang;
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default Constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        /// <param name="height"></param>
-        /// <param name="width"></param>
-        /// <param name="escapement"></param>
-        /// <param name="orientation"></param>
-        /// <param name="weight"></param>
-        /// <param name="italic"></param>
-        /// <param name="underline"></param>
-        /// <param name="strikeout"></param>
-        /// <param name="charset"></param>
-        /// <param name="outPrecision"></param>
-        /// <param name="clipPrecision"></param>
-        /// <param name="quality"></param>
-        /// <param name="pitchAndFamily"></param>
-        /// <param name="faceName"></param>
-        public SvgFont(
-            SvgGdi gdi,
-            int height,
-            int width,
-            int escapement,
-            int orientation,
-            int weight,
-            bool italic,
-            bool underline,
-            bool strikeout,
-            int charset,
-            int outPrecision,
-            int clipPrecision,
-            int quality,
-            int pitchAndFamily,
-            byte[] faceName)
-            : base (gdi)
-        {
-            _height = height;
-            _width = width;
-            _escapement = escapement;
-            _orientation = orientation;
-            _weight = weight;
-            _italic = italic;
-            _underline = underline;
-            _strikeout = strikeout;
-            _charset = charset;
-            _outPrecision = outPrecision;
-            _clipPrecision = clipPrecision;
-            _quality = quality;
-            _pitchAndFamily = pitchAndFamily;
-            _faceName = WMFConverter.Gdi.GdiUtils.ConvertString(faceName, charset);
-
-            // xml:lang
-            _lang = WMFConverter.Gdi.GdiUtils.GetLanguage(charset);
-
-            string emheight = gdi.GetProperty("font-emheight." + _faceName);
-            if (emheight == null)
-            {
-                string alter = gdi.GetProperty("alternative-font." + _faceName);
-                if (alter != null)
-                {
-                    emheight = gdi.GetProperty("font-emheight." + alter);
-                }
-            }
-
-            if (emheight != null)
-            {
-                _heightMultiply = Convert.ToDouble(emheight);
-            }
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="chars"></param>
-        /// <param name="dx"></param>
-        /// <returns></returns>
-        public int[] ValidateDx(byte[] chars, int[] dx)
-        {
-            if (dx == null || dx.Length == 0)
-            {
-                return null;
-            }
-
-            int[,] area = WMFConverter.Gdi.GdiUtils.GetFirstByteArea(_charset);
-            if (area == null)
-            {
-                return dx;
-            }
-
-            int n = 0;
-            bool skip = false;
-
-            for (int i = 0; i < chars.Length && i < dx.Length; i++)
-            {
-                int c = (0xFF & chars[i]);
-
-                if (skip)
-                {
-                    dx[n - 1] += dx[i];
-                    skip = false;
-                    continue;
-                }
-
-                for (int j = 0; j < area.Length; j++)
-                {
-                    if (area[j,0] <= c && c <= area[j,1])
-                    {
-                        skip = true;
-                        break;
-                    }
-                }
-
-                dx[n++] = dx[i];
-            }
-
-            int[] ndx = new int[n];
-            Array.Copy(dx, 0, ndx, 0, n);
-
-            return ndx;
-        }
-
-        /// <summary>
-        /// Serves as the default hash function.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode() 
-        {
-		    int PRIME = 31;
-		    int result = 1;
-		    result = PRIME * result + _charset;
-		    result = PRIME * result + _clipPrecision;
-		    result = PRIME * result + _escapement;
-		    result = PRIME * result + ((_faceName == null) ? 0 : _faceName.GetHashCode());
-		    result = PRIME * result + _height;
-		    result = PRIME * result + (_italic ? 1231 : 1237);
-		    result = PRIME * result + _orientation;
-		    result = PRIME * result + _outPrecision;
-		    result = PRIME * result + _pitchAndFamily;
-		    result = PRIME * result + _quality;
-		    result = PRIME * result + (_strikeout ? 1231 : 1237);
-		    result = PRIME * result + (_underline ? 1231 : 1237);
-		    result = PRIME * result + _weight;
-		    result = PRIME * result + _width;
-		    return result;
-	    }
-
-        /// <summary>
-        /// Determines whether the specified object is equal to the current object.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(Object obj) 
-        {
-		    if (this == obj)
-			    return true;
-		    if (obj == null)
-			    return false;
-		    if (typeof(SvgFont) != obj.GetType())
-			    return false;
-		    SvgFont other = (SvgFont) obj;
-		    if (_charset != other._charset)
-			    return false;
-		    if (_clipPrecision != other._clipPrecision)
-			    return false;
-		    if (_escapement != other._escapement)
-			    return false;
-		    if (_faceName == null) 
-            {
-			    if (other._faceName != null)
-				    return false;
-		    } 
-            else if (!_faceName.Equals(other._faceName))
-			    return false;
-		    if (_height != other._height)
-			    return false;
-		    if (_italic != other._italic)
-			    return false;
-		    if (_orientation != other._orientation)
-			    return false;
-		    if (_outPrecision != other._outPrecision)
-			    return false;
-		    if (_pitchAndFamily != other._pitchAndFamily)
-			    return false;
-		    if (_quality != other._quality)
-			    return false;
-		    if (_strikeout != other._strikeout)
-			    return false;
-		    if (_underline != other._underline)
-			    return false;
-		    if (_weight != other._weight)
-			    return false;
-		    if (_width != other._width)
-			    return false;
-		    return true;
-	    }
-
-        /// <summary>
-        /// Create inner text element.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public System.Xml.XmlText CreateTextNode(string id)
-        {
-            return GDI.Document.CreateTextNode("." + id + " { " + ToString() + " }\r\n");
-        }
-
-        /// <summary>
-        /// Returns a string that represents the current object.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-
-            // font-style
-            if (_italic)
-                buffer.Append("font-style: italic; ");
-
-            // font-weight
-            if (_weight != (int)Gdi.FontFWEnum.FW_DONTCARE && _weight != (int)Gdi.FontFWEnum.FW_NORMAL)
-            {
-                if (_weight < 100)
-                    _weight = 100;
-                else if (_weight > 900)
-                    _weight = 900;
-                else
-                    _weight = (_weight / 100) * 100;
-
-                if (_weight == (int)Gdi.FontFWEnum.FW_BOLD)
-                    buffer.Append("font-weight: bold; ");
-                else
-                    buffer.Append("font-weight: " + _weight + "; ");
-            }
-
-            int fontSize = FontSize;
-            if (fontSize != 0) 
-                buffer.Append("font-size: ").Append(fontSize).Append("px; ");
-
-            // font-family
-            List<string> fontList = new List<string>();
-            if (_faceName.Length != 0)
-            {
-                string fontFamily = _faceName;
-                if (_faceName.ElementAt(0) == '@') fontFamily = _faceName.Substring(1);
-                fontList.Add(fontFamily);
-
-                string altfont = GDI.GetProperty("alternative-font." + fontFamily);
-                if (altfont != null && altfont.Length != 0)
-                {
-                    fontList.Add(altfont);
-                }
-            }
-
-            // int pitch = pitchAndFamily & 0x00000003;
-            int family = _pitchAndFamily & 0x000000F0;
-            switch (family)
-            {
-                case (int)Gdi.FontFFEnum.FF_DECORATIVE:
-                    fontList.Add("fantasy");
-                    break;
-                case (int)Gdi.FontFFEnum.FF_MODERN:
-                    fontList.Add("monospace");
-                    break;
-                case (int)Gdi.FontFFEnum.FF_ROMAN:
-                    fontList.Add("serif");
-                    break;
-                case (int)Gdi.FontFFEnum.FF_SCRIPT:
-                    fontList.Add("cursive");
-                    break;
-                case (int)Gdi.FontFFEnum.FF_SWISS:
-                    fontList.Add("sans-serif");
-                    break;
-            }
-
-            if (fontList != null)
-                if (fontList.Count()>0)
-                {
-                    buffer.Append("font-family:");
-                    for (int i = 0; i < fontList.Count(); i ++ )
-                    {
-                        string font = fontList[i];
-                        if (font.IndexOf(" ") != -1)
-                            buffer.Append(" \"" + font + "\"");
-                        else
-                            buffer.Append(" " + font);
-
-                        if (i < fontList.Count())
-                            buffer.Append(",");
-                    }
-                    buffer.Append("; ");
-                }
-
-            // text-decoration
-            if (_underline || _strikeout)
-            {
-                buffer.Append("text-decoration:");
-                if (_underline)
-                    buffer.Append(" underline");
-                if (_strikeout)
-                    buffer.Append(" overline");
-                buffer.Append("; ");
-            }
-
-            if (buffer.Length > 0) 
-                buffer.Length = buffer.Length - 1;
-            return buffer.ToString();
-        }
-
-        #endregion
-    }
-}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 2292
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgGdi.cs


+ 0 - 77
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgObject.cs

@@ -1,77 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - SVG base object.
-    /// </summary>
-    public abstract class SvgObject
-    {
-        #region Local Variables
-
-        private SvgGdi _gdi;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Gdi object instance.
-        /// </summary>
-        /// <returns></returns>
-        public SvgGdi GDI
-        {
-            get
-            {
-                return _gdi;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        public SvgObject(SvgGdi gdi)
-        {
-            _gdi = gdi;
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Convert to real size.
-        /// </summary>
-        /// <param name="px"></param>
-        /// <returns></returns>
-        public int ToRealSize(int px)
-        {
-            return GDI.DC.Dpi * px / 90;
-        }
-
-        /// <summary>
-        /// Convert int color to rgb color.
-        /// </summary>
-        /// <param name="color"></param>
-        /// <returns></returns>
-        public static string ToColor(int color)
-        {
-            int b = (0x00FF0000 & color) >> 16;
-            int g = (0x0000FF00 & color) >> 8;
-            int r = (0x000000FF & color);
-
-            return "rgb(" + r + "," + g + "," + b + ")";
-        }
-
-        #endregion
-    }
-}

+ 0 - 67
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgPalette.cs

@@ -1,67 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - Represents a SVG Palette object.
-    /// </summary>
-    public class SvgPalette: SvgObject, Gdi.IGdiPalette
-    {
-        #region Local Variables
-
-        private int _version;
-        private int[] _entries;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object version.
-        /// </summary>
-        public int Version
-        {
-            get
-            {
-                return _version;
-            }
-        }
-
-        /// <summary>
-        /// Object entries.
-        /// </summary>
-        public int[] Entries
-        {
-            get
-            {
-                return _entries;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        /// <param name="version"></param>
-        /// <param name="entries"></param>
-        public SvgPalette(
-            SvgGdi gdi,
-            int version,
-            int[] entries)
-            :base(gdi)
-        {
-            _version = version;
-            _entries = entries;
-        }
-
-        #endregion
-    }
-}

+ 0 - 50
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgPatternBrush.cs

@@ -1,50 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - Represents a SVG Pattern Brush object.
-    /// </summary>
-    public class SvgPatternBrush : SvgObject, Gdi.IGdiPatternBrush
-    {
-        #region Local Variables
-
-        private byte[] _bmp;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object patterns
-        /// </summary>
-        public byte[] Pattern
-        {
-            get
-            {
-                return _bmp;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        /// <param name="bmp"></param>
-        public SvgPatternBrush(SvgGdi gdi, byte[] bmp)
-            : base(gdi)
-        {
-            _bmp = bmp;
-        }
-
-        #endregion
-    }
-}

+ 0 - 205
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgPen.cs

@@ -1,205 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - Represents a Pen object.
-    /// </summary>
-    public class SvgPen: SvgObject,Gdi.IGdiPen
-    {
-        #region Local Variables
-
-        private int _style;
-        private int _width;
-        private int _color;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object style.
-        /// </summary>
-        public int Style
-        {
-            get
-            {
-                return _style;
-            }
-        }
-
-        /// <summary>
-        /// Object width.
-        /// </summary>
-        public int Width
-        {
-            get
-            {
-                return _width;
-            }
-        }
-
-        /// <summary>
-        /// Object color.
-        /// </summary>
-        public int Color
-        {
-            get
-            {
-                return _color;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Construdor padrão.
-        /// </summary>
-        /// <param name="gdi"></param>
-        /// <param name="style"></param>
-        /// <param name="width"></param>
-        /// <param name="color"></param>
-        public SvgPen(
-            SvgGdi gdi,
-            int style,
-            int width,
-            int color)
-            :base(gdi)
-        {
-            _style = style;
-            _width = (width > 0) ? width : 1;
-            _color = color;
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Serves as the default hash function.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode() 
-        {
-		    int PRIME = 31;
-		    int result = 1;
-		    result = PRIME * result + _color;
-		    result = PRIME * result + _style;
-		    result = PRIME * result + _width;
-		    return result;
-	    }
-
-        /// <summary>
-        /// Determines whether the specified object is equal to the current object.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(Object obj) 
-        {
-		    if (this == obj)
-			    return true;
-		    if (obj == null)
-			    return false;
-		    if (typeof(SvgPen) != obj.GetType())
-			    return false;
-		    SvgPen other = (SvgPen) obj;
-		    if (_color != other._color)
-			    return false;
-		    if (_style != other._style)
-			    return false;
-		    if (_width != other._width)
-			    return false;
-		    return true;
-	    }
-
-        /// <summary>
-        /// Create inner text element.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public System.Xml.XmlText CreateTextNode(String id)
-        {
-            return GDI.Document.CreateTextNode("." + id + " { " + ToString() + " }\r\n");
-        }
-
-        /// <summary>
-        /// Returns a string that represents the current object.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-
-            if (_style == (int)Gdi.PenPSEnum.PS_NULL)
-            {
-                buffer.Append("stroke: none; ");
-            }
-            else
-            {
-                // stroke
-                buffer.Append("stroke: " + ToColor(_color) + "; ");
-
-                // stroke-width
-                buffer.Append("stroke-width: " + _width + "; ");
-
-                // stroke-linejoin
-                buffer.Append("stroke-linejoin: round; ");
-
-                // stroke-dasharray
-                if (_width == 1 && (int)Gdi.PenPSEnum.PS_DASH <= _style && _style <= (int)Gdi.PenPSEnum.PS_DASHDOTDOT)
-                {
-                    buffer.Append("stroke-dasharray: ");
-                    switch (_style)
-                    {
-                        case (int)Gdi.PenPSEnum.PS_DASH:
-                            buffer.Append(
-                                "" + ToRealSize(18) + "," + ToRealSize(6));
-                            break;
-                        case (int)Gdi.PenPSEnum.PS_DOT:
-                            buffer.Append("" + ToRealSize(3) + "," + ToRealSize(3));
-                            break;
-                        case (int)Gdi.PenPSEnum.PS_DASHDOT:
-                            buffer.Append(
-                                ""
-                                    + ToRealSize(9)
-                                    + ","
-                                    + ToRealSize(3)
-                                    + ","
-                                    + ToRealSize(3)
-                                    + ","
-                                    + ToRealSize(3));
-                            break;
-                        case (int)Gdi.PenPSEnum.PS_DASHDOTDOT:
-                            buffer.Append(
-                                ""
-                                    + ToRealSize(9)
-                                    + ","
-                                    + ToRealSize(3)
-                                    + ","
-                                    + ToRealSize(3)
-                                    + ","
-                                    + ToRealSize(3)
-                                    + ","
-                                    + ToRealSize(3)
-                                    + ","
-                                    + ToRealSize(3));
-                            break;
-                    }
-                    buffer.Append("; ");
-                }
-            }
-
-            if (buffer.Length > 0) 
-                buffer.Length = buffer.Length - 1;
-            return buffer.ToString();
-        }
-
-        #endregion
-    }
-}

+ 0 - 149
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgRectRegion.cs

@@ -1,149 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// Scalable Vector Graphics - Represents SVG Rect Region object.
-    /// </summary>
-    public class SvgRectRegion : SvgRegion
-    {
-        #region Local Variables
-
-        private int _left;
-        private int _top;
-        private int _right;
-        private int _bottom;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Left value.
-        /// </summary>
-        public int Left
-        {
-            get
-            {
-                return _left;
-            }
-        }
-
-        /// <summary>
-        /// Top value.
-        /// </summary>
-        public int Top
-        {
-            get
-            {
-                return _top;
-            }
-        }
-
-        /// <summary>
-        /// Right value.
-        /// </summary>
-        public int Right
-        {
-            get
-            {
-                return _right;
-            }
-        }
-
-        /// <summary>
-        /// Bottom value.
-        /// </summary>
-        public int Bottom
-        {
-            get
-            {
-                return _bottom;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        /// <param name="left"></param>
-        /// <param name="top"></param>
-        /// <param name="right"></param>
-        /// <param name="bottom"></param>
-        public SvgRectRegion(SvgGdi gdi, int left, int top, int right, int bottom)
-            : base(gdi)
-        {
-            _left = left;
-            _top = top;
-            _right = right;
-            _bottom = bottom;
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Create rect element.
-        /// </summary>
-        /// <returns></returns>
-        public override System.Xml.XmlElement CreateElement()
-        {
-            System.Xml.XmlElement elem = GDI.Document.CreateElement("rect");
-            elem.SetAttribute("x", "" + (int)GDI.DC.ToAbsoluteX(Left));
-            elem.SetAttribute("y", "" + (int)GDI.DC.ToAbsoluteY(Top));
-            elem.SetAttribute("width", "" + (int)GDI.DC.ToRelativeX(Right - Left));
-            elem.SetAttribute("height", "" + (int)GDI.DC.ToRelativeY(Bottom - Top));
-            return elem;
-        }
-
-        /// <summary>
-        /// Serves as the default hash function.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode() {
-		    int prime = 31;
-		    int result = 1;
-		    result = prime * result + _bottom;
-		    result = prime * result + _left;
-		    result = prime * result + _right;
-		    result = prime * result + _top;
-		    return result;
-	    }
-
-        /// <summary>
-        /// Determines whether the specified object is equal to the current object.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(Object obj)
-        {
-            if (this == obj)
-                return true;
-            if (obj == null)
-                return false;
-            if (typeof(SvgRectRegion) != obj.GetType())
-                return false;
-            SvgRectRegion other = (SvgRectRegion)obj;
-            if (_bottom != other._bottom)
-                return false;
-            if (_left != other._left)
-                return false;
-            if (_right != other._right)
-                return false;
-            if (_top != other._top)
-                return false;
-            return true;
-        }
-
-        #endregion
-    }
-}

+ 0 - 38
TEAMModelOS.SDK/Helper/Common/WMFConverter/Svg/SvgRegion.cs

@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Svg
-{
-    /// <summary>
-    /// 
-    /// </summary>
-    public abstract class SvgRegion : SvgObject, Gdi.IGdiRegion
-    {
-        #region Constructors
-
-        /// <summary>
-        /// Default Constructor.
-        /// </summary>
-        /// <param name="gdi"></param>
-        public SvgRegion(SvgGdi gdi)
-            : base(gdi)
-        {
-
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Create element - abstract method.
-        /// </summary>
-        /// <returns></returns>
-        public abstract System.Xml.XmlElement CreateElement();
-
-        #endregion
-    }
-}

+ 0 - 84
TEAMModelOS.SDK/Helper/Common/WMFConverter/Util/Base64.cs

@@ -1,84 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Util
-{
-    /// <summary>
-    /// Base 64 encode
-    /// </summary>
-    public class Base64
-    {
-        #region Local Variables
-
-        private static char[] ENCODE_DATA = {
-		    'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
-		    'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
-		    'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
-		    'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
-		    'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
-		    'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
-		    'w', 'x', 'y', 'z', '0', '1', '2', '3',
-		    '4', '5', '6', '7', '8', '9', '+', '/' 
-	    };
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Encode byte array.
-        /// </summary>
-        /// <param name="data"></param>
-        /// <returns></returns>
-	    public static string Encode(byte[] data) 
-        {
-		    char[] buffer = null;
-
-		    if (data.Length % 3 == 0) 
-			    buffer = new char[data.Length / 3 * 4];
-		    else 
-			    buffer = new char[(data.Length / 3 + 1) * 4];
-		    
-
-		    int buf = 0;
-		    for (int i = 0; i < data.Length; i++) 
-            {
-			    switch (i % 3) 
-                {
-				    case 0 :
-					    buffer[i / 3 * 4] = ENCODE_DATA[(data[i] & 0xFC) >> 2];
-					    buf = (data[i] & 0x03) << 4;
-					    if (i + 1 == data.Length) 
-                        {
-						    buffer[i / 3 * 4 + 1] = ENCODE_DATA[buf];
-						    buffer[i / 3 * 4 + 2] = '=';
-						    buffer[i / 3 * 4 + 3] = '=';
-					    }
-					    break;
-				    case 1 :
-					    buf += (data[i] & 0xF0) >> 4;
-					    buffer[i / 3 * 4 + 1] = ENCODE_DATA[buf];
-					    buf = (data[i] & 0x0F) << 2;
-					    if (i + 1 == data.Length) 
-                        {
-						    buffer[i / 3 * 4 + 2] = ENCODE_DATA[buf];
-						    buffer[i / 3 * 4 + 3] = '=';
-					    }
-					    break;
-				    case 2 :
-					    buf += (data[i] & 0xC0) >> 6;
-					    buffer[i / 3 * 4 + 2] = ENCODE_DATA[buf];
-					    buffer[i / 3 * 4 + 3] = ENCODE_DATA[data[i] & 0x3F];
-					    break;
-			    }
-		    }
-
-		    return new string(buffer);
-        }
-
-        #endregion
-    }
-}

+ 0 - 15
TEAMModelOS.SDK/Helper/Common/WMFConverter/Util/ImageUtil.cs

@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Util
-{
-    
-    public class ImageUtil
-    {
-       //Not implemented.
-	
-    }
-}

+ 0 - 74
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfBrush.cs

@@ -1,74 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Represents WMF Brush object.
-    /// </summary>
-    public class WmfBrush : WmfObject, Gdi.IGdiBrush
-    {
-        #region Local Variables
-
-        private int _style;
-        private int _color;
-        private int _hatch;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object Style.
-        /// </summary>
-        public int Style
-        {
-            get
-            {
-                return _style;
-            }
-        }
-
-        /// <summary>
-        /// Object Color.
-        /// </summary>
-        public int Color
-        {
-            get
-            {
-                return _color;
-            }
-        }
-
-        /// <summary>
-        /// Object Hatch.
-        /// </summary>
-        public int Hatch
-        {
-            get
-            {
-                return _hatch;
-            }
-        }
-
-        /// <summary>
-        /// Default Constructor
-        /// </summary>
-        /// <param name="id"></param>
-        /// <param name="style"></param>
-        /// <param name="color"></param>
-        /// <param name="hatch"></param>
-        public WmfBrush(int id, int style, int color, int hatch)
-            :base (id)
-        {
-            _style = style;
-            _color = color;
-            _hatch = hatch;
-        }
-
-        #endregion
-    }
-}

+ 0 - 85
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfConstants.cs

@@ -1,85 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Constants Enum.
-    /// </summary>
-    public enum WmfConstants
-    {
-         RECORD_EOF = 0x0000,
-         RECORD_REALIZE_PALETTE = 0x0035,
-         RECORD_SET_PALETTE_ENTRIES = 0x0037,
-         RECORD_SET_BK_MODE = 0x0102,
-         RECORD_SET_MAP_MODE = 0x0103,
-         RECORD_SET_ROP2 = 0x0104,
-         RECORD_SET_REL_ABS = 0x0105,
-         RECORD_SET_POLY_FILL_MODE = 0x0106,
-         RECORD_SET_STRETCH_BLT_MODE = 0x0107,
-         RECORD_SET_TEXT_CHARACTER_EXTRA = 0x0108,
-         RECORD_RESTORE_DC = 0x0127,
-         RECORD_RESIZE_PALETTE = 0x0139,
-         RECORD_DIB_CREATE_PATTERN_BRUSH = 0x0142,
-         RECORD_SET_LAYOUT = 0x0149,
-         RECORD_SET_BK_COLOR = 0x0201,
-         RECORD_SET_TEXT_COLOR = 0x0209,
-         RECORD_OFFSET_VIEWPORT_ORG_EX = 0x0211,
-         RECORD_LINE_TO = 0x0213,
-         RECORD_MOVE_TO_EX = 0x0214,
-         RECORD_OFFSET_CLIP_RGN = 0x0220,
-         RECORD_FILL_RGN = 0x0228,
-         RECORD_SET_MAPPER_FLAGS = 0x0231,
-         RECORD_SELECT_PALETTE = 0x0234,
-         RECORD_POLYGON = 0x0324,
-         RECORD_POLYLINE = 0x0325,
-         RECORD_SET_TEXT_JUSTIFICATION = 0x020A,
-         RECORD_SET_WINDOW_ORG_EX = 0x020B,
-         RECORD_SET_WINDOW_EXT_EX = 0x020C,
-         RECORD_SET_VIEWPORT_ORG_EX = 0x020D,
-         RECORD_SET_VIEWPORT_EXT_EX = 0x020E,
-         RECORD_OFFSET_WINDOW_ORG_EX = 0x020F,
-         RECORD_SCALE_WINDOW_EXT_EX = 0x0410,
-         RECORD_SCALE_VIEWPORT_EXT_EX = 0x0412,
-         RECORD_EXCLUDE_CLIP_RECT = 0x0415,
-         RECORD_INTERSECT_CLIP_RECT = 0x0416,
-         RECORD_ELLIPSE = 0x0418,
-         RECORD_FLOOD_FILL = 0x0419,
-         RECORD_FRAME_RGN = 0x0429,
-         RECORD_ANIMATE_PALETTE = 0x0436,
-         RECORD_TEXT_OUT = 0x0521,
-         RECORD_POLY_POLYGON = 0x0538,
-         RECORD_EXT_FLOOD_FILL = 0x0548,
-         RECORD_RECTANGLE = 0x041B,
-         RECORD_SET_PIXEL = 0x041F,
-         RECORD_ROUND_RECT = 0x061C,
-         RECORD_PAT_BLT = 0x061D,
-         RECORD_SAVE_DC = 0x001E,
-         RECORD_PIE = 0x081A,
-         RECORD_STRETCH_BLT = 0x0B23,
-         RECORD_ESCAPE = 0x0626,
-         RECORD_INVERT_RGN = 0x012A,
-         RECORD_PAINT_RGN = 0x012B,
-         RECORD_SELECT_CLIP_RGN = 0x012C,
-         RECORD_SELECT_OBJECT = 0x012D,
-         RECORD_SET_TEXT_ALIGN = 0x012E,
-         RECORD_ARC = 0x0817,
-         RECORD_CHORD = 0x0830,
-         RECORD_BIT_BLT = 0x0922,
-         RECORD_EXT_TEXT_OUT = 0x0a32,
-         RECORD_SET_DIBITS_TO_DEVICE = 0x0d33,
-         RECORD_DIB_BIT_BLT = 0x0940,
-         RECORD_DIB_STRETCH_BLT = 0x0b41,
-         RECORD_STRETCH_DIBITS = 0x0f43,
-         RECORD_DELETE_OBJECT = 0x01f0,
-         RECORD_CREATE_PALETTE = 0x00f7,
-         RECORD_CREATE_PATTERN_BRUSH = 0x01F9,
-         RECORD_CREATE_PEN_INDIRECT = 0x02FA,
-         RECORD_CREATE_FONT_INDIRECT = 0x02FB,
-         RECORD_CREATE_BRUSH_INDIRECT = 0x02FC,
-         RECORD_CREATE_RECT_RGN = 0x06FF,
-    }
-}

+ 0 - 250
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfFont.cs

@@ -1,250 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Represents WMF Font object.
-    /// </summary>
-    public class WmfFont : WmfObject, Gdi.IGdiFont
-    {
-        #region Local Variables
-
-        private int _height;
-        private int _width;
-        private int _escapement;
-        private int _orientation;
-        private int _weight;
-        private bool _italic;
-        private bool _underline;
-        private bool _strikeout;
-        private int _charset;
-        private int _outPrecision;
-        private int _clipPrecision;
-        private int _quality;
-        private int _pitchAndFamily;
-
-        private string _faceName;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object Height.
-        /// </summary>
-        public int Height
-        {
-            get
-            {
-                return _height;
-            }
-        }
-
-        /// <summary>
-        /// Object Width.
-        /// </summary>
-        public int Width
-        {
-            get
-            {
-                return _width;
-            }
-        }
-
-        /// <summary>
-        /// Object Escapement.
-        /// </summary>
-        public int Escapement
-        {
-            get
-            {
-                return _escapement;
-            }
-        }
-
-        /// <summary>
-        /// Object Orientation.
-        /// </summary>
-        public int Orientation
-        {
-            get
-            {
-                return _orientation;
-            }
-        }
-
-        /// <summary>
-        /// Object Weight.
-        /// </summary>
-        public int Weight
-        {
-            get
-            {
-                return _weight;
-            }
-        }
-
-        /// <summary>
-        /// Defines whether the font is italic.
-        /// </summary>
-        public bool IsItalic
-        {
-            get
-            {
-                return _italic;
-            }
-        }
-
-        /// <summary>
-        /// Defines whether the font is underlined.
-        /// </summary>
-        public bool IsUnderlined
-        {
-            get
-            {
-                return _underline;
-            }
-        }
-
-        /// <summary>
-        /// Defines whether the font is striked.
-        /// </summary>
-        public bool IsStrikedOut
-        {
-            get
-            {
-                return _strikeout;
-            }
-        }
-
-        /// <summary>
-        /// Defines the font charset.
-        /// </summary>
-        public int Charset
-        {
-            get
-            {
-                return _charset;
-            }
-        }
-
-        /// <summary>
-        /// Defines the font out precision.
-        /// </summary>
-        public int OutPrecision
-        {
-            get
-            {
-                return _outPrecision;
-            }
-        }
-
-        /// <summary>
-        /// Defines the clip precision.
-        /// </summary>
-        public int ClipPrecision
-        {
-            get
-            {
-                return _clipPrecision;
-            }
-        }
-
-        /// <summary>
-        /// Object quality.
-        /// </summary>
-        public int Quality
-        {
-            get
-            {
-                return _quality;
-            }
-        }
-
-        /// <summary>
-        /// Defines pitch and famility font.
-        /// </summary>
-        public int PitchAndFamily
-        {
-            get
-            {
-                return _pitchAndFamily;
-            }
-        }
-
-        /// <summary>
-        /// Defines face name rules.
-        /// </summary>
-        public string FaceName
-        {
-            get
-            {
-                return _faceName;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default Constructor.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <param name="height"></param>
-        /// <param name="width"></param>
-        /// <param name="escapement"></param>
-        /// <param name="orientation"></param>
-        /// <param name="weight"></param>
-        /// <param name="italic"></param>
-        /// <param name="underline"></param>
-        /// <param name="strikeout"></param>
-        /// <param name="charset"></param>
-        /// <param name="outPrecision"></param>
-        /// <param name="clipPrecision"></param>
-        /// <param name="quality"></param>
-        /// <param name="pitchAndFamily"></param>
-        /// <param name="faceName"></param>
-        public WmfFont(int id,
-            int height,
-            int width,
-            int escapement,
-            int orientation,
-            int weight,
-            bool italic,
-            bool underline,
-            bool strikeout,
-            int charset,
-            int outPrecision,
-            int clipPrecision,
-            int quality,
-            int pitchAndFamily,
-            byte[] faceName)
-            : base (id)
-        {
-
-            _height = height;
-            _width = width;
-            _escapement = escapement;
-            _orientation = orientation;
-            _weight = weight;
-            _italic = italic;
-            _underline = underline;
-            _strikeout = strikeout;
-            _charset = charset;
-            _outPrecision = outPrecision;
-            _clipPrecision = clipPrecision;
-            _quality = quality;
-            _pitchAndFamily = pitchAndFamily;
-            _faceName = WMFConverter.Gdi.GdiUtils.ConvertString(faceName, charset);
-        }
-
-        #endregion
-
-       
-    }
-}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 1647
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfGdi.cs


+ 0 - 49
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfObject.cs

@@ -1,49 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Represents WMF Object base
-    /// </summary>
-    public class WmfObject : Gdi.IGdiObject
-    {
-        #region Local Variables
-
-        public int _id;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object Id.
-        /// </summary>
-        public int Id
-        {
-            get
-            {
-                return _id;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="id"></param>
-        public WmfObject(int id)
-        {
-            _id = id;
-        }
-
-        #endregion
-       
-    }
-}

+ 0 - 65
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfPalette.cs

@@ -1,65 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Represents WMF Palette object.
-    /// </summary>
-    public class WmfPalette: WmfObject, Gdi.IGdiPalette
-    {
-        #region Local Variables
-
-        private int _version;
-        private int[] _entries;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object version.
-        /// </summary>
-        public int Version
-        {
-            get
-            {
-                return _version;
-            }
-        }
-
-        /// <summary>
-        /// Object entries.
-        /// </summary>
-        public int[] Entries
-        {
-            get
-            {
-                return _entries;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <param name="version"></param>
-        /// <param name="entries"></param>
-        public WmfPalette(int id, int version, int[] entries)
-            : base(id)
-        {
-            _version = version;
-            _entries = entries;
-        }
-
-        #endregion
-
-    }
-}

+ 0 - 30
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfParseException.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    public class WmfParseException : Exception
-    {
-        public WmfParseException()
-            :base()
-        {
-
-        }
-
-        public WmfParseException(String message)
-            : base(message)
-        {
-
-        }
-
-        public WmfParseException(String message, Exception t)
-            : base(message,t)
-        {
-
-        }
-
-    }
-}

+ 0 - 821
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfParser.cs

@@ -1,821 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Parse WMF to SVG 
-    /// </summary>
-    public class WmfParser
-    {
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        public WmfParser()
-        {
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        /// <summary>
-        /// Parse WMF file to SVG file.
-        /// </summary>
-        /// <param name="stream"></param>
-        /// <param name="gdi"></param>
-        public void Parse(System.IO.Stream stream, Gdi.IGdi gdi) 
-        {
-            WMFConverter.IO.DataInput binReader = null;
-            bool isEmpty = true;
-
-            try
-            {
-                binReader = new WMFConverter.IO.DataInput(stream, true);
-
-                int mtType = 0;
-                int mtHeaderSize = 0;
-
-                long key = binReader.ReadUint32();
-                isEmpty = false;
-                if (key == -1698247209)//0x9AC6CDD7)
-                {
-                    int hmf = binReader.ReadInt16();
-                    int vsx = binReader.ReadInt16();
-                    int vsy = binReader.ReadInt16();
-                    int vex = binReader.ReadInt16();
-                    int vey = binReader.ReadInt16();
-                    int dpi = binReader.ReadUint16();
-                    long reserved = binReader.ReadUint32();
-                    int checksum = binReader.ReadUint16();
-
-                    gdi.PlaceableHeader(vsx, vsy, vex, vey, dpi);
-
-                    mtType = binReader.ReadUint16();
-                    mtHeaderSize = binReader.ReadUint16();
-                }
-                else
-                {
-                    mtType = (int)(key & 0x0000FFFF);
-                    mtHeaderSize = (int)((key & 0xFFFF0000) >> 16);
-                }
-
-                int mtVersion = binReader.ReadUint16();
-                long mtSize = binReader.ReadUint32();
-                int mtNoObjects = binReader.ReadUint16();
-                long mtMaxRecord = binReader.ReadUint32();
-                int mtNoParameters = binReader.ReadUint16();
-
-                if (mtType != 1 || mtHeaderSize != 9)
-                {
-                    throw new WmfParseException("invalid file format.");
-                }
-
-                gdi.Header();
-
-                WMFConverter.Gdi.IGdiObject[] objs = new WMFConverter.Gdi.IGdiObject[mtNoObjects];
-
-                while (true)
-                {
-                    int size = (int)binReader.ReadUint32() - 3;
-                    int id = binReader.ReadUint16();
-
-                    if (id == (int)WmfConstants.RECORD_EOF)
-                        break; // Last record
-
-                    binReader.Count = 0;
-
-                    switch (id)
-                    {
-                        case (int)WmfConstants.RECORD_REALIZE_PALETTE:
-                            gdi.RealizePalette();
-                            break;
-                        case (int)WmfConstants.RECORD_SET_PALETTE_ENTRIES:
-                            {
-                                int[] entries = new int[binReader.ReadUint16()];
-                                int startIndex = binReader.ReadUint16();
-                                int objID = binReader.ReadUint16();
-                                for (int i = 0; i < entries.Length; i++)
-                                    entries[i] = binReader.ReadInt32();
-                                gdi.SetPaletteEntries((Gdi.IGdiPalette)objs[objID], startIndex, entries);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_BK_MODE:
-                            {
-                                int mode = binReader.ReadInt16();
-                                gdi.SetBkMode(mode);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_MAP_MODE:
-                            {
-                                int mode = binReader.ReadInt16();
-                                gdi.SetMapMode(mode);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_ROP2:
-                            {
-                                int mode = binReader.ReadInt16();
-                                gdi.SetROP2(mode);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_REL_ABS:
-                            {
-                                int mode = binReader.ReadInt16();
-                                gdi.SetRelAbs(mode);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_POLY_FILL_MODE:
-                            {
-                                int mode = binReader.ReadInt16();
-                                gdi.SetPolyFillMode(mode);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_STRETCH_BLT_MODE:
-                            {
-                                int mode = binReader.ReadInt16();
-                                gdi.SetStretchBltMode(mode);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_TEXT_CHARACTER_EXTRA:
-                            {
-                                int extra = binReader.ReadInt16();
-                                gdi.SetTextCharacterExtra(extra);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_RESTORE_DC:
-                            {
-                                int dc = binReader.ReadInt16();
-                                gdi.RestoreDC(dc);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_RESIZE_PALETTE:
-                            {
-                                int objID = binReader.ReadUint16();
-                                gdi.ResizePalette((Gdi.IGdiPalette)objs[objID]);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_DIB_CREATE_PATTERN_BRUSH:
-                            {
-                                int usage = binReader.ReadInt32();
-                                byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                for (int i = 0; i < objs.Length; i++)
-                                {
-                                    if (objs[i] == null)
-                                    {
-                                        objs[i] = gdi.DibCreatePatternBrush(image, usage);
-                                        break;
-                                    }
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_LAYOUT:
-                            {
-                                long layout = binReader.ReadUint32();
-                                gdi.SetLayout(layout);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_BK_COLOR:
-                            {
-                                int color = binReader.ReadInt32();
-                                gdi.SetBkColor(color);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_TEXT_COLOR:
-                            {
-                                int color = binReader.ReadInt32();
-                                gdi.SetTextColor(color);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_OFFSET_VIEWPORT_ORG_EX:
-                            {
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.OffsetViewportOrgEx(x, y, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_LINE_TO:
-                            {
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                gdi.LineTo(ex, ey);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_MOVE_TO_EX:
-                            {
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.MoveToEx(x, y, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_OFFSET_CLIP_RGN:
-                            {
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.OffsetClipRgn(x, y);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_FILL_RGN:
-                            {
-                                int brushID = binReader.ReadUint16();
-                                int rgnID = binReader.ReadUint16();
-                                gdi.FillRgn((Gdi.IGdiRegion)objs[rgnID], (Gdi.IGdiBrush)objs[brushID]);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_MAPPER_FLAGS:
-                            {
-                                long flag = binReader.ReadUint32();
-                                gdi.SetMapperFlags(flag);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SELECT_PALETTE:
-                            {
-                                bool mode = (binReader.ReadInt16() != 0);
-                                if ((size * 2 - binReader.Count) > 0)
-                                {
-                                    int objID = binReader.ReadUint16();
-                                    gdi.SelectPalette((Gdi.IGdiPalette)objs[objID], mode);
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_POLYGON:
-                            {
-                                WMFConverter.Gdi.Point[] points = new WMFConverter.Gdi.Point[binReader.ReadInt16()];
-                                for (int i = 0; i < points.Length; i++)
-                                    points[i] = new WMFConverter.Gdi.Point(binReader.ReadInt16(), binReader.ReadInt16());
-
-                                gdi.Polygon(points);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_POLYLINE:
-                            {
-                                WMFConverter.Gdi.Point[] points = new WMFConverter.Gdi.Point[binReader.ReadInt16()];
-                                for (int i = 0; i < points.Length; i++)
-                                    points[i] = new WMFConverter.Gdi.Point(binReader.ReadInt16(), binReader.ReadInt16());
-
-                                gdi.Polyline(points);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_TEXT_JUSTIFICATION:
-                            {
-                                int breakCount = binReader.ReadInt16();
-                                int breakExtra = binReader.ReadInt16();
-                                gdi.SetTextJustification(breakExtra, breakCount);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_WINDOW_ORG_EX:
-                            {
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.SetWindowOrgEx(x, y, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_WINDOW_EXT_EX:
-                            {
-                                int height = binReader.ReadInt16();
-                                int width = binReader.ReadInt16();
-                                gdi.SetWindowExtEx(width, height, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_VIEWPORT_ORG_EX:
-                            {
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.SetViewportOrgEx(x, y, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_VIEWPORT_EXT_EX:
-                            {
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.SetViewportExtEx(x, y, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_OFFSET_WINDOW_ORG_EX:
-                            {
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.OffsetWindowOrgEx(x, y, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SCALE_WINDOW_EXT_EX:
-                            {
-                                int yd = binReader.ReadInt16();
-                                int y = binReader.ReadInt16();
-                                int xd = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.ScaleWindowExtEx(x, xd, y, yd, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SCALE_VIEWPORT_EXT_EX:
-                            {
-                                int yd = binReader.ReadInt16();
-                                int y = binReader.ReadInt16();
-                                int xd = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.ScaleViewportExtEx(x, xd, y, yd, null);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_EXCLUDE_CLIP_RECT:
-                            {
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                gdi.ExcludeClipRect(sx, sy, ex, ey);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_INTERSECT_CLIP_RECT:
-                            {
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                gdi.IntersectClipRect(sx, sy, ex, ey);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_ELLIPSE:
-                            {
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                gdi.Ellipse(sx, sy, ex, ey);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_FLOOD_FILL:
-                            {
-                                int color = binReader.ReadInt32();
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.FloodFill(x, y, color);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_FRAME_RGN:
-                            {
-                                int height = binReader.ReadInt16();
-                                int width = binReader.ReadInt16();
-                                int brushID = binReader.ReadUint16();
-                                int rgnID = binReader.ReadUint16();
-                                gdi.FrameRgn((Gdi.IGdiRegion)objs[rgnID], (Gdi.IGdiBrush)objs[brushID], width, height);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_ANIMATE_PALETTE:
-                            {
-                                int[] entries = new int[binReader.ReadUint16()];
-                                int startIndex = binReader.ReadUint16();
-                                int objID = binReader.ReadUint16();
-                                for (int i = 0; i < entries.Length; i++)
-                                    entries[i] = binReader.ReadInt32();
-
-                                gdi.AnimatePalette((Gdi.IGdiPalette)objs[objID], startIndex, entries);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_TEXT_OUT:
-                            {
-                                int count = binReader.ReadInt16();
-                                byte[] text = binReader.ReadBytes(count);
-                                if (count % 2 == 1)
-                                {
-                                    binReader.ReadByte();
-                                }
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.TextOut(x, y, text);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_POLY_POLYGON:
-                            {
-                                WMFConverter.Gdi.Point[][] points = new WMFConverter.Gdi.Point[binReader.ReadInt16()][];
-                                for (int i = 0; i < points.Length; i++)
-                                    points[i] = new WMFConverter.Gdi.Point[binReader.ReadInt16()];
-
-                                for (int i = 0; i < points.Length; i++)
-                                    for (int j = 0; j < points[i].Length; j++)
-                                        points[i][j] = new WMFConverter.Gdi.Point(binReader.ReadInt16(), binReader.ReadInt16());
-
-
-                                gdi.PolyPolygon(points);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_EXT_FLOOD_FILL:
-                            {
-                                int type = binReader.ReadUint16();
-                                int color = binReader.ReadInt32();
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.ExtFloodFill(x, y, color, type);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_RECTANGLE:
-                            {
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                gdi.Rectangle(sx, sy, ex, ey);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_PIXEL:
-                            {
-                                int color = binReader.ReadInt32();
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.SetPixel(x, y, color);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_ROUND_RECT:
-                            {
-                                int rh = binReader.ReadInt16();
-                                int rw = binReader.ReadInt16();
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                gdi.RoundRect(sx, sy, ex, ey, rw, rh);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_PAT_BLT:
-                            {
-                                long rop = binReader.ReadUint32();
-                                int height = binReader.ReadInt16();
-                                int width = binReader.ReadInt16();
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                gdi.PatBlt(x, y, width, height, rop);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SAVE_DC:
-                            {
-                                gdi.SeveDC();
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_PIE:
-                            {
-                                int eyr = binReader.ReadInt16();
-                                int exr = binReader.ReadInt16();
-                                int syr = binReader.ReadInt16();
-                                int sxr = binReader.ReadInt16();
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                gdi.Pie(sx, sy, ex, ey, sxr, syr, exr, eyr);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_STRETCH_BLT:
-                            {
-                                long rop = binReader.ReadUint32();
-                                int sh = binReader.ReadInt16();
-                                int sw = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                int dh = binReader.ReadInt16();
-                                int dw = binReader.ReadInt16();
-                                int dy = binReader.ReadInt16();
-                                int dx = binReader.ReadInt16();
-
-                                byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                gdi.StretchBlt(image, dx, dy, dw, dh, sx, sy, sw, sh, rop);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_ESCAPE:
-                            {
-                                byte[] data = binReader.ReadBytes(2 * size);
-                                gdi.Escape(data);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_INVERT_RGN:
-                            {
-                                int rgnID = binReader.ReadUint16();
-                                gdi.InvertRgn((Gdi.IGdiRegion)objs[rgnID]);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_PAINT_RGN:
-                            {
-                                int objID = binReader.ReadUint16();
-                                gdi.PaintRgn((Gdi.IGdiRegion)objs[objID]);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SELECT_CLIP_RGN:
-                            {
-                                int objID = binReader.ReadUint16();
-                                Gdi.IGdiRegion rgn = (objID > 0) ? (Gdi.IGdiRegion)objs[objID] : null;
-                                gdi.SelectClipRgn(rgn);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SELECT_OBJECT:
-                            {
-                                int objID = binReader.ReadUint16();
-                                gdi.SelectObject(objs[objID]);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_TEXT_ALIGN:
-                            {
-                                int align = binReader.ReadInt16();
-                                gdi.SetTextAlign(align);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_ARC:
-                            {
-                                int eya = binReader.ReadInt16();
-                                int exa = binReader.ReadInt16();
-                                int sya = binReader.ReadInt16();
-                                int sxa = binReader.ReadInt16();
-                                int eyr = binReader.ReadInt16();
-                                int exr = binReader.ReadInt16();
-                                int syr = binReader.ReadInt16();
-                                int sxr = binReader.ReadInt16();
-                                gdi.Arc(sxr, syr, exr, eyr, sxa, sya, exa, eya);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_CHORD:
-                            {
-                                int eya = binReader.ReadInt16();
-                                int exa = binReader.ReadInt16();
-                                int sya = binReader.ReadInt16();
-                                int sxa = binReader.ReadInt16();
-                                int eyr = binReader.ReadInt16();
-                                int exr = binReader.ReadInt16();
-                                int syr = binReader.ReadInt16();
-                                int sxr = binReader.ReadInt16();
-                                gdi.Chord(sxr, syr, exr, eyr, sxa, sya, exa, eya);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_BIT_BLT:
-                            {
-                                long rop = binReader.ReadUint32();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                int height = binReader.ReadInt16();
-                                int width = binReader.ReadInt16();
-                                int dy = binReader.ReadInt16();
-                                int dx = binReader.ReadInt16();
-
-                                byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                gdi.BitBlt(image, dx, dy, width, height, sx, sy, rop);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_EXT_TEXT_OUT:
-                            {
-                                int rsize = size;
-
-                                int y = binReader.ReadInt16();
-                                int x = binReader.ReadInt16();
-                                int count = binReader.ReadInt16();
-                                int options = binReader.ReadUint16();
-                                rsize -= 4;
-
-                                int[] rect = null;
-                                if ((options & 0x0006) > 0)
-                                {
-                                    rect = new int[] { binReader.ReadInt16(), binReader.ReadInt16(), binReader.ReadInt16(), binReader.ReadInt16() };
-                                    rsize -= 4;
-                                }
-                                byte[] text = binReader.ReadBytes(count);
-                                if (count % 2 == 1)
-                                    binReader.ReadByte();
-
-                                rsize -= (count + 1) / 2;
-
-                                int[] dx = null;
-                                if (rsize > 0)
-                                {
-                                    dx = new int[rsize];
-                                    for (int i = 0; i < dx.Length; i++)
-                                        dx[i] = binReader.ReadInt16();
-                                }
-                                gdi.ExtTextOut(x, y, options, rect, text, dx);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_SET_DIBITS_TO_DEVICE:
-                            {
-                                int colorUse = binReader.ReadUint16();
-                                int scanlines = binReader.ReadUint16();
-                                int startscan = binReader.ReadUint16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                int dh = binReader.ReadInt16();
-                                int dw = binReader.ReadInt16();
-                                int dy = binReader.ReadInt16();
-                                int dx = binReader.ReadInt16();
-
-                                byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                gdi.SetDIBitsToDevice(dx, dy, dw, dh, sx, sy, startscan, scanlines, image, colorUse);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_DIB_BIT_BLT:
-                            {
-                                bool isRop = false;
-
-                                long rop = binReader.ReadUint32();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                int height = binReader.ReadInt16();
-                                if (height == 0)
-                                {
-                                    height = binReader.ReadInt16();
-                                    isRop = true;
-                                }
-                                int width = binReader.ReadInt16();
-                                int dy = binReader.ReadInt16();
-                                int dx = binReader.ReadInt16();
-
-                                if (isRop)
-                                    gdi.DibBitBlt(null, dx, dy, width, height, sx, sy, rop);
-                                else
-                                {
-                                    byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                    gdi.DibBitBlt(image, dx, dy, width, height, sx, sy, rop);
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_DIB_STRETCH_BLT:
-                            {
-                                long rop = binReader.ReadUint32();
-                                int sh = binReader.ReadInt16();
-                                int sw = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int dh = binReader.ReadInt16();
-                                int dw = binReader.ReadInt16();
-                                int dy = binReader.ReadInt16();
-                                int dx = binReader.ReadInt16();
-
-                                byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                gdi.DibStretchBlt(image, dx, dy, dw, dh, sx, sy, sw, sh, rop);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_STRETCH_DIBITS:
-                            {
-                                long rop = binReader.ReadUint32();
-                                int usage = binReader.ReadUint16();
-                                int sh = binReader.ReadInt16();
-                                int sw = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                int dh = binReader.ReadInt16();
-                                int dw = binReader.ReadInt16();
-                                int dy = binReader.ReadInt16();
-                                int dx = binReader.ReadInt16();
-
-                                byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                gdi.StretchDIBits(dx, dy, dw, dh, sx, sy, sw, sh, image, usage, rop);
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_DELETE_OBJECT:
-                            {
-                                int objID = binReader.ReadUint16();
-                                gdi.DeleteObject(objs[objID]);
-                                objs[objID] = null;
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_CREATE_PALETTE:
-                            {
-                                int version = binReader.ReadUint16();
-                                int[] entries = new int[binReader.ReadUint16()];
-                                for (int i = 0; i < entries.Length; i++)
-                                    entries[i] = binReader.ReadInt32();
-
-
-                                for (int i = 0; i < objs.Length; i++)
-                                {
-                                    if (objs[i] == null)
-                                    {
-                                        objs[i] = gdi.CreatePalette(version, entries);
-                                        break;
-                                    }
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_CREATE_PATTERN_BRUSH:
-                            {
-                                byte[] image = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                for (int i = 0; i < objs.Length; i++)
-                                {
-                                    if (objs[i] == null)
-                                    {
-                                        objs[i] = gdi.CreatePatternBrush(image);
-                                        break;
-                                    }
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_CREATE_PEN_INDIRECT:
-                            {
-                                int style = binReader.ReadUint16();
-                                int width = binReader.ReadInt16();
-                                binReader.ReadInt16();
-                                int color = binReader.ReadInt32();
-                                for (int i = 0; i < objs.Length; i++)
-                                {
-                                    if (objs[i] == null)
-                                    {
-                                        objs[i] = gdi.CreatePenIndirect(style, width, color);
-                                        break;
-                                    }
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_CREATE_FONT_INDIRECT:
-                            {
-                                int height = binReader.ReadInt16();
-                                int width = binReader.ReadInt16();
-                                int escapement = binReader.ReadInt16();
-                                int orientation = binReader.ReadInt16();
-                                int weight = binReader.ReadInt16();
-                                bool italic = (binReader.ReadByte() == 1);
-                                bool underline = (binReader.ReadByte() == 1);
-                                bool strikeout = (binReader.ReadByte() == 1);
-                                int charset = binReader.ReadByte();
-                                int outPrecision = binReader.ReadByte();
-                                int clipPrecision = binReader.ReadByte();
-                                int quality = binReader.ReadByte();
-                                int pitchAndFamily = binReader.ReadByte();
-                                byte[] faceName = binReader.ReadBytes(size * 2 - binReader.Count);
-
-                                Gdi.IGdiObject obj = gdi.CreateFontIndirect(height, width, escapement, orientation, weight, italic,
-                                        underline, strikeout, charset, outPrecision, clipPrecision, quality, pitchAndFamily,
-                                        faceName);
-
-                                for (int i = 0; i < objs.Length; i++)
-                                {
-                                    if (objs[i] == null)
-                                    {
-                                        objs[i] = obj;
-                                        break;
-                                    }
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_CREATE_BRUSH_INDIRECT:
-                            {
-                                int style = binReader.ReadUint16();
-                                int color = binReader.ReadInt32();
-                                int hatch = binReader.ReadUint16();
-                                for (int i = 0; i < objs.Length; i++)
-                                {
-                                    if (objs[i] == null)
-                                    {
-                                        objs[i] = gdi.CreateBrushIndirect(style, color, hatch);
-                                        break;
-                                    }
-                                }
-                                break;
-                            }
-                        case (int)WmfConstants.RECORD_CREATE_RECT_RGN:
-                            {
-                                int ey = binReader.ReadInt16();
-                                int ex = binReader.ReadInt16();
-                                int sy = binReader.ReadInt16();
-                                int sx = binReader.ReadInt16();
-                                for (int i = 0; i < objs.Length; i++)
-                                {
-                                    if (objs[i] == null)
-                                    {
-                                        objs[i] = gdi.CreateRectRgn(sx, sy, ex, ey);
-                                        break;
-                                    }
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                //log.fine("unsuppored id find: " + id + " (size=" + size + ")");
-                                Console.Write("unsuppored id find:" + id + "(size=" + size + ")");
-                                break;
-                            }
-                    }
-
-                    int rest = size * 2 - binReader.Count;
-                    for (int i = 0; i < rest; i++)
-                    {
-                        binReader.ReadByte();
-                    }
-                }
-                binReader.Close();
-
-                gdi.Footer();
-            }
-            catch (Exception)
-            {
-                if (isEmpty) 
-                    throw new WmfParseException("input file size is zero.");
-            }
-        }
-
-        #endregion
-    }
-}

+ 0 - 52
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfPatternBrush.cs

@@ -1,52 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Represents WMF Pattern Brush object.
-    /// </summary>
-    public class WmfPatternBrush : WmfObject, Gdi.IGdiPatternBrush
-    {
-        #region Local Variables
-
-        private byte[] _image;
-
-        #endregion 
-
-        #region Properties
-
-        /// <summary>
-        /// Object pattern.
-        /// </summary>
-        public byte[] Pattern
-        {
-            get
-            {
-                return _image;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <param name="image"></param>
-        public WmfPatternBrush(int id, byte[] image)
-            : base (id)
-        {
-            _image = image;
-        }
-
-        #endregion 
-
-       
-    }
-}

+ 0 - 75
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfPen.cs

@@ -1,75 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Represents WMF Pen object.
-    /// </summary>
-    class WmfPen: WmfObject,Gdi.IGdiPen
-    {
-        #region Local Variables
-
-        private int _style;
-        private int _width;
-        private int _color;
-
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Object style.
-        /// </summary>
-        public int Style
-        {
-            get
-            {
-                return _style;
-            }
-        }
-
-        /// <summary>
-        /// Object width.
-        /// </summary>
-        public int Width
-        {
-            get
-            {
-                return _width;
-            }
-        }
-
-        /// <summary>
-        /// Object color.
-        /// </summary>
-        public int Color
-        {
-            get
-            {
-                return _color;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <param name="style"></param>
-        /// <param name="width"></param>
-        /// <param name="color"></param>
-        public WmfPen(int id, int style, int width, int color)
-            : base(id)
-        {
-        }
-
-        #endregion
-    }
-}

+ 0 - 92
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfRectRegion.cs

@@ -1,92 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Representes WMF RecRegion object.
-    /// </summary>
-    public class WmfRectRegion: WmfObject, Gdi.IGdiRegion
-    {
-        #region Local Variables
-
-        private int _left;
-        private int _top;
-        private int _right;
-        private int _bottom;
-
-        #endregion
-
-        #region Properties
-        
-        /// <summary>
-        /// Get left value.
-        /// </summary>
-        public int Left
-        {
-            get
-            {
-                return _left;
-            }
-        }
-
-        /// <summary>
-        /// Get top value.
-        /// </summary>
-        public int Top
-        {
-            get
-            {
-                return _top;
-            }
-        }
-
-        /// <summary>
-        /// Get right value.
-        /// </summary>
-        public int Right
-        {
-            get
-            {
-                return _right;
-            }
-        }
-
-        /// <summary>
-        /// Get Bottom value.
-        /// </summary>
-        public int Bottom
-        {
-            get
-            {
-                return _bottom;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="id"></param>
-        /// <param name="left"></param>
-        /// <param name="top"></param>
-        /// <param name="right"></param>
-        /// <param name="bottom"></param>
-        public WmfRectRegion(int id, int left, int top, int right, int bottom)
-            :base(id)
-        {
-            _left = left;
-            _top = top;
-            _right = right;
-            _bottom = bottom;
-        }
-
-        #endregion
-    }
-}

+ 0 - 27
TEAMModelOS.SDK/Helper/Common/WMFConverter/Wmf/WmfRegion.cs

@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WMFConverter.Wmf
-{
-    /// <summary>
-    /// Windows Metafile - Represents WMF Region.
-    /// </summary>
-    public class WmfRegion : WmfObject,Gdi.IGdiRegion
-    {
-        #region Constructors
-
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="id"></param>
-        public WmfRegion(int id)
-            :base (id)
-        {
-        }
-
-        #endregion
-    }
-}

+ 0 - 188
TEAMModelOS.SDK/Helper/Common/XmlHelper/Json2Xml.cs

@@ -1,188 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Serialization;
-namespace TEAMModelOS.SDK.Helper.Common.XmlHelper
-{
-    public class Json2Xml
-    {
-        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0")]
-        [System.SerializableAttribute()]
-        [System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:ebay:apis:eBLBaseComponents")]
-        public enum ItemSpecificSourceCodeType
-        {
-
-            /// <remarks/>
-            ItemSpecific,
-
-            /// <remarks/>
-            Attribute,
-
-            /// <remarks/>
-            Product,
-
-            /// <remarks/>
-            CustomCode,
-        }
-
-        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0")]
-        [System.SerializableAttribute()]
-        [System.Diagnostics.DebuggerStepThroughAttribute()]
-        [System.ComponentModel.DesignerCategoryAttribute("code")]
-        [System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:ebay:apis:eBLBaseComponents")]
-        public partial class NameValueListType
-        {
-
-            private string nameField;
-
-            private string[] valueField;
-
-            private ItemSpecificSourceCodeType sourceField;
-
-            private bool sourceFieldSpecified;
-
-            private System.Xml.XmlElement[] anyField;
-
-            /// <remarks/>
-            public string Name
-            {
-                get
-                {
-                    return this.nameField;
-                }
-                set
-                {
-                    this.nameField = value;
-                }
-            }
-
-            /// <remarks/>
-            [System.Xml.Serialization.XmlElementAttribute("Value")]
-            public string[] Value
-            {
-                get
-                {
-                    return this.valueField;
-                }
-                set
-                {
-                    this.valueField = value;
-                }
-            }
-
-            /// <remarks/>
-            public ItemSpecificSourceCodeType Source
-            {
-                get
-                {
-                    return this.sourceField;
-                }
-                set
-                {
-                    this.sourceField = value;
-                }
-            }
-
-            /// <remarks/>
-            [System.Xml.Serialization.XmlIgnoreAttribute()]
-            public bool SourceSpecified
-            {
-                get
-                {
-                    return this.sourceFieldSpecified;
-                }
-                set
-                {
-                    this.sourceFieldSpecified = value;
-                }
-            }
-
-            /// <remarks/>
-            [System.Xml.Serialization.XmlAnyElementAttribute()]
-            public System.Xml.XmlElement[] Any
-            {
-                get
-                {
-                    return this.anyField;
-                }
-                set
-                {
-                    this.anyField = value;
-                }
-            }
-        }
-
-        public class CustomItemSpecifics
-        {
-            public NameValueListType[] ItemSpecifics;
-        }
-
-        public class Item
-        {
-            public string Name { get; set; }
-
-            public string Value { get; set; }
-
-            public string[] RecommValues { get; set; }
-
-            //public void DataTable2Entity(Item item, DataRow dr) {
-            //    item.Name=dr.
-            //}
-        }
-
-        public static string ObjectToText(Object inObject, Type inType)
-        {
-            String XmlizedString = null;
-            MemoryStream ms = new MemoryStream();
-            XmlSerializer xs = new XmlSerializer(inType);
-            XmlTextWriter xmlTextWriter = new XmlTextWriter(ms, Encoding.UTF8);
-            xs.Serialize(xmlTextWriter, inObject);
-            ms = (MemoryStream)xmlTextWriter.BaseStream;
-            XmlizedString = UTF8ByteArrayToString(ms.ToArray());
-
-            return XmlizedString;
-        }
-
-        private static String UTF8ByteArrayToString(Byte[] characters)
-        {
-            UTF8Encoding encoding = new UTF8Encoding();
-            String constructedString = encoding.GetString(characters);
-
-            if (constructedString.Length > 0)
-            {
-                constructedString = constructedString.Substring(1);
-            }
-            return (constructedString);
-        }
-
-        public static Object TextToObject(string inText, Type inType)
-        {
-            try
-            {
-                if (string.IsNullOrEmpty(inText))
-                {
-                    return null;
-                }
-                else
-                {
-                    XmlSerializer xs = new XmlSerializer(inType);
-                    MemoryStream ms = new MemoryStream(StringToUTF8ByteArray(inText));
-                    XmlTextWriter xmlTextWriter = new XmlTextWriter(ms, Encoding.UTF8);
-                    return (Object)xs.Deserialize(ms);
-                }
-            }
-            catch
-            {
-                return null;
-            }
-        }
-        private static byte[] StringToUTF8ByteArray(string inText)
-        {
-            UTF8Encoding encoding = new UTF8Encoding();
-            Byte[] byteArray = encoding.GetBytes(inText);
-
-            return byteArray;
-        }
-    }
-}

+ 0 - 67
TEAMModelOS.SDK/Helper/Common/XmlHelper/XmlAndJson.cs

@@ -1,67 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.Text;
-using System.Xml;
-
-namespace TEAMModelOS.SDK.Helper.Common.XmlHelper
-{
-    public class XmlAndJson
-    {  /// <summary>
-       /// 返回指定节点下信息的JSON格式字符串
-       /// </summary>
-       /// <param name="str">xml字符串</param>
-       /// <param name="nodename">节点名称,应从根节点开始</param>
-       /// <returns></returns>
-        public static string XML2Json(string str, string nodename)
-        {
-            string result = null;
-            XmlDocument xmldoc = new XmlDocument();
-            xmldoc.LoadXml(str);
-            XmlNode node = xmldoc.SelectSingleNode(nodename);
-            result = Newtonsoft.Json.JsonConvert.SerializeXmlNode(node);
-            return result;
-        }
-
-        public static string Json2XML(string str)
-        {
-            string result = null;
-            XmlDocument xml = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(str);
-            result = xml.OuterXml;
-            return result;
-        }
-        public static string GetCustomItemSpecifics(string str)
-        {
-            DataTable dt = JsonConvert.DeserializeObject<DataTable>(str);
-
-            List<Json2Xml.NameValueListType> nvl = new List<Json2Xml.NameValueListType>();
-
-            foreach (DataRow dr in dt.Rows)
-            {
-                Json2Xml.NameValueListType nv = new Json2Xml.NameValueListType();
-
-                string sName = dr["Name"].ToString();
-                string sValue = dr["Value"].ToString();
-
-                if (sName != string.Empty && sValue != string.Empty)
-                {
-                    nv.Name = sName;
-                    nv.Value = new string[] { sValue };
-                    nvl.Add(nv);
-                }
-            }
-
-            if (nvl.Count == 0)
-            {
-                return string.Empty;
-            }
-            else
-            {
-                Json2Xml.CustomItemSpecifics t = new Json2Xml.CustomItemSpecifics();
-                t.ItemSpecifics = nvl.ToArray();
-                return Json2Xml.ObjectToText(t, typeof(Json2Xml.CustomItemSpecifics));
-            }
-        }
-    }
-}

+ 0 - 60
TEAMModelOS.SDK/Helper/Common/XmlHelper/XmlSerializeHelper.cs

@@ -1,60 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using System.Xml.Serialization;
-
-namespace TEAMModelOS.SDK.Helper.Common.XmlHelper
-{
-
-    /// <summary>
-    /// XML序列化公共处理类
-    /// </summary>
-    public static class XmlSerializeHelper
-    {
-        /// <summary>
-        /// 将实体对象转换成XML
-        /// </summary>
-        /// <typeparam name="T">实体类型</typeparam>
-        /// <param name="obj">实体对象</param>
-        public static string XmlSerialize<T>(T obj)
-        {
-            try
-            {
-                using (StringWriter sw = new StringWriter())
-                {
-                    Type t = obj.GetType();
-                    XmlSerializer serializer = new XmlSerializer(obj.GetType());
-                    serializer.Serialize(sw, obj);
-                    sw.Close();
-                    return sw.ToString();
-                }
-            }
-            catch (Exception ex)
-            {
-                throw new Exception("将实体对象转换成XML异常", ex);
-            }
-        }
-
-        /// <summary>
-        /// 将XML转换成实体对象
-        /// </summary>
-        /// <typeparam name="T">实体类型</typeparam>
-        /// <param name="strXML">XML</param>
-        public static T DESerializer<T>(string strXML) where T : class
-        {
-            try
-            {
-                using (StringReader sr = new StringReader(strXML))
-                {
-                    XmlSerializer serializer = new XmlSerializer(typeof(T));
-                    return serializer.Deserialize(sr) as T;
-                }
-            }
-            catch (Exception ex)
-            {
-                throw new Exception("将XML转换成实体对象异常", ex);
-            }
-        }
-    }
-}

+ 68 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/Inner/BaseItem.cs

@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace TEAMModelOS.SDK.Models.Cosmos.Common.Inner
+{
+    public class BaseItem  : CosmosEntity
+    {
+        public bool objective { get; set; }
+        public string shaCode { get; set; }
+        // 选项 单选 多选 判断
+        // public List<CodeValue> option { get; set; }
+        public List<string> answer { get; set; }
+        //解析
+        public string explain { get; set; }
+        /// <summary>
+        /// 题型  Single单选,Multiple多选,Judge判断,Complete填空,Subjective问答,Compose综合
+        /// </summary>
+        public string type { get; set; }
+        /// <summary>
+        /// 上级shaCode
+        /// </summary>
+        public string pid { get; set; }
+        //管理知识点
+        public List<string> points { get; set; }
+        //认知层次 应用 综合 理解 评鉴 知识
+        public int? field { get; set; }
+
+        // 配分  
+        public double score { get; set; }
+        /// <summary>
+        /// 题号
+        /// </summary>
+        public int order { get; set; }
+        //补救
+        //public string repair { get; set; }
+
+        /// <summary>
+        /// 补救资源
+        /// </summary>
+        public List<Repair> repair { get; set; }
+        public string subjectId { get; set; }
+        public string periodId { get; set; }
+        public List<string> gradeIds { get; set; }
+
+        /// <summary>
+        /// 难度
+        /// </summary>
+        public int level { get; set; }
+
+        /// <summary>
+        /// 是否综合题的小题
+        /// </summary>
+        //public bool lite { get; set; } = false;
+
+        //创建时间 
+        public long createTime { get; set; }
+        //创建者
+        public string creator { get; set; }
+        //使用次数
+        // public int useCount { get; set; }
+        // public string examCode { get; set; }
+        // public string blob { get; set; }
+        public string scope { get; set; }
+        //public string pId { get; set; }
+    }
+}

+ 23 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/Inner/Exercise.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace TEAMModelOS.SDK.Models.Cosmos.Common.Inner
+{
+    /// <summary>
+    /// 用于HTEX json的数据结构
+    /// </summary>
+    public class Exercise : BaseItem
+    {
+        public Exercise()
+        {
+            pk = "Item";
+            children = new List<string>();
+            answer = new List<string>();
+            points = new List<string>();
+            gradeIds = new List<string>();
+            repair = new List<Repair>();
+        }
+        public List<string> children { get; set; }
+    }
+}

+ 24 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/Inner/Repair.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace TEAMModelOS.SDK.Models.Cosmos.Common.Inner
+{
+    /// <summary>
+    /// 补救资源
+    /// </summary>
+    public class Repair
+    {
+        /// <summary>
+        /// 文件名字
+        /// </summary>
+        public string name { get; set; }
+        /// <summary>
+        /// 补救资源绝对地址
+        /// </summary>
+        public string url { get; set; }
+        /// 文件类型
+        /// </summary>
+        public string type { get; set; }
+    }
+}

+ 4 - 60
TEAMModelOS.SDK/Models/Cosmos/Common/ItemInfo.cs

@@ -1,16 +1,13 @@
-using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
-using System.Text;
-using TEAMModelOS.SDK.Context.Attributes.Azure;
-using TEAMModelOS.SDK.DI;
+using TEAMModelOS.SDK.Models.Cosmos.Common.Inner;
 
 namespace TEAMModelOS.SDK.Models
 {
     /// <summary>
     ///  Teaching materials 教学材料  题目信息
     /// </summary>    
-    public class ItemInfo :CosmosEntity
+    public class ItemInfo :BaseItem
     {       
         public ItemInfo()
         {
@@ -20,71 +17,18 @@ namespace TEAMModelOS.SDK.Models
             answer = new List<string>();
             points = new List<string>();
             gradeIds = new List<string>();
-            repairResource = new List<ProcessRes>();
+            repair = new List<Repair>();
         }
-        public string shaCode { get; set; }
         //题干
         [Required(ErrorMessage = "{0} 必须填写")]
         public string question { get; set; }
         // 选项 单选 多选 判断
         public List<CodeValue> option { get; set; }
-        public List<string> answer { get; set; }
-        //解析
-        public string explain { get; set; }
-        /// <summary>
-        /// 题型  Single单选,Multiple多选,Judge判断,Complete填空,Subjective问答,Compose综合
-        /// </summary>
-        public string type { get; set; }
-        /// <summary>
-        /// 上级shaCode
-        /// </summary>
-        public string pShaCode { get; set; }
-        //管理知识点
-        public List<string> points { get; set; }
-        //认知层次 应用 综合 理解 评鉴 知识
-        public int? field { get; set; }
+      
         public List<ItemInfo> children { get; set; }
-        // 配分  
-        public double score { get; set; }
-        /// <summary>
-        /// 题号
-        /// </summary>
-        public int order { get; set; }
-        //补救
-        //public string repair { get; set; }
-
-        /// <summary>
-        /// 补救资源
-        /// </summary>
-        public List<ProcessRes> repairResource { get; set; }
-        
-
-
-        public string subjectId { get; set; }
-        public string periodId { get; set; }
-        public List<string> gradeIds { get; set; }
         
-        /// <summary>
-        /// 难度
-        /// </summary>
-        public int level { get; set; }
-        
-        /// <summary>
-        /// 是否综合题的小题
-        /// </summary>
-        public bool lite { get; set; } = false;
-
-        //创建时间 
-        public long createTime { get; set; }
-        //创建者
-        public string creator { get; set; }
         //使用次数
         public int useCount { get; set; }
-        public string examCode { get; set; }
         public string blob { get; set; }
-        public string scope { get; set; }
-        public string pId { get; set; }
     }
-
-
 }

+ 5 - 5
TEAMModelOS.SDK/Models/Cosmos/Common/Knowledge.cs

@@ -71,13 +71,13 @@ namespace TEAMModelOS.SDK.Models
         ///  来自于标准表 Rowkey
         /// </summary>
         
-        [Required(ErrorMessage = "{0} 必须填写")]
-        public string knowledgeId { get; set; }
+/*        [Required(ErrorMessage = "{0} 必须填写")]
+        public string knowledgeId { get; set; }*/
 
         /// <summary>
         /// 0 标准,1自建,2.....
         /// </summary>
-        
+
         [Required(ErrorMessage = "{0} 必须填写")]
         public int source { get; set; }
 
@@ -87,7 +87,7 @@ namespace TEAMModelOS.SDK.Models
         ///[Required(ErrorMessage = "{0} 必须填写")]
         
         public string periodId { get; set; }
-        public int ownCount { get; set; }
-        public int openCount { get; set; }
+/*        public int ownCount { get; set; }
+        public int openCount { get; set; }*/
     }
 }

+ 0 - 1
TEAMModelOS.SDK/Models/Cosmos/Common/Syllabus.cs

@@ -13,7 +13,6 @@ namespace TEAMModelOS.SDK.Models
     
     public class Syllabus : CosmosEntity
     {
-        [PartitionKey]
         [Required(ErrorMessage = "{0} 必须填写")]
         public string code { get; set; }
         //[PartitionKey(name = "Syllabuses")]

+ 0 - 1
TEAMModelOS.SDK/Models/Cosmos/CosmosEntity.cs

@@ -9,7 +9,6 @@ namespace TEAMModelOS.SDK.Models
     public class CosmosEntity
     {
         public string id { get; set; }
-        [PartitionKey]
         public string code { get; set; }
         public string pk { get; set; }
         public int? ttl { get; set; } = -1;

+ 0 - 2
TEAMModelOS.SDK/Models/Cosmos/School/School.cs

@@ -19,8 +19,6 @@ namespace TEAMModelOS.SDK.Models
         }
         
         public string schoolCode { get; set; }
-        // [PartitionKey]
-        //public string areaCode { get; set; }
         public string name { get; set; }
         public List<Period> period { get; set; }
         public List<Campus> campuses { get; set; }  

+ 14 - 12
TEAMModelOS/Models/SchoolInfo/SchoolProduct.cs

@@ -1,17 +1,20 @@
+
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+using System.Text.Json.Serialization;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
+using TEAMModelOS.SDK.DI;
 
-namespace TEAMModelOS.Models.SchoolInfo
-{
-    [CosmosDB(Database = "TEAMModelOS", Name = "School")]
-    public class SchoolProduct
-    {
-        public string id { get; set; }
-        [PartitionKey]
-        public string code { get; set; }
+namespace TEAMModelOS.SDK.Models
+{    
+    public class SchoolProduct : CosmosEntity
+    {        
+        public SchoolProduct()
+        {
+            pk = "Base";
+        }
         public List<SerialInfoBaseWithdeviceBound> serial { get; set; }
         public ProductService service { get; set; }
         public List<ProductHard> hard { get; set; }
@@ -84,7 +87,7 @@ namespace TEAMModelOS.Models.SchoolInfo
         public string cpu { get; set; }
         public string pc_name { get; set; }
     }
-    public class deviceBoundExt: deviceBound
+    public class deviceBoundExt : deviceBound
     {
         public string ip { get; set; }
         public string pcname { get; set; }
@@ -189,4 +192,3 @@ namespace TEAMModelOS.Models.SchoolInfo
         public long endDate { get; set; }
     }
 }
-

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/School/Vote.cs

@@ -90,5 +90,6 @@ namespace TEAMModelOS.SDK.Models
     public class OptionsVote { 
         public string code { get; set; }
         public string value { get; set; }
+        public string desc { get; set; }
     }
 }

+ 5 - 12
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -2,20 +2,13 @@
 
   <PropertyGroup>
     <TargetFramework>netcoreapp3.1</TargetFramework>
-    <Version>3.0.1217</Version>
-    <AssemblyVersion>3.0.1217.0</AssemblyVersion>
-    <FileVersion>3.0.1217.0</FileVersion>
-    <PackageReleaseNotes>520发版</PackageReleaseNotes>
+    <Version>3.0.1223</Version>
+    <AssemblyVersion>3.0.1223.0</AssemblyVersion>
+    <FileVersion>3.0.1223.0</FileVersion>
+    <PackageReleaseNotes>发版</PackageReleaseNotes>
   </PropertyGroup>
 
-  <ItemGroup>
-    <Compile Remove="Module\AzureCosmosDBV3\**" />
-    <Compile Remove="Module\AzureCosmosDB\**" />
-    <EmbeddedResource Remove="Module\AzureCosmosDBV3\**" />
-    <EmbeddedResource Remove="Module\AzureCosmosDB\**" />
-    <None Remove="Module\AzureCosmosDBV3\**" />
-    <None Remove="Module\AzureCosmosDB\**" />
-  </ItemGroup>
+  
 
   <ItemGroup>
     <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.1.0" />

+ 46 - 0
TEAMModelOS/ClientApp/src/assets/iconfont/demo_index.html

@@ -30,6 +30,18 @@
       <div class="content unicode" style="display: block;">
           <ul class="icon_lists dib-box">
           
+            <li class="dib">
+              <span class="icon iconfont">&#xe63f;</span>
+                <div class="name">表格</div>
+                <div class="code-name">&amp;#xe63f;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe62c;</span>
+                <div class="name">试卷管理@3x</div>
+                <div class="code-name">&amp;#xe62c;</div>
+              </li>
+          
             <li class="dib">
               <span class="icon iconfont">&#xe63e;</span>
                 <div class="name">选择</div>
@@ -440,6 +452,24 @@
       <div class="content font-class">
         <ul class="icon_lists dib-box">
           
+          <li class="dib">
+            <span class="icon iconfont icon-table"></span>
+            <div class="name">
+              表格
+            </div>
+            <div class="code-name">.icon-table
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-scoring"></span>
+            <div class="name">
+              试卷管理@3x
+            </div>
+            <div class="code-name">.icon-scoring
+            </div>
+          </li>
+          
           <li class="dib">
             <span class="icon iconfont icon-choose"></span>
             <div class="name">
@@ -1009,6 +1039,22 @@
       <div class="content symbol">
           <ul class="icon_lists dib-box">
           
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-table"></use>
+                </svg>
+                <div class="name">表格</div>
+                <div class="code-name">#icon-table</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-scoring"></use>
+                </svg>
+                <div class="name">试卷管理@3x</div>
+                <div class="code-name">#icon-scoring</div>
+            </li>
+          
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-choose"></use>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 14 - 6
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.css


binární
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.eot


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.js


+ 14 - 0
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.json

@@ -5,6 +5,20 @@
   "css_prefix_text": "icon-",
   "description": "",
   "glyphs": [
+    {
+      "icon_id": "1305461",
+      "name": "表格",
+      "font_class": "table",
+      "unicode": "e63f",
+      "unicode_decimal": 58943
+    },
+    {
+      "icon_id": "12896521",
+      "name": "试卷管理@3x",
+      "font_class": "scoring",
+      "unicode": "e62c",
+      "unicode_decimal": 58924
+    },
     {
       "icon_id": "833194",
       "name": "选择",

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 7 - 1
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.svg


binární
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.ttf


binární
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff


binární
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff2


+ 1 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/app-nav.css

@@ -213,6 +213,7 @@
   margin: 0px 20px;
   margin-right: 48px;
   cursor: pointer;
+  background-color:#00AD6C;
 }
 .myNav .ivu-avatar.ivu-avatar-circle.ivu-avatar-image.ivu-avatar-default {
   height: 24px !important;

+ 211 - 125
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testpop.css

@@ -1,7 +1,6 @@
 .lesson-test-pop {
   position: fixed;
   width: 100%;
-  /* Full width (cover the whole page) */
   height: 100%;
   overflow-y: scroll;
   overflow-x: hidden;
@@ -10,20 +9,88 @@
   top: 0px;
   left: 0px;
 }
+.que-box {
+    margin-top:10px;
+    width:100%;
+    max-height:300px;
+    overflow-y:scroll;
+    display: flex;
+    flex-wrap:wrap;
+}
+.ans-box {
+    border: 1px solid rgba(117, 117, 117, 0.726);
+    /*border-collapse: collapse;*/
+    /*font-weight: 500;*/
+    margin-left: 5px;
+    margin-bottom: 10px;
+    cursor: pointer;
+    width: 60px;
+    font-size: 14px;
+    border-radius: 5px;
+    text-align: center;
+    padding-top: 3px;
+    /*padding: 2px 5px;*/
+    height: 30px;
+}
+.has-ans {
+    border: 1px solid rgba(117, 117, 117, 0.726);
+    /*border-collapse: collapse;*/
+    /*font-weight: 500;*/
+    margin-left: 5px;
+    margin-bottom: 10px;
+    cursor: pointer;
+    width: 60px;
+    font-size: 14px;
+    border-radius: 5px;
+    text-align: center;
+    padding-top: 3px;
+    /*padding: 2px 5px;*/
+    height: 30px;
+    background-color: #d4ede1;
+}
+.ans-box :hover {
+    color: #24b880;
+    font-size: 16px;
+    padding: 2px 5px;
+    /*background-color: #ececec;*/
+}
+.has-ans :hover {
+    color: #24b880;
+    font-size: 16px;
+    padding: 2px 5px;
+    /*background-color: #ececec;*/
+}
 .lesson-test-pop .testTitle {
-  background-color: #ffffff;
-  color: #24b880;
-  font-size: 20px;
-  padding: 5px 15px;
-  position: relative;
-  width: 100%;
-  height: 38px;
-  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+    background-color: #ffffff;
+    color: #24b880;
+    font-size: 20px;
+    padding: 5px 15px;
+    position: relative;
+    width: 100%;
+    height: 38px;
+    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
 }
 .complete-content{
     width:35%;
     margin-top:50px;
-
+}
+.compose-box {
+    background-color: #24b880;
+    color: white;
+    width: 75%;
+    border-radius: 6px;
+}
+.compose-item {
+    display: flex;
+    margin-left: 10px;
+    max-height: 400px;
+    overflow-y: scroll;
+}
+.compose-content {
+    margin-top:30px;
+    width: 75%;
+    height: 200px;
+    z-index: 0;
 }
 .lesson-test-pop .warmMessage {
     z-index: 999;
@@ -33,21 +100,7 @@
         right: 10%;
         top: 3px;
     }
-@media screen and (max-width: 1366px) {
-  .lesson-test-pop .testTitle .ques-filter {
-    right: 15%;
-  }
-}
-@media screen and (max-width: 991px) {
-  .lesson-test-pop .testTitle .ques-filter {
-    right: 25%;
-  }
-}
-@media screen and (max-width: 767px) {
-  .lesson-test-pop .testTitle .ques-filter {
-    left: 38%;
-  }
-}
+
 .lesson-test-pop .testTitle .ques-filter .filter-text {
   padding: 2px 7px;
   border-radius: 4px;
@@ -56,11 +109,6 @@
   font-weight: bolder;
   background-color: rgba(0, 0, 0, 0.1);
 }
-@media screen and (max-width: 1366px) {
-  .lesson-test-pop .testTitle .ques-filter .filter-text {
-    right: 20%;
-  }
-}
 .lesson-test-pop .testTitle .ques-filter .filter-only {
   color: #00ad6c;
 }
@@ -72,11 +120,7 @@
 .lesson-test-pop .testTitleText {
   font-weight: 900;
 }
-@media screen and (max-width: 991px) {
-  .lesson-test-pop .testTitleText .testTitleTextContent {
-    display: none;
-  }
-}
+
 .lesson-test-pop .practice-mode {
   margin: 0px 10px;
   background-color: rgba(0, 0, 0, 0.1);
@@ -94,26 +138,8 @@
   top: -40px;
   width: 10%;
 }
-@media screen and (max-width: 1366px) {
-  .lesson-test-pop .myProgressBar {
-    right: 20%;
-  }
-}
-@media screen and (max-width: 991px) {
-  .lesson-test-pop .myProgressBar {
-    right: 23%;
-  }
-}
-@media screen and (max-width: 767px) {
-  .lesson-test-pop .myProgressBar {
-    right: 30%;
-  }
-}
-@media screen and (max-width: 680px) {
-  .lesson-test-pop .myProgressBar {
-    display: none;
-  }
-}
+
+
 .lesson-test-pop .myTestProgressContent {
   background-color: #64ae16;
   position: relative;
@@ -153,28 +179,7 @@
 .lesson-test-pop .myTestProgresstitleEn {
   left: -60%;
 }
-@media screen and (max-width: 1366px) {
-  .lesson-test-pop .myTestProgresstitle {
-    left: -40%;
-  }
-  .lesson-test-pop .myTestProgressNumEn {
-    display: none;
-  }
-  .lesson-test-pop .myTestProgressNum {
-    left: 75%;
-  }
-  .lesson-test-pop .myTestProgressNumEn {
-    display: none;
-  }
-}
-@media screen and (max-width: 991px) {
-  .lesson-test-pop .myTestProgresstitle {
-    left: -60%;
-  }
-  .lesson-test-pop .myTestProgressNum {
-    left: 65%;
-  }
-}
+
 .lesson-test-pop .submitBtn {
   outline: none;
   width: 100px;
@@ -224,11 +229,7 @@
   background-color: #ffffff;
   left: 0px;
 }
-@media screen and (max-width: 991px) {
-  .lesson-test-pop .questionArea {
-    height: auto;
-  }
-}
+
 .lesson-test-pop .questionContent {
   padding: 40px 50px;
 }
@@ -241,23 +242,15 @@
   margin-bottom: 12px;
 }
 .lesson-test-pop .questioDes {
-  font-weight: 900;
-  font-size: 14px;
-}
-@media screen and (max-width: 767px) {
-  .lesson-test-pop .questioDes {
-    font-size: 12px;
-  }
+    font-weight: 900;
+    font-size: 14px;
+    min-height:450px;
 }
+
 .lesson-test-pop .questionDesImg {
   margin-top: 40px;
 }
-@media screen and (max-width: 767px) {
-  .lesson-test-pop .questionDesImg {
-    width: 40%;
-    margin-top: 20px;
-  }
-}
+
 .lesson-test-pop .hintIcon {
   font-size: 30px;
   cursor: pointer;
@@ -315,11 +308,6 @@
   box-shadow: -5px 2px 13px rgba(0, 0, 0, 0.1);
   right: 0px;
 }
-@media screen and (max-width: 991px) {
-  .lesson-test-pop .ansArea {
-    position: relative;
-  }
-}
 .lesson-test-pop .pageCtl2 {
   position: relative;
   float: right;
@@ -350,27 +338,38 @@
   border: none;
 }
 .lesson-test-pop .checkAnswer {
-  margin-top: 40px;
+    margin-top: 30px;
+    min-height: 600px;
+}
+.lesson-test-pop .checkAnswers {
+    margin-top: 30px;
+    max-height: 400px;
+    width: 85%;
+    overflow-y: scroll;
+}
+.checkAnswers .select-box {
+    width: 100%;
+    display: flex;
+    flex-wrap: wrap;
 }
 .lesson-test-pop .questionNo {
-  margin-left: 25px;
+  /*margin-left: 5px;*/
+
   font-weight: 900;
 }
 .lesson-test-pop input[type="text"] {
-  width: 100px;
-  color: #24b880;
-  font-size: 20px;
-  border: none;
-  border-bottom: 1px solid gray;
+  width: 100%;
+  font-size: 16px;
 }
 .lesson-test-pop input[type="text"]:focus {
   outline: none;
   border-bottom: 2px solid #24b880;
 }
 .lesson-test-pop .testBtn {
-  display: block;
-  margin: 10px auto;
-  width: 90%;
+    display: block;
+    /* margin: 10px auto; */
+    width: 40%;
+    margin-left: 30px;
 }
 .lesson-test-pop .testBtn:hover {
   cursor: pointer;
@@ -420,32 +419,27 @@
   border-collapse: collapse;
   font-weight: 500;
 }
-@media screen and (max-width: 767px) {
-  .lesson-test-pop .ansSheet {
-    font-size: 10px;
-    width: 80%;
-  }
-}
+
 .lesson-test-pop .ansSheet .ansSheetQno {
   border: 2px solid rgba(117, 117, 117, 0.726);
   border-collapse: collapse;
   font-weight: 500;
   cursor: pointer;
   font-size: 14px;
-  padding: 2px 20px;
+  padding: 2px 10px;
   height: 30px;
 }
 .lesson-test-pop .ansSheet .ansSheetQno:hover {
   color: #24b880;
   font-size: 16px;
-  padding: 2px 20px;
+  padding: 2px 10px;
   background-color: #ececec;
 }
 .lesson-test-pop .ansSheet td {
   border: 2px solid rgba(117, 117, 117, 0.726);
   border-collapse: collapse;
   font-weight: 500;
-  padding: 2px 10px;
+  padding: 2px 5px;
 }
 .lesson-test-pop .ansSheet .anstext {
   text-align: center;
@@ -464,22 +458,114 @@
 .lesson-test-pop .ansSheet .wrong-ans {
   color: red;
 }
+
 .lesson-test-pop .md-ansSheetGroup {
-    margin-top: 10%;
-    overflow-y: scroll;
+    margin-top: 5%;
+    overflow-x: scroll;
     width: 100%;
 }
+.lesson-test-pop .sm-ansSheetGroup {
+    margin-left: 7%;
+    margin-bottom: 10%;
+}
 @media screen and (max-width:992px) {
   .lesson-test-pop .md-ansSheetGroup {
     display: none;
   }
 }
-.lesson-test-pop .sm-ansSheetGroup {
-  margin-left: 7%;
-  margin-bottom: 10%;
-}
 @media screen and (min-width: 992px) {
   .lesson-test-pop .sm-ansSheetGroup {
     display: none;
   }
 }
+@media screen and (max-width: 1366px) {
+    .lesson-test-pop .testTitle .ques-filter {
+        right: 15%;
+    }
+
+        .lesson-test-pop .testTitle .ques-filter .filter-text {
+            right: 20%;
+        }
+
+    .lesson-test-pop .myProgressBar {
+        right: 20%;
+    }
+
+    .lesson-test-pop .myTestProgresstitle {
+        left: -40%;
+    }
+
+    .lesson-test-pop .myTestProgressNumEn {
+        display: none;
+    }
+
+    .lesson-test-pop .myTestProgressNum {
+        left: 75%;
+    }
+
+    .lesson-test-pop .myTestProgressNumEn {
+        display: none;
+    }
+}
+@media screen and (max-width: 991px) {
+    .lesson-test-pop .testTitle .ques-filter {
+        right: 25%;
+    }
+
+    .lesson-test-pop .testTitleText .testTitleTextContent {
+        display: none;
+    }
+
+    .lesson-test-pop .myProgressBar {
+        right: 23%;
+    }
+
+    .lesson-test-pop .myTestProgresstitle {
+        left: -60%;
+    }
+
+    .lesson-test-pop .myTestProgressNum {
+        left: 65%;
+    }
+
+    .lesson-test-pop .questionArea {
+        height: auto;
+    }
+
+    .lesson-test-pop .ansArea {
+        position: relative;
+    }
+}
+@media screen and (max-width: 767px) {
+    .lesson-test-pop .testTitle .ques-filter {
+        left: 38%;
+    }
+}
+@media screen and (max-width: 767px) {
+    .lesson-test-pop .ansSheet {
+        font-size: 10px;
+        width: 80%;
+    }
+}
+@media screen and (max-width: 767px) {
+    .lesson-test-pop .questionDesImg {
+        width: 40%;
+        margin-top: 20px;
+    }
+}
+@media screen and (max-width: 767px) {
+    .lesson-test-pop .myProgressBar {
+        right: 30%;
+    }
+}
+@media screen and (max-width: 680px) {
+    .lesson-test-pop .myProgressBar {
+        display: none;
+    }
+}
+@media screen and (max-width: 767px) {
+    .lesson-test-pop .questioDes {
+        overflow-y: scroll;
+        font-size: 12px;
+    }
+}

+ 0 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testpop.less


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů