diff --git a/MEditor.suo b/MEditor.suo index 982d4bb..2c017a8 100644 Binary files a/MEditor.suo and b/MEditor.suo differ diff --git a/MarkdownEditorManager.cs b/MarkdownEditorManager.cs index 7a1c0c3..ae5564d 100644 --- a/MarkdownEditorManager.cs +++ b/MarkdownEditorManager.cs @@ -34,7 +34,7 @@ public class MarkdownEditorManager private Color _bgColor = Color.FromArgb(0x4a,0x52,0x5a);//20,0x20,0x20; private Color _foreColor = Color.FromArgb(0xff,0xff,0xff); //0xf2,0xf0,0xdf - private Font _font = FONT; + private Font _font = new Font("微软雅黑", 12); #region defaultCss private string _defcss = @" @@ -503,22 +503,6 @@ public void SetStyle(RichTextBox rtb) rtb.WordWrap = _wordWrap; } - public void SetOldStyle() - { - _bgColor = BGColor; - _foreColor = FOREColor; - _font = FONT; - SetStyle(); - } - - public void SetBlackWhiteStyle() - { - _bgColor = Color.FromArgb(0x4a,0x52,0x5a);//20,0x20,0x20; - _foreColor = Color.FromArgb(0xff,0xff,0xff); //0xf2,0xf0,0xdf - _font = FONT; - SetStyle(); - } - public void SetBackColor(Color co) { if(_bgColor==co) diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 07fb889..d588c7d 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ // 有关程序集的常规信息通过下列属性集 // 控制。更改这些属性值可修改 // 与程序集关联的信息。 -[assembly: AssemblyTitle("MEditor")] +[assembly: AssemblyTitle("码德编辑器")] [assembly: AssemblyDescription("Markdown文档编辑器,纯自由软件")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("YihuiStudio")] -[assembly: AssemblyProduct("MEditor")] +[assembly: AssemblyProduct("码德编辑器")] [assembly: AssemblyCopyright("版权所有 (C) YihuiStudio 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs index 03e0804..2af82bb 100644 --- a/Properties/Settings.Designer.cs +++ b/Properties/Settings.Designer.cs @@ -23,92 +23,115 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio } } - [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("微软雅黑, 10.5pt")] public global::System.Drawing.Font font { get { return ((global::System.Drawing.Font)(this["font"])); } - set { - this["font"] = value; - } } - [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("White")] public global::System.Drawing.Color color { get { return ((global::System.Drawing.Color)(this["color"])); } - set { - this["color"] = value; - } } - [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("74, 82, 90")] public global::System.Drawing.Color bgcolor { get { return ((global::System.Drawing.Color)(this["bgcolor"])); } - set { - this["bgcolor"] = value; - } } - [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("body,td,th {font-family:\"\"微软雅黑\"\", Verdana, \"\"Bitstream Vera Sans\"\", sans-serif; }" + - "\r\nbody {\r\n\tmargin-top: 0;\r\n\tpadding: 0;\t\r\n\tline-height: 1.5em;\r\n\tcolor: #{1};\r\n\t" + - "background-color: #{0}; \r\n\ttext-align: left;\r\n\t}\r\na em {\r\n\tpadding-bottom: 2px;\r" + - "\n\t}\r\n\r\n\r\nsup {\r\n\tline-height: 0px;\r\n\t}\r\nsup a:link {\r\n\tpadding: 3px;\r\n\t}\r\nsup a:" + - "visited {\r\n\tpadding: 3px;\r\n\t}\r\n\r\n\r\np {\r\n \tmargin: 0 0 1.6em 0;\r\n\tpadding: 0;\r\n\t}" + - "\r\n\r\nh1 {\r\n\tfont-family: \"\"黑体\"\",\"\"Gill Sans\"\", \"\"Gill Sans Std\"\", \"\"Gill Sans MT\"" + - "\", Georgia, serif;\r\n\tfont-size: 1.55em; \r\n\tline-height: 1.5em;\r\n\ttext-align: lef" + - "t;\r\n\tfont-weight: bold;\r\n\tmargin: 0em 0px 1.25em 0px;\r\n\t}\r\n\r\nh2 {\r\n\tfont-family:" + - "\"\"黑体\"\", \"\"Gill Sans\"\", \"\"Gill Sans Std\"\", \"\"Gill Sans MT\"\", Verdana, \"\"Bitstream" + - " Vera Sans\"\", sans-serif;\r\n\tfont-size: 1.1em; /* 1 */\r\n\ttext-align: left;\r\n\tfont" + - "-weight:bold;\r\n\tline-height: 1.8em;\r\n\tletter-spacing: .2em;\r\n\tmargin: 1em 0 1em " + - "0;\r\n\ttext-transform: uppercase;\r\n\t}\r\n\r\nh1 + h2 {\r\n\tmargin-top: 2em;\r\n\t}\r\nh2 + h3" + - " {\r\n\tmargin-top: 1.5em;\r\n\t}\r\n\r\nh3 {\r\n\tfont-family: \"\"黑体\"\",Gill Sans\"\", \"\"Gill Sa" + - "ns Std\"\", \"\"Gill Sans MT\"\", Verdana, \"\"Bitstream Vera Sans\"\", sans-serif;\r\n\tfont" + - "-size: .91em;\r\n\ttext-align: left;\r\n\tfont-weight: normal;\r\n\tline-height: 1.8em;\r\n" + - "\tletter-spacing: .2em;\r\n\tmargin-bottom: 0.4em;\r\n\tmargin-top: 0.5em;\r\n\ttext-trans" + - "form: uppercase;\r\n\t}\r\n\r\np + h3 {\r\n\tmargin-top: 4em;\r\n\t}\r\npre + h3 {\r\n\tmargin-top" + - ": 4em;\r\n\t}\r\n\r\nh6 + h2 {\r\n\tmargin-top: 2em;\r\n\t}\r\n\r\nh4, h5, h6 {\r\n\tfont-family: Ve" + - "rdana, \"\"Bitstream Vera Sans\"\", sans-serif;\r\n\tfont-size: 1em;\r\n\ttext-align: left" + - ";\r\n\tfont-weight: bold;\r\n\tline-height: 1.5em;\r\n\tmargin: 1em 0 0 0;\r\n\t}\r\n\r\nstrong " + - "{\r\n\tfont-weight: bold;\r\n\tfont-size: .91em;\r\n\tletter-spacing: .2em;\r\n\ttext-transf" + - "orm: uppercase;\r\n\t}\r\n\r\nem {\r\n\tfont-style: normal;\r\n\t}\r\nblockquote {\r\n\tfont-size:" + - " 1em;\r\n\tmargin: 2em 2em 2em 1em;\r\n\tpadding: 0 .75em 0 1.25em;\r\n\tborder-left: 1px" + - " solid #777;\r\n\tborder-right: 0px solid #777;\r\n\t}\r\n\r\nblockquote strong {\r\n\tfont-w" + - "eight: bold;\r\n\tfont-size: 1em;\r\n\tletter-spacing: normal;\r\n\ttext-transform: none;" + - "\r\n\t}\r\n\r\n\r\nimg {\r\n\tmargin-top: 5px;\r\n\t}\r\n\r\nthead {\r\n\tfont-weight: bold;\r\n\t}\r\n\r\n\r\n" + - "ul, ol {\r\n\tpadding-left: 1.25em;\r\n\tmargin: 0 0 2em 1em;\r\n\t}\r\n\r\n\r\npre {\r\n\tfont-fa" + - "mily: \"\"Bitstream Vera Sans Mono\"\", Courier, Monaco, ProFont, \"\"American Typewri" + - "ter\"\", \"\"Andale Mono\"\", monospace;\r\n\tline-height: 1.45em;\r\n\tcolor: #{1};\r\n\tbackg" + - "round-color: inherit;\r\n\tmargin: 0.5em 0 0.5em 0;\r\n\tpadding: 5px 0 5px 10px;\r\n\tbo" + - "rder-width: 1px 0 1px 0;\r\n\tborder-color: #6b6b6b;\r\n\tborder-style: dashed;\r\n\t}\r\n\r" + - "\ncode {\r\n\tfont-family: Monaco, ProFont, \"\"Bitstream Vera Sans Mono\"\", \"\"American" + - " Typewriter\"\", \"\"Andale Mono\"\", monospace;\r\n\tfont-size: 0.91em; /* 1.09em for Co" + - "urier */\r\n\t}\r\n\r\n\r\nul {\r\n\tlist-style-type: square;\r\n\t}\r\n\r\nul ul {\r\n\tlist-style-ty" + - "pe: disc;\r\n\t}\r\nul ul ul {\r\n\tlist-style-type: circle;\r\n\t}\r\n\r\nhr {\r\n\theight: 1px;\r" + - "\n\tmargin: 1em 1em 1em 0;\r\n\ttext-align: center;\r\n\tborder-color: #777;\r\n\tborder-wi" + - "dth: 0;\r\n\tborder-style: dotted;\r\n\t}\r\n\r\ndt {\r\n\tfont-family: Verdana, \"\"Bitstream " + - "Vera Sans\"\", sans-serif;\r\n\tfont-size: 1em;\r\n\ttext-align: left;\r\n\tfont-weight: no" + - "rmal;\r\n\tmargin: 0 0 .4em 0;\r\n\tletter-spacing: normal;\r\n\ttext-transform: none;\r\n\t" + - "}\r\ndd {\r\n\tmargin: auto auto 1.5em 1em;\r\n\t}\r\n\r\ndd p {\r\n\tmargin: 0 0 1em 0;\r\n\t}\r\n\r" + - "\ntable{\r\n border:1px #CCC solid; \r\nborder-collapse: separate;border-spacin" + - "g: 0;\r\n}\r\nth,td{padding:5px;border: 1px solid #CCC;}")] + [global::System.Configuration.DefaultSettingValueAttribute("body,td,th {font-family:\"微软雅黑\", Verdana, \"Bitstream Vera Sans\", sans-serif; }\r\nbo" + + "dy {\r\n\tmargin-top: 0;\r\n\tpadding: 0;\t\r\n\tline-height: 1.5em;\r\n\tcolor: #{1};\r\n\tback" + + "ground-color: #{0}; \r\n\ttext-align: left;\r\n\t}\r\na em {\r\n\tpadding-bottom: 2px;\r\n\t}\r" + + "\n\r\n\r\nsup {\r\n\tline-height: 0px;\r\n\t}\r\nsup a:link {\r\n\tpadding: 3px;\r\n\t}\r\nsup a:visi" + + "ted {\r\n\tpadding: 3px;\r\n\t}\r\n\r\n\r\np {\r\n \tmargin: 0 0 1.6em 0;\r\n\tpadding: 0;\r\n\t}\r\n\r\n" + + "h1 {\r\n\tfont-family: \"黑体\",\"Gill Sans\", \"Gill Sans Std\", \"Gill Sans MT\", Georgia, " + + "serif;\r\n\tfont-size: 1.55em; \r\n\tline-height: 1.5em;\r\n\ttext-align: left;\r\n\tfont-we" + + "ight: bold;\r\n\tmargin: 0em 0px 1.25em 0px;\r\n\t}\r\n\r\nh2 {\r\n\tfont-family:\"黑体\", \"Gill " + + "Sans\", \"Gill Sans Std\", \"Gill Sans MT\", Verdana, \"Bitstream Vera Sans\", sans-ser" + + "if;\r\n\tfont-size: 1.1em; /* 1 */\r\n\ttext-align: left;\r\n\tfont-weight:bold;\r\n\tline-h" + + "eight: 1.8em;\r\n\tletter-spacing: .2em;\r\n\tmargin: 1em 0 1em 0;\r\n\ttext-transform: u" + + "ppercase;\r\n\t}\r\n\r\nh1 + h2 {\r\n\tmargin-top: 2em;\r\n\t}\r\nh2 + h3 {\r\n\tmargin-top: 1.5em" + + ";\r\n\t}\r\n\r\nh3 {\r\n\tfont-family: \"黑体\",Gill Sans\", \"Gill Sans Std\", \"Gill Sans MT\", V" + + "erdana, \"Bitstream Vera Sans\", sans-serif;\r\n\tfont-size: .91em;\r\n\ttext-align: lef" + + "t;\r\n\tfont-weight: normal;\r\n\tline-height: 1.8em;\r\n\tletter-spacing: .2em;\r\n\tmargin" + + "-bottom: 0.4em;\r\n\tmargin-top: 0.5em;\r\n\ttext-transform: uppercase;\r\n\t}\r\n\r\np + h3 " + + "{\r\n\tmargin-top: 4em;\r\n\t}\r\npre + h3 {\r\n\tmargin-top: 4em;\r\n\t}\r\n\r\nh6 + h2 {\r\n\tmargi" + + "n-top: 2em;\r\n\t}\r\n\r\nh4, h5, h6 {\r\n\tfont-family: Verdana, \"Bitstream Vera Sans\", s" + + "ans-serif;\r\n\tfont-size: 1em;\r\n\ttext-align: left;\r\n\tfont-weight: bold;\r\n\tline-hei" + + "ght: 1.5em;\r\n\tmargin: 1em 0 0 0;\r\n\t}\r\n\r\nstrong {\r\n\tfont-weight: bold;\r\n\tfont-siz" + + "e: .91em;\r\n\tletter-spacing: .2em;\r\n\ttext-transform: uppercase;\r\n\t}\r\n\r\nem {\r\n\tfon" + + "t-style: normal;\r\n\t}\r\nblockquote {\r\n\tfont-size: 1em;\r\n\tmargin: 2em 2em 2em 1em;\r" + + "\n\tpadding: 0 .75em 0 1.25em;\r\n\tborder-left: 1px solid #777;\r\n\tborder-right: 0px " + + "solid #777;\r\n\t}\r\n\r\nblockquote strong {\r\n\tfont-weight: bold;\r\n\tfont-size: 1em;\r\n\t" + + "letter-spacing: normal;\r\n\ttext-transform: none;\r\n\t}\r\n\r\n\r\nimg {\r\n\tmargin-top: 5px" + + ";\r\n\t}\r\n\r\nthead {\r\n\tfont-weight: bold;\r\n\t}\r\n\r\n\r\nul, ol {\r\n\tpadding-left: 1.25em;\r" + + "\n\tmargin: 0 0 2em 1em;\r\n\t}\r\n\r\n\r\npre {\r\n\tfont-family: \"Bitstream Vera Sans Mono\"," + + " Courier, Monaco, ProFont, \"American Typewriter\", \"Andale Mono\", monospace;\r\n\tli" + + "ne-height: 1.45em;\r\n\tcolor: #{1};\r\n\tbackground-color: inherit;\r\n\tmargin: 0.5em 0" + + " 0.5em 0;\r\n\tpadding: 5px 0 5px 10px;\r\n\tborder-width: 1px 0 1px 0;\r\n\tborder-color" + + ": #6b6b6b;\r\n\tborder-style: dashed;\r\n\t}\r\n\r\ncode {\r\n\tfont-family: Monaco, ProFont," + + " \"Bitstream Vera Sans Mono\", \"American Typewriter\", \"Andale Mono\", monospace;\r\n\t" + + "font-size: 0.91em; /* 1.09em for Courier */\r\n\t}\r\n\r\n\r\nul {\r\n\tlist-style-type: squ" + + "are;\r\n\t}\r\n\r\nul ul {\r\n\tlist-style-type: disc;\r\n\t}\r\nul ul ul {\r\n\tlist-style-type: " + + "circle;\r\n\t}\r\n\r\nhr {\r\n\theight: 1px;\r\n\tmargin: 1em 1em 1em 0;\r\n\ttext-align: center" + + ";\r\n\tborder-color: #777;\r\n\tborder-width: 0;\r\n\tborder-style: dotted;\r\n\t}\r\n\r\ndt {\r\n" + + "\tfont-family: Verdana, \"Bitstream Vera Sans\", sans-serif;\r\n\tfont-size: 1em;\r\n\tte" + + "xt-align: left;\r\n\tfont-weight: normal;\r\n\tmargin: 0 0 .4em 0;\r\n\tletter-spacing: n" + + "ormal;\r\n\ttext-transform: none;\r\n\t}\r\ndd {\r\n\tmargin: auto auto 1.5em 1em;\r\n\t}\r\n\r\nd" + + "d p {\r\n\tmargin: 0 0 1em 0;\r\n\t}\r\n\r\ntable{\r\n border:1px #CCC solid; \r\nborder" + + "-collapse: separate;border-spacing: 0;\r\n}\r\nth,td{padding:5px;border: 1px solid #" + + "CCC;}")] public string css { get { return ((string)(this["css"])); } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute(@" + + + +
+ + + + + + {font} + + + {color} + + + {bgcolor} + + + {css} + + + +")] + public string appconfig { + get { + return ((string)(this["appconfig"])); + } set { - this["css"] = value; + this["appconfig"] = value; } } } diff --git a/Properties/Settings.settings b/Properties/Settings.settings index 5f441c5..c3788d8 100644 --- a/Properties/Settings.settings +++ b/Properties/Settings.settings @@ -2,17 +2,17 @@ - + 微软雅黑, 10.5pt - + White - + 74, 82, 90 - - body,td,th {font-family:""微软雅黑"", Verdana, ""Bitstream Vera Sans"", sans-serif; } + + body,td,th {font-family:"微软雅黑", Verdana, "Bitstream Vera Sans", sans-serif; } body { margin-top: 0; padding: 0; @@ -43,7 +43,7 @@ p { } h1 { - font-family: ""黑体"",""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Georgia, serif; + font-family: "黑体","Gill Sans", "Gill Sans Std", "Gill Sans MT", Georgia, serif; font-size: 1.55em; line-height: 1.5em; text-align: left; @@ -52,7 +52,7 @@ h1 { } h2 { - font-family:""黑体"", ""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family:"黑体", "Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1.1em; /* 1 */ text-align: left; font-weight:bold; @@ -70,7 +70,7 @@ h2 + h3 { } h3 { - font-family: ""黑体"",Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: "黑体",Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: .91em; text-align: left; font-weight: normal; @@ -93,7 +93,7 @@ h6 + h2 { } h4, h5, h6 { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: bold; @@ -143,7 +143,7 @@ ul, ol { pre { - font-family: ""Bitstream Vera Sans Mono"", Courier, Monaco, ProFont, ""American Typewriter"", ""Andale Mono"", monospace; + font-family: "Bitstream Vera Sans Mono", Courier, Monaco, ProFont, "American Typewriter", "Andale Mono", monospace; line-height: 1.45em; color: #{1}; background-color: inherit; @@ -155,7 +155,7 @@ pre { } code { - font-family: Monaco, ProFont, ""Bitstream Vera Sans Mono"", ""American Typewriter"", ""Andale Mono"", monospace; + font-family: Monaco, ProFont, "Bitstream Vera Sans Mono", "American Typewriter", "Andale Mono", monospace; font-size: 0.91em; /* 1.09em for Courier */ } @@ -181,7 +181,7 @@ hr { } dt { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: normal; @@ -203,5 +203,31 @@ border-collapse: separate;border-spacing: 0; } th,td{padding:5px;border: 1px solid #CCC;} + + <?xml version="1.0" encoding="utf-8" ?> +<configuration> + <configSections> + <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > + <section name="MEditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </sectionGroup> + </configSections> + <applicationSettings> + <MEditor.Properties.Settings> + <setting name="font" serializeAs="String"> + <value>{font}</value> + </setting> + <setting name="color" serializeAs="String"> + <value>{color}</value> + </setting> + <setting name="bgcolor" serializeAs="String"> + <value>{bgcolor}</value> + </setting> + <setting name="css" serializeAs="String"> + <value>{css}</value> + </setting> + </MEditor.Properties.Settings> + </applicationSettings> +</configuration> + \ No newline at end of file diff --git a/app.config b/app.config index 29894a1..f381ec4 100644 --- a/app.config +++ b/app.config @@ -1,11 +1,14 @@  + +
+
- + 微软雅黑, 10.5pt @@ -17,7 +20,7 @@ 74, 82, 90 - body,td,th {font-family:""微软雅黑"", Verdana, ""Bitstream Vera Sans"", sans-serif; } + body,td,th {font-family:"微软雅黑", Verdana, "Bitstream Vera Sans", sans-serif; } body { margin-top: 0; padding: 0; @@ -48,7 +51,7 @@ p { } h1 { - font-family: ""黑体"",""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Georgia, serif; + font-family: "黑体","Gill Sans", "Gill Sans Std", "Gill Sans MT", Georgia, serif; font-size: 1.55em; line-height: 1.5em; text-align: left; @@ -57,7 +60,7 @@ h1 { } h2 { - font-family:""黑体"", ""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family:"黑体", "Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1.1em; /* 1 */ text-align: left; font-weight:bold; @@ -75,7 +78,7 @@ h2 + h3 { } h3 { - font-family: ""黑体"",Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: "黑体",Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: .91em; text-align: left; font-weight: normal; @@ -98,7 +101,7 @@ h6 + h2 { } h4, h5, h6 { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: bold; @@ -148,7 +151,7 @@ ul, ol { pre { - font-family: ""Bitstream Vera Sans Mono"", Courier, Monaco, ProFont, ""American Typewriter"", ""Andale Mono"", monospace; + font-family: "Bitstream Vera Sans Mono", Courier, Monaco, ProFont, "American Typewriter", "Andale Mono", monospace; line-height: 1.45em; color: #{1}; background-color: inherit; @@ -160,7 +163,7 @@ pre { } code { - font-family: Monaco, ProFont, ""Bitstream Vera Sans Mono"", ""American Typewriter"", ""Andale Mono"", monospace; + font-family: Monaco, ProFont, "Bitstream Vera Sans Mono", "American Typewriter", "Andale Mono", monospace; font-size: 0.91em; /* 1.09em for Courier */ } @@ -186,7 +189,7 @@ hr { } dt { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: normal; @@ -209,5 +212,35 @@ border-collapse: separate;border-spacing: 0; th,td{padding:5px;border: 1px solid #CCC;} + + + + + <?xml version="1.0" encoding="utf-8" ?> +<configuration> + <configSections> + <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > + <section name="MEditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </sectionGroup> + </configSections> + <applicationSettings> + <MEditor.Properties.Settings> + <setting name="font" serializeAs="String"> + <value>{font}</value> + </setting> + <setting name="color" serializeAs="String"> + <value>{color}</value> + </setting> + <setting name="bgcolor" serializeAs="String"> + <value>{bgcolor}</value> + </setting> + <setting name="css" serializeAs="String"> + <value>{css}</value> + </setting> + </MEditor.Properties.Settings> + </applicationSettings> +</configuration> + + \ No newline at end of file diff --git a/exeoutput/MEditor.exe b/exeoutput/MEditor.exe index e6a74da..1df152c 100644 Binary files a/exeoutput/MEditor.exe and b/exeoutput/MEditor.exe differ diff --git a/exeoutput/MEditor.exe.config b/exeoutput/MEditor.exe.config index 29894a1..1f56bc5 100644 --- a/exeoutput/MEditor.exe.config +++ b/exeoutput/MEditor.exe.config @@ -1,24 +1,24 @@  - -
+ +
- + - 微软雅黑, 10.5pt + [Font: Name=微软雅黑, Size=10.5, Units=3, GdiCharSet=1, GdiVerticalFont=False] - White + 255,255,255 - 74, 82, 90 + 74,82,90 - body,td,th {font-family:""微软雅黑"", Verdana, ""Bitstream Vera Sans"", sans-serif; } -body { + body,td,th {font-family:"微软雅黑", Verdana, "Bitstream Vera Sans", sans-serif; } +body {/**/ margin-top: 0; padding: 0; line-height: 1.5em; @@ -48,7 +48,7 @@ p { } h1 { - font-family: ""黑体"",""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Georgia, serif; + font-family: "黑体","Gill Sans", "Gill Sans Std", "Gill Sans MT", Georgia, serif; font-size: 1.55em; line-height: 1.5em; text-align: left; @@ -57,7 +57,7 @@ h1 { } h2 { - font-family:""黑体"", ""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family:"黑体", "Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1.1em; /* 1 */ text-align: left; font-weight:bold; @@ -75,7 +75,7 @@ h2 + h3 { } h3 { - font-family: ""黑体"",Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: "黑体",Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: .91em; text-align: left; font-weight: normal; @@ -98,7 +98,7 @@ h6 + h2 { } h4, h5, h6 { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: bold; @@ -148,7 +148,7 @@ ul, ol { pre { - font-family: ""Bitstream Vera Sans Mono"", Courier, Monaco, ProFont, ""American Typewriter"", ""Andale Mono"", monospace; + font-family: "Bitstream Vera Sans Mono", Courier, Monaco, ProFont, "American Typewriter", "Andale Mono", monospace; line-height: 1.45em; color: #{1}; background-color: inherit; @@ -160,7 +160,7 @@ pre { } code { - font-family: Monaco, ProFont, ""Bitstream Vera Sans Mono"", ""American Typewriter"", ""Andale Mono"", monospace; + font-family: Monaco, ProFont, "Bitstream Vera Sans Mono", "American Typewriter", "Andale Mono", monospace; font-size: 0.91em; /* 1.09em for Courier */ } @@ -186,7 +186,7 @@ hr { } dt { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: normal; @@ -209,5 +209,5 @@ border-collapse: separate;border-spacing: 0; th,td{padding:5px;border: 1px solid #CCC;} - + \ No newline at end of file diff --git a/exeoutput/MEditor.pdb b/exeoutput/MEditor.pdb index 958eea7..bb6e580 100644 Binary files a/exeoutput/MEditor.pdb and b/exeoutput/MEditor.pdb differ diff --git a/exeoutput/MEditor.vshost.exe.config b/exeoutput/MEditor.vshost.exe.config index 29894a1..1f56bc5 100644 --- a/exeoutput/MEditor.vshost.exe.config +++ b/exeoutput/MEditor.vshost.exe.config @@ -1,24 +1,24 @@  - -
+ +
- + - 微软雅黑, 10.5pt + [Font: Name=微软雅黑, Size=10.5, Units=3, GdiCharSet=1, GdiVerticalFont=False] - White + 255,255,255 - 74, 82, 90 + 74,82,90 - body,td,th {font-family:""微软雅黑"", Verdana, ""Bitstream Vera Sans"", sans-serif; } -body { + body,td,th {font-family:"微软雅黑", Verdana, "Bitstream Vera Sans", sans-serif; } +body {/**/ margin-top: 0; padding: 0; line-height: 1.5em; @@ -48,7 +48,7 @@ p { } h1 { - font-family: ""黑体"",""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Georgia, serif; + font-family: "黑体","Gill Sans", "Gill Sans Std", "Gill Sans MT", Georgia, serif; font-size: 1.55em; line-height: 1.5em; text-align: left; @@ -57,7 +57,7 @@ h1 { } h2 { - font-family:""黑体"", ""Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family:"黑体", "Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1.1em; /* 1 */ text-align: left; font-weight:bold; @@ -75,7 +75,7 @@ h2 + h3 { } h3 { - font-family: ""黑体"",Gill Sans"", ""Gill Sans Std"", ""Gill Sans MT"", Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: "黑体",Gill Sans", "Gill Sans Std", "Gill Sans MT", Verdana, "Bitstream Vera Sans", sans-serif; font-size: .91em; text-align: left; font-weight: normal; @@ -98,7 +98,7 @@ h6 + h2 { } h4, h5, h6 { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: bold; @@ -148,7 +148,7 @@ ul, ol { pre { - font-family: ""Bitstream Vera Sans Mono"", Courier, Monaco, ProFont, ""American Typewriter"", ""Andale Mono"", monospace; + font-family: "Bitstream Vera Sans Mono", Courier, Monaco, ProFont, "American Typewriter", "Andale Mono", monospace; line-height: 1.45em; color: #{1}; background-color: inherit; @@ -160,7 +160,7 @@ pre { } code { - font-family: Monaco, ProFont, ""Bitstream Vera Sans Mono"", ""American Typewriter"", ""Andale Mono"", monospace; + font-family: Monaco, ProFont, "Bitstream Vera Sans Mono", "American Typewriter", "Andale Mono", monospace; font-size: 0.91em; /* 1.09em for Courier */ } @@ -186,7 +186,7 @@ hr { } dt { - font-family: Verdana, ""Bitstream Vera Sans"", sans-serif; + font-family: Verdana, "Bitstream Vera Sans", sans-serif; font-size: 1em; text-align: left; font-weight: normal; @@ -209,5 +209,5 @@ border-collapse: separate;border-spacing: 0; th,td{padding:5px;border: 1px solid #CCC;} - + \ No newline at end of file diff --git a/frmCss.Designer.cs b/frmCss.Designer.cs index b1f6840..081a7ae 100644 --- a/frmCss.Designer.cs +++ b/frmCss.Designer.cs @@ -38,14 +38,15 @@ private void InitializeComponent() this.txtTabWidth = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.button1.Location = new System.Drawing.Point(310, 327); + this.button1.Location = new System.Drawing.Point(259, 338); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(114, 33); + this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "取消(&C)"; this.button1.UseVisualStyleBackColor = true; @@ -62,9 +63,9 @@ private void InitializeComponent() // // button2 // - this.button2.Location = new System.Drawing.Point(179, 327); + this.button2.Location = new System.Drawing.Point(179, 337); this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(116, 33); + this.button2.Size = new System.Drawing.Size(74, 23); this.button2.TabIndex = 2; this.button2.Text = "保存(&S)"; this.button2.UseVisualStyleBackColor = true; @@ -130,20 +131,31 @@ private void InitializeComponent() // // button6 // - this.button6.Location = new System.Drawing.Point(433, 327); + this.button6.Location = new System.Drawing.Point(340, 337); this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(100, 31); + this.button6.Size = new System.Drawing.Size(99, 24); this.button6.TabIndex = 9; - this.button6.Text = "还原为默认设置"; + this.button6.Text = "还原白底黑字"; this.button6.UseVisualStyleBackColor = true; this.button6.Click += new System.EventHandler(this.button6_Click); // + // button7 + // + this.button7.Location = new System.Drawing.Point(445, 336); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(99, 24); + this.button7.TabIndex = 10; + this.button7.Text = "还原黑底白字"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // // frmCss // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.button1; this.ClientSize = new System.Drawing.Size(587, 370); + this.Controls.Add(this.button7); this.Controls.Add(this.button6); this.Controls.Add(this.label2); this.Controls.Add(this.txtTabWidth); @@ -179,5 +191,6 @@ private void InitializeComponent() private System.Windows.Forms.TextBox txtTabWidth; private System.Windows.Forms.Label label2; private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; } } \ No newline at end of file diff --git a/frmCss.cs b/frmCss.cs index 36302f6..a2161c2 100644 --- a/frmCss.cs +++ b/frmCss.cs @@ -31,6 +31,8 @@ private void button2_Click(object sender, EventArgs e) { _fm.SetCss(txtTabWidth.Text); _fm.SetCss(txtCss.Text); + _fm.SaveSettings(); + Close(); } @@ -58,9 +60,19 @@ private void button5_Click(object sender, EventArgs e) private void button6_Click(object sender, EventArgs e) { Settings.Default.Reset(); - _fm.ReadCss(); _css = Settings.Default.css; txtCss.Text = _css; + _fm.SetOldStyle(); + //_fm.ReadCss(); + } + + private void button7_Click(object sender, EventArgs e) + { + Settings.Default.Reset(); + _css = Settings.Default.css; + txtCss.Text = _css; + _fm.SetBlackWhiteStyle(); + //_fm.ReadCss(); } } diff --git a/frmMain.Designer.cs b/frmMain.Designer.cs index 384e3f8..4573f19 100644 --- a/frmMain.Designer.cs +++ b/frmMain.Designer.cs @@ -564,6 +564,7 @@ private void InitializeComponent() this.还原系统原设置ToolStripMenuItem.Name = "还原系统原设置ToolStripMenuItem"; this.还原系统原设置ToolStripMenuItem.Size = new System.Drawing.Size(173, 22); this.还原系统原设置ToolStripMenuItem.Text = "经典白底黑字"; + this.还原系统原设置ToolStripMenuItem.Visible = false; this.还原系统原设置ToolStripMenuItem.Click += new System.EventHandler(this.还原系统原设置ToolStripMenuItem_Click); // // 经典黑底白字ToolStripMenuItem @@ -571,6 +572,7 @@ private void InitializeComponent() this.经典黑底白字ToolStripMenuItem.Name = "经典黑底白字ToolStripMenuItem"; this.经典黑底白字ToolStripMenuItem.Size = new System.Drawing.Size(173, 22); this.经典黑底白字ToolStripMenuItem.Text = "默认黑底白字"; + this.经典黑底白字ToolStripMenuItem.Visible = false; this.经典黑底白字ToolStripMenuItem.Click += new System.EventHandler(this.经典黑底白字ToolStripMenuItem_Click); // // html预览样式设计ToolStripMenuItem @@ -756,7 +758,6 @@ private void InitializeComponent() // this.tabControl1.ContextMenuStrip = this.contextMenuStrip1; this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.HotTrack = true; this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; @@ -820,7 +821,6 @@ private void InitializeComponent() // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; - this.webBrowser1.IsWebBrowserContextMenuEnabled = false; this.webBrowser1.Location = new System.Drawing.Point(3, 3); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; diff --git a/frmMain.cs b/frmMain.cs index 49df43c..1f17157 100644 --- a/frmMain.cs +++ b/frmMain.cs @@ -480,8 +480,8 @@ private void toolStripButton3_Click(object sender, EventArgs e) private void 还原系统原设置ToolStripMenuItem_Click(object sender, EventArgs e) { - meditorManager.SetOldStyle(); - meditorManager.SetStyle(rtbHtml); + //meditorManager.SetOldStyle(); + //meditorManager.SetStyle(rtbHtml); } private void frmMain_Load(object sender, EventArgs e) @@ -630,7 +630,7 @@ private void splitContainer1_DoubleClick(object sender, EventArgs e) private void 经典黑底白字ToolStripMenuItem_Click(object sender, EventArgs e) { - meditorManager.SetBlackWhiteStyle(); + //meditorManager.SetBlackWhiteStyle(); } private void 取消md文件关联ToolStripMenuItem_Click(object sender, EventArgs e) @@ -668,7 +668,7 @@ private void mEditor快捷键ToolStripMenuItem_Click(object sender, EventArgs e) } private void mEditor网站ToolStripMenuItem_Click(object sender, EventArgs e) { - System.Diagnostics.Process.Start("https://github.com/5d13cn/MEditor"); + showSyntax("https://github.com/5d13cn/MEditor"); } private void 检查最新版ToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/frmMain.resx b/frmMain.resx index c4d56f7..29a967f 100644 --- a/frmMain.resx +++ b/frmMain.resx @@ -218,16 +218,16 @@ GRkZLy8yGB0dvenn57dfV1fnZWRkpDcAhuhGTU2Nn5pd9AADKCgoeEKn5idCFx+ioKEmRFVV1W3yEJ2e wmdoaCgKgKBOmGtzTk5OR87OzpT4vwcHwBD00FuM5TfuhcLCwkeaAOnp6c/t7OzOqQwrKyvDuCyGYF+X x0pLSx9iiE9JLj8/vwX1bHQC5ObmPqWF2tralomJCVhZWYHe3l4Z5oVEdU5NTR339PTs0Ts81UeSk0gk - MDIycqgpS8+Dg4MH8/PzMDs7q8AesUHvLgXY2tqyXF9fVwKOnZ0dCAwMBC8vLzax0cDx8TFgA2PPdFUo + MDIycqgpS8+Dg4MH8/PzMDs7q8AesUHvLgXY2tqyXF1dVQKOnZ0dCAwMBC8vLzax0cDx8TFgA2PPdFUo FCQKS0tLghyXp+vw8DBbPz8/F/QuBaDF0dHRE6aFo6KiQjDc398Pa2trwrM+ANiYoKOjAzDEgp4oQE5O - zqFSyZwA09PTTNHf3x9kMhlgol4JQNUb3I4oAPWDzc1NBkAuDwkJAUwm2N3dVQuJPh7gAJi8MDAwAKur - q1Q12lXAk5BWCKC7u5tHAVpbW2FycpIZUD2RPgBRUVEwMzPDbC0vLwN+g7QBLCwslNiEnnEsAsCMhdPT - U6ZIrj84OADM+isBYLMCTGhmg6qFw6t5gJqPsbExYOd7pQpAwkTMx+LiolaWi3mAEo8PbEa6AbDuH1CT - iImJkWoCYKcTDKhWAz9JbGysUIYLCwtagLTppQDUzegrSAA2NjaKsrKyQp4DtAkln1wuZyGgKtDM6Kam - JmGD7e1tiIyMVJPBHxZhnUJBwD4+PmBAfzKhoaFfHRwczngr5Vd3d/cfePIjvtnY2Bj09fUJhgkK+wRI - pVLBOL+hiqGwUcaTvre3N4yPjwty1IwolwzCwsL63NzcpPhh+IQbruP9e5r4U/EBP0Ib+LMh5wBBQUFq - pw8ODobOzk7o6uqCtrY2ViF8tre3A1UP75Rkg05M69iKWcseGhpSrwJdHxCqAk13/81nXXuqvbsGuPbA - tQf+ew/8ArvlCj0RtXAIAAAAAElFTkSuQmCC + zqFSyZwA09PTTNHf3x9kMhlgol4JQNUb3I4oAPWDzc1NBkAuDwkJAUwm2N3dVQuJPh7gAJi8MDAwABhe + qhrtKuBJSCsE0N3dzaMAra2tMDk5yQyonkgfgKioKJiZmWG2lpeXAb9B2gAWFhZKbELPOBYBYMbC6ekp + UyTXHxwcAGb9lQCwWcH6+jqzQdXC4dU8QM3H2NgYsPO9UgUgYSLmY3FxUSvLxTxAiccHNiPdAFj3D6hJ + xMTESDUBsNMJBlSrgZ8kNjZWKMOFhQUtQNr0UgDqZvQVJAAbGxtFWVlZIc8B2oSSTy6XsxBQFWhmdFNT + k7DB9vY2REZGqsngD4uwTqEgYB8fHzCgP5nQ0NCvDg4OZ7yV8qu7u/sPPPkR32xsbAz6+voEwwSFfQKk + UqlgnN9QxVDYKONJ39vbG8bHxwU5akaUSwZhYWF9bm5uUvwwfMIN1/H+PU38qfiAH6EN/NmQc4CgoCC1 + 0wcHB0NnZyd0dXVBW1sbqxA+29vbgaqHd0qyQSemdWzFrGUPDQ2pV4GuDwhVgaa7/+azrj3V3l0DXHvg + 2gP/vQd+AYA5CjeimV6FAAAAAElFTkSuQmCC diff --git a/frmMain_code.cs b/frmMain_code.cs index 39da53a..e5d6926 100644 --- a/frmMain_code.cs +++ b/frmMain_code.cs @@ -232,6 +232,8 @@ public void ReadCss() meditorManager.SetForeColor(_foreColor); meditorManager.SetBackColor(_bgColor ); meditorManager.SetCss(_defcss); + + //MessageBox.Show(Settings.Default.appconfig.ToString()); } public void OpenMRUFile(string fileName) @@ -292,7 +294,8 @@ private void PreviewHtml() rtbHtml.Text = html; } - webBrowser1.DocumentText = meditorManager.GetHTMLStyle(html); + webBrowser1.DocumentText = meditorManager.GetHTMLStyle(html); + tabBrowser.Text = meditor.MarkdownPage.Text; this.toolStripStatusLabel1.Text = "当前文档:" + meditor.FileName; if (isLeft) @@ -319,8 +322,59 @@ public void SelectForeColor() meditorManager.SetForeColor(_foreColor); meditorManager.SetStyle(rtbHtml); - Settings.Default.color = _foreColor; - Settings.Default.Save(); + //Settings.Default.color = _foreColor; + //Settings.Default.Save(); + } + } + + + public void SetOldStyle() + { + _bgColor = Color.FromArgb(0xff, 0xff, 0xff);//20,0x20,0x20; + _foreColor = Color.FromArgb(0x00, 0x00, 0x00); //0xf2,0xf0,0xdf + _font = new Font("微软雅黑",12); + + setstyle(); + //SaveSettings(); + } + + public void SetBlackWhiteStyle() + { + _bgColor = Color.FromArgb(0x4a, 0x52, 0x5a);//20,0x20,0x20; + _foreColor = Color.FromArgb(0xff, 0xff, 0xff); //0xf2,0xf0,0xdf + _font = new Font("微软雅黑", 12); + setstyle(); + //SaveSettings(); + } + + private void setstyle() + { + meditorManager.SetFont(_font); + meditorManager.SetForeColor(_foreColor); + meditorManager.SetBackColor(_bgColor); + + meditorManager.SetStyle(rtbHtml); + } + + private string convertColor(Color co) + { + return co.R.ToString() +","+ co.G.ToString() +","+ co.B.ToString(); + } + public void SaveSettings() + { + string appconfig = Settings.Default.appconfig; + + appconfig=appconfig.Replace("{font}", _font.ToString()); + appconfig = appconfig.Replace("{color}", convertColor(_foreColor)); + appconfig = appconfig.Replace("{bgcolor}", convertColor(_bgColor)); + appconfig = appconfig.Replace("{css}", _defcss); + + string conffile = Application.UserAppDataPath; + conffile = Application.ExecutablePath+".config"; + using (StreamWriter sw = new StreamWriter(conffile, false, Encoding.UTF8)) + { + sw.Write(appconfig); + sw.Close(); } } @@ -333,8 +387,8 @@ public void SelectBackColor() meditorManager.SetBackColor(_bgColor); meditorManager.SetStyle(rtbHtml); - Settings.Default.bgcolor = _bgColor; - Settings.Default.Save(); + //Settings.Default.bgcolor = _bgColor; + //Settings.Default.Save(); } } public void SelectFont() @@ -346,8 +400,8 @@ public void SelectFont() meditorManager.SetFont(_font); meditorManager.SetStyle(rtbHtml); - Settings.Default.font =_font; - Settings.Default.Save(); + //Settings.Default.font =_font; + //Settings.Default.Save(); } } @@ -356,8 +410,8 @@ public void SetCss(string css) _defcss = css; meditorManager.SetCss(_defcss); PreviewHtml(); - Settings.Default.css = _defcss; - Settings.Default.Save(); + //Settings.Default.css = _defcss; + //Settings.Default.Save(); } private void editCss() @@ -369,7 +423,8 @@ private void editCss() private void showSyntax(string url) { toolStripStatusLabel1.Text ="正在打开" +url+"..." ; - webBrowser1.Navigate(url); + System.Diagnostics.Process.Start(url); + //webBrowser1.Navigate(url); //webBrowser1.DocumentText = html; if (splitContainer1.Panel2Collapsed) diff --git a/obj/Release/MDEditor.csproj.GenerateResource.Cache b/obj/Release/MDEditor.csproj.GenerateResource.Cache index 5643d50..f91a100 100644 Binary files a/obj/Release/MDEditor.csproj.GenerateResource.Cache and b/obj/Release/MDEditor.csproj.GenerateResource.Cache differ diff --git a/obj/Release/MEditor.exe b/obj/Release/MEditor.exe index e6a74da..1df152c 100644 Binary files a/obj/Release/MEditor.exe and b/obj/Release/MEditor.exe differ diff --git a/obj/Release/MEditor.frmMain.resources b/obj/Release/MEditor.frmMain.resources index e3a6601..7edea18 100644 Binary files a/obj/Release/MEditor.frmMain.resources and b/obj/Release/MEditor.frmMain.resources differ diff --git a/obj/Release/MEditor.pdb b/obj/Release/MEditor.pdb index 958eea7..bb6e580 100644 Binary files a/obj/Release/MEditor.pdb and b/obj/Release/MEditor.pdb differ