• 大小: 132KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-01
  • 语言: C#
  • 标签: C#  winform  

资源简介

C#_winform_html编辑器_富文本编辑器

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Smith.WPF.HtmlEditor
{
    internal static class ColorExtension
    {
        public static System.Windows.Media.Color ColorConvert(this System.Drawing.Color color)
        {
            return System.Windows.Media.Color.FromArgb(color.A color.R color.G color.B);
        }

        public static System.Drawing.Color ColorConvert(this System.Windows.Media.Color color)
        {
            return System.Drawing.Color.FromArgb(color.A color.R color.G color.B);
        }

        public static bool ColorEqual(this System.Drawing.Color drawingColor System.Windows.Media.Color mediaColor)
        {
            return (drawingColor.A == mediaColor.A &&
                    drawingColor.R == mediaColor.R &&
                    drawingColor.G == mediaColor.G &&
                    drawingColor.B == mediaColor.B);
        }

        public static bool ColorEqual(this System.Windows.Media.Color mediaColor System.Drawing.Color drawingColor)
        {
            return (drawingColor.A == mediaColor.A &&
                    drawingColor.R == mediaColor.R &&
                    drawingColor.G == mediaColor.G &&
                    drawingColor.B == mediaColor.B);
        }

        public static System.Windows.Media.Color ConvertToColor(string value)
        {
            int r = 0 g = 0 b = 0;
            if (value.StartsWith(“#“))
            {
                int v = Convert.ToInt32(value.Substring(1) 16);
                r = (v >> 16) & 255; g = (v >> 8) & 255; b = v & 255;
            }
            return System.Windows.Media.Color.FromRgb(Convert.ToByte(r) Convert.ToByte(g) Convert.ToByte(b));
        }

        public static readonly System.Windows.Media.Color DefaultBackColor = System.Windows.SystemColors.WindowColor;

        public static readonly System.Windows.Media.Color DefaultForeColor = System.Windows.SystemColors.WindowTextColor;
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-01-23 16:59  SmithHtmlEditor\SmithHtmlEditor.Demo\
     文件         315  2010-10-16 13:59  SmithHtmlEditor\SmithHtmlEditor.Demo\App.xaml
     文件         994  2010-10-18 23:03  SmithHtmlEditor\SmithHtmlEditor.Demo\App.xaml.cs
     目录           0  2011-01-23 16:58  SmithHtmlEditor\SmithHtmlEditor.Demo\bin\
     目录           0  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\
     目录           0  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\en-US\
     文件       14328  2011-01-24 11:36  SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.Demo.vshost.exe
     文件         490  2009-06-11 05:14  SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\Smith.WPF.HtmlEditor.Demo.vshost.exe.manifest
     目录           0  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor.Demo\bin\Debug\zh-CN\
     文件        1543  2011-01-23 10:19  SmithHtmlEditor\SmithHtmlEditor.Demo\MainWindow.xaml
     文件        2480  2011-01-23 16:58  SmithHtmlEditor\SmithHtmlEditor.Demo\MainWindow.xaml.cs
     目录           0  2010-10-28 16:20  SmithHtmlEditor\SmithHtmlEditor.Demo\obj\
     目录           0  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\
     目录           0  2011-01-17 22:32  SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\Refactor\
     文件         547  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\SmithHtmlEditor.Demo.csproj.ResolveComReference.cache
     目录           0  2011-01-17 21:59  SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\TempPE\
     目录           0  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor.Demo\obj\Debug\zh-CN\
     目录           0  2010-10-28 16:20  SmithHtmlEditor\SmithHtmlEditor.Demo\Properties\
     文件        2225  2010-10-16 14:02  SmithHtmlEditor\SmithHtmlEditor.Demo\Properties\AssemblyInfo.cs
     目录           0  2010-10-28 16:20  SmithHtmlEditor\SmithHtmlEditor.Demo\Resources\
     文件        3763  2010-10-19 00:37  SmithHtmlEditor\SmithHtmlEditor.Demo\Resources\Resources.Designer.cs
     文件        6101  2010-10-19 00:32  SmithHtmlEditor\SmithHtmlEditor.Demo\Resources\Resources.resx
     文件           0  2010-10-19 00:37  SmithHtmlEditor\SmithHtmlEditor.Demo\Resources\Resources.zh-CN.Designer.cs
     文件        6114  2010-10-19 00:37  SmithHtmlEditor\SmithHtmlEditor.Demo\Resources\Resources.zh-CN.resx
     文件        4889  2011-01-23 16:58  SmithHtmlEditor\SmithHtmlEditor.Demo\SmithHtmlEditor.Demo.csproj
     文件        1449  2010-10-16 14:02  SmithHtmlEditor\SmithHtmlEditor.sln
     文件       60928  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor.suo
     目录           0  2011-01-23 16:59  SmithHtmlEditor\SmithHtmlEditor\
     目录           0  2011-01-22 15:53  SmithHtmlEditor\SmithHtmlEditor\bin\
     目录           0  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor\bin\Debug\
     目录           0  2011-01-24 11:37  SmithHtmlEditor\SmithHtmlEditor\bin\Debug\en-US\
............此处省略93个文件信息

评论

共有 条评论