|
@@ -1,5 +1,4 @@
|
|
|
-using DevExpress.Drawing.Internal.Fonts.Interop;
|
|
|
-using DevExpress.Utils;
|
|
|
+using DevExpress.Utils;
|
|
|
using DevExpress.Utils.Svg;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
@@ -333,6 +332,18 @@ namespace DxHelper
|
|
|
return svg;
|
|
|
}
|
|
|
|
|
|
+ public static SvgImage CreateImport(int width = 24, int height = 24)
|
|
|
+ {
|
|
|
+ string xml = $"<svg xmlns='http://www.w3.org/2000/svg\' width='{width}px' height='{height}px' viewBox='0 0 32 32'>"
|
|
|
+ + $"<path fill='#727272' d='M12,12H8V6h4V12z M24,17v1v9c0,0.6-0.4,1-1,1H3c-0.6,0-1-0.4-1-1V7c0-0.6,0.4-1,1-1h3v8h14L24,17z M20,18H6v6h14V18z'/>"
|
|
|
+ + "<polygon fill='#039C23' points='32,6 24,6 24,2 16,8 24,14 24,10 32,10'/>"
|
|
|
+ + "</svg>";
|
|
|
+ MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(xml));
|
|
|
+ var svg = SvgLoader.LoadFromStream(ms);
|
|
|
+ ms.Dispose();
|
|
|
+ return svg;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 导出Excel图片
|
|
|
/// </summary>
|
|
@@ -544,7 +555,7 @@ namespace DxHelper
|
|
|
{
|
|
|
string xml = $"<svg xmlns='http://www.w3.org/2000/svg\' width='{width}px' height='{height}px' viewBox='0 0 32 32'>"
|
|
|
+ $"<circle fill='#039C23' cx='9' cy='9' r='7'/>"
|
|
|
- +$"<path fill='#FFB115' d='M24.5,2.4c0.3-0.6,0.8-0.6,1.1,0l6.3,12.5c0.3,0.6,0.1,1.1-0.5,1.1H18.7c-0.6,0-0.8-0.5-0.5-1.1L24.5,2.4z'/>"
|
|
|
+ + $"<path fill='#FFB115' d='M24.5,2.4c0.3-0.6,0.8-0.6,1.1,0l6.3,12.5c0.3,0.6,0.1,1.1-0.5,1.1H18.7c-0.6,0-0.8-0.5-0.5-1.1L24.5,2.4z'/>"
|
|
|
+ $"<path fill='#D11C1C' d='M2.4,25.9c-0.5-0.5-0.5-1.3,0-1.8l5.7-5.7c0.5-0.5,1.3-0.5,1.8,0l5.7,5.7c0.5,0.5,0.5,1.3,0,1.8l-5.7,5.7 c-0.5,0.5-1.3,0.5-1.8,0L2.4,25.9z'/>"
|
|
|
+ "</svg>";
|
|
|
MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(xml));
|
|
@@ -561,7 +572,7 @@ namespace DxHelper
|
|
|
string xml = $"<svg xmlns='http://www.w3.org/2000/svg\' width='{width}px' height='{height}px' viewBox='0 0 32 32'>"
|
|
|
+ $"<polygon fill='#039C23' points='4,8 10,2 16,8 12,8 12,14 8,14 8,8'/>"
|
|
|
+ $"<path fill='#FFB115' d='M19.5,4H28v8.5l-2.8-2.8l-4.2,4.2l-2.8-2.8l4.2-4.2L19.5,4z M14,19.5V28H5.5l2.8-2.8l-4.2-4.2l2.8-2.8l4.2,4.2L14,19.5z'/>"
|
|
|
- +$"<polygon fill='#D11C1C' points='18,24 24,30 30,24 26,24 26,18 22,18 22,24'/>"
|
|
|
+ + $"<polygon fill='#D11C1C' points='18,24 24,30 30,24 26,24 26,18 22,18 22,24'/>"
|
|
|
+ "</svg>";
|
|
|
MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(xml));
|
|
|
var svg = SvgLoader.LoadFromStream(ms);
|
|
@@ -572,7 +583,7 @@ namespace DxHelper
|
|
|
/// Info
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public static SvgImage CreateInfo (string color= "#1177D7", int width = 24, int height = 24)
|
|
|
+ public static SvgImage CreateInfo(string color = "#1177D7", int width = 24, int height = 24)
|
|
|
{
|
|
|
string xml = $"<svg xmlns='http://www.w3.org/2000/svg\' width='{width}px' height='{height}px' viewBox='0 0 32 32'>"
|
|
|
+ $"<path fill='{color}' d='M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14S23.7,2,16,2z M16,6c1.1,0,2,0.9,2,2s-0.9,2-2,2s-2-0.9-2-2S14.9,6,16,6z M20,24h-8v-2h2v-8h-2v-2h2h4v10h2V24z'/>"
|
|
@@ -587,7 +598,7 @@ namespace DxHelper
|
|
|
/// Warning
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public static SvgImage CreateWarning(string color= "#FFB115", int width = 24, int height = 24)
|
|
|
+ public static SvgImage CreateWarning(string color = "#FFB115", int width = 24, int height = 24)
|
|
|
{
|
|
|
string xml = $"<svg xmlns='http://www.w3.org/2000/svg\' width='{width}px' height='{height}px' viewBox='0 0 32 32'>"
|
|
|
+ $"<path fill='{color}' d='M14.9,4.7c0.6-1,1.5-1,2.1,0l12.7,21.5c0.6,1,0.1,1.8-1,1.8H3.3c-1.2,0-1.6-0.8-1-1.8L14.9,4.7z'/>"
|