├── .gitignore
├── .vs
├── ProjectSettings.json
├── slnx.sqlite
└── WordxTex
│ └── v16
│ └── .suo
├── Resources
├── btn_tex.emf
├── Button_Edit.png
├── Button_About.png
├── Button_Settings.png
├── Button_Baseline_Up.png
├── Button_Insert_Tex.png
├── Button_Baseline_Down.png
├── Button_Baseline_Reset.png
├── Button_Insert_Graph.png
├── Button_Insert_MathEQ.png
├── Button_Insert_symbol.png
├── Button_Insert_MathChemRea.png
├── Button_Insert_MathChemStru.png
├── tex_sample_matheq.txt
├── tex_sample_awesymbol.txt
├── tex_sample_chemrea.txt
├── tex_sample_chemstr.txt
├── tex_fontsize_style.txt
└── tex_sample_plot.txt
├── .gitmodules
├── Properties
├── Settings.settings
├── Settings.Designer.cs
├── AssemblyInfo.cs
├── Resources.resx
└── Resources.Designer.cs
├── WordxTex.csproj.user
├── ThisAddIn.cs
├── ThisAddIn.Designer.xml
├── LICENSE
├── WordxTex.sln
├── Sources
├── AboutBox.cs
├── LaTexEdt.resx
├── Ribbon.resx
├── SettingsForm.resx
├── LaTexEdt.Designer.cs
├── ProgramQueue.cs
├── SettingsForm.cs
├── AboutBox.Designer.cs
├── Ribbon.Designer.cs
├── Ribbon.cs
├── LaTexEdt.cs
└── SettingsForm.Designer.cs
├── ThisAddIn.Designer.cs
└── WordxTex.csproj
/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 | *.pfx
4 | .vs
5 | Connected Services
6 |
--------------------------------------------------------------------------------
/.vs/ProjectSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "CurrentProjectSetting": null
3 | }
--------------------------------------------------------------------------------
/.vs/slnx.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/.vs/slnx.sqlite
--------------------------------------------------------------------------------
/.vs/WordxTex/v16/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/.vs/WordxTex/v16/.suo
--------------------------------------------------------------------------------
/Resources/btn_tex.emf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/btn_tex.emf
--------------------------------------------------------------------------------
/Resources/Button_Edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Edit.png
--------------------------------------------------------------------------------
/Resources/Button_About.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_About.png
--------------------------------------------------------------------------------
/Resources/Button_Settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Settings.png
--------------------------------------------------------------------------------
/Resources/Button_Baseline_Up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Baseline_Up.png
--------------------------------------------------------------------------------
/Resources/Button_Insert_Tex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Insert_Tex.png
--------------------------------------------------------------------------------
/Resources/Button_Baseline_Down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Baseline_Down.png
--------------------------------------------------------------------------------
/Resources/Button_Baseline_Reset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Baseline_Reset.png
--------------------------------------------------------------------------------
/Resources/Button_Insert_Graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Insert_Graph.png
--------------------------------------------------------------------------------
/Resources/Button_Insert_MathEQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Insert_MathEQ.png
--------------------------------------------------------------------------------
/Resources/Button_Insert_symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Insert_symbol.png
--------------------------------------------------------------------------------
/Resources/Button_Insert_MathChemRea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Insert_MathChemRea.png
--------------------------------------------------------------------------------
/Resources/Button_Insert_MathChemStru.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rylandev/WordxTex/HEAD/Resources/Button_Insert_MathChemStru.png
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "ICSharpCode.TextEditor"]
2 | path = ICSharpCode.TextEditor
3 | url = https://github.com/megakraken/ICSharpCode.TextEditor.git
4 | [submodule "DropDownControls"]
5 | path = DropDownControls
6 | url = https://github.com/BradSmith1985/DropDownControls
7 |
--------------------------------------------------------------------------------
/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Resources/tex_sample_matheq.txt:
--------------------------------------------------------------------------------
1 | %!WordxTex_TexContent DO NOT DELETE THIS LINE
2 | \documentclass{minimal}
3 | %%param.sty for font adjustment.
4 | \usepackage{param}
5 | \normalsize
6 |
7 | \begin{document}
8 | \[
9 | %%sample
10 | %\int_{x}^{y} \sqrt[3]{\exp(z)}\, \mathrm{d}z
11 | \]
12 | \end{document}
--------------------------------------------------------------------------------
/Resources/tex_sample_awesymbol.txt:
--------------------------------------------------------------------------------
1 | %!WordxTex_TexContent DO NOT DELETE THIS LINE
2 | \documentclass{minimal}
3 | %%param.sty for font adjustment.
4 | \usepackage{param}
5 | \usepackage{fontawesome}
6 | \normalsize
7 | \begin{document}
8 | %%sample upmain is in param.sty
9 | %\textcolor{upmain}{\faEnvelope}
10 | \end{document}
--------------------------------------------------------------------------------
/Resources/tex_sample_chemrea.txt:
--------------------------------------------------------------------------------
1 | %!WordxTex_TexContent DO NOT DELETE THIS LINE
2 | \documentclass{standalone}
3 | %%param.sty for font adjustment.
4 | \usepackage{param}
5 | \usepackage{textcomp}
6 | \usepackage[version=4]{mhchem}
7 | \normalsize
8 |
9 | \begin{document}
10 | %%sample
11 | %\ce{A + B <=>[HP][LP] C}
12 | \end{document}
--------------------------------------------------------------------------------
/WordxTex.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | F:\WordxTex\
5 |
6 | https://github.com/rylandev/WordxTex
7 |
8 |
--------------------------------------------------------------------------------
/Resources/tex_sample_chemstr.txt:
--------------------------------------------------------------------------------
1 | %!WordxTex_TexContent DO NOT DELETE THIS LINE
2 | \documentclass{standalone}
3 | %%param.sty for font adjustment.
4 | \usepackage{param}
5 | \usepackage{chemfig}
6 | \usepackage[active,tightpage]{preview}
7 | \normalsize
8 | \PreviewEnvironment{tikzpicture}
9 | \setlength\PreviewBorder{0pt}
10 |
11 | \begin{document}
12 | %%sample
13 | %\chemfig{*6(-=-=-=)}
14 | \end{document}
--------------------------------------------------------------------------------
/Resources/tex_fontsize_style.txt:
--------------------------------------------------------------------------------
1 | \renewcommand{\normalsize}{\fontsize{%%WordxTex_Font_Symbol}{%%WordxTex_Font_Symbol}\selectfont}
2 | \RequirePackage{color,xcolor}
3 | \definecolor{upmain}{%%cMode}{%%cParam}
4 | %%WordxTex_Equation_Font_Symbal
5 | \DeclareMathSizes{8}{8}{7}{5}
6 | \DeclareMathSizes{9}{9}{7}{5}
7 | \DeclareMathSizes{10}{10}{8}{5}
8 | \DeclareMathSizes{11}{11}{9}{7}
9 | \DeclareMathSizes{12}{12}{9}{7}
10 | \DeclareMathSizes{14}{14}{10}{7}
11 | \DeclareMathSizes{16}{16}{12}{8}
12 | \DeclareMathSizes{18}{18}{14}{10}
13 | \DeclareMathSizes{20}{20}{16}{12}
14 | \DeclareMathSizes{24}{24}{18}{14}
15 | \DeclareMathSizes{28}{28}{20}{16}
16 | \DeclareMathSizes{32}{32}{24}{18}
17 | \DeclareMathSizes{36}{36}{28}{20}
18 | \DeclareMathSizes{40}{40}{32}{24}
--------------------------------------------------------------------------------
/ThisAddIn.cs:
--------------------------------------------------------------------------------
1 | namespace WordxTex
2 | {
3 | public partial class ThisAddIn
4 | {
5 | private void ThisAddIn_Startup(object sender, System.EventArgs e)
6 | {
7 | }
8 |
9 | private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
10 | {
11 | }
12 |
13 | #region VSTO generated code
14 |
15 | ///
16 | /// Required method for Designer support - do not modify
17 | /// the contents of this method with the code editor.
18 | ///
19 | private void InternalStartup()
20 | {
21 | this.Startup += new System.EventHandler(ThisAddIn_Startup);
22 | this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
23 | }
24 |
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/ThisAddIn.Designer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 rylandev
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WordxTex.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("WordxTex")]
8 | [assembly: AssemblyDescription("A Latex plug-in for Word.\n https://github.com/rylandev/WordxTex")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("Rylan Dong")]
11 | [assembly: AssemblyProduct("WordxTex")]
12 | [assembly: AssemblyCopyright("OpenSpurce Project")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("a78e0c7a-854d-4b0b-b7a4-7d06b687e1ea")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("0.10")]
35 | [assembly: AssemblyFileVersion("0.10")]
36 |
37 |
--------------------------------------------------------------------------------
/Resources/tex_sample_plot.txt:
--------------------------------------------------------------------------------
1 | %!WordxTex_TexContent DO NOT DELETE THIS LINE
2 | \documentclass{standalone}
3 | %%param.sty for font adjustment.
4 | \usepackage{param}
5 | \usepackage{pgfplots}
6 | \usepackage{mathpazo}
7 | \usepackage{filecontents}
8 | \pgfplotsset{width=0.95\textwidth,compat=1.13}
9 | \renewcommand{\normalsize}{\fontsize{10}{10}\selectfont}
10 | \normalsize
11 |
12 | %%Sample Data Content Start:---------------
13 | \begin{filecontents*}{0.5atm_ethanal_aq.dat}
14 | L V
15 | 0.936 0.94056
16 | 0.94 0.943692
17 | 0.944 0.946891
18 | 0.948 0.950161
19 | 0.952 0.953502
20 | 0.956 0.956918
21 | 0.96 0.960409
22 | 0.964 0.963978
23 | 0.968 0.967628
24 | 0.972 0.97136
25 | 0.976 0.975177
26 | 0.98 0.979081
27 | \end{filecontents*}
28 | \begin{filecontents*}{1atm_ethanal_aq.dat}
29 | L V
30 | 0.936 0.939197
31 | 0.94 0.942424
32 | 0.944 0.945718
33 | 0.948 0.949082
34 | 0.952 0.952517
35 | 0.956 0.956025
36 | 0.96 0.959607
37 | 0.964 0.963267
38 | 0.968 0.967005
39 | 0.972 0.970824
40 | 0.976 0.974725
41 | 0.98 0.978712
42 | \end{filecontents*}
43 | \begin{filecontents*}{2atm_ethanal_aq.dat}
44 | L V
45 | 0.936 0.937751
46 | 0.94 0.94108
47 | 0.944 0.944476
48 | 0.948 0.94794
49 | 0.952 0.951475
50 | 0.956 0.955081
51 | 0.96 0.958761
52 | 0.964 0.962516
53 | 0.968 0.966348
54 | 0.972 0.970259
55 | 0.976 0.97425
56 | 0.98 0.978324
57 | \end{filecontents*}
58 | %%Sample Data Content End:---------------
59 |
60 | \begin{document}
61 | \color{black}
62 | \begin{tikzpicture}[scale=0.97]
63 | %%Sample Plot Start:---------------
64 | \begin{axis}[xlabel={L},ylabel={G},xmin=0.938,xmax=0.975,ymin=0.938,ymax=0.975,
65 | xtick distance=0.01,
66 | ytick distance=0.01,legend columns=2,legend pos=north west]
67 | \addplot+[mark size=0.05pt,color=blue] table {0.5atm_ethanal_aq.dat};
68 | \addlegendentry{$0.5$ atm}
69 | \addplot+[mark size=0.05pt,color=orange] table {1atm_ethanal_aq.dat};
70 | \addlegendentry{$1$ atm}
71 | \addplot+[mark size=0.05pt,color=gray] table {2atm_ethanal_aq.dat};
72 | \addlegendentry{$2$ atm}
73 | \addplot+[mark size=0pt,sharp plot,color=green] coordinates { (0,0) (1,1) };
74 |
75 | \addplot+[sharp plot,dashed,color=blue] coordinates { (0.93,0.9638) (0.9638,0.9638)(0.9638,0.93) };
76 | \addplot+[sharp plot,dashed,color=orange] coordinates { (0.93,0.9562) (0.9562,0.9562)(0.9562,0.93) };
77 | \addplot+[sharp plot,dashed,color=gray] coordinates { (0.93,0.9475) (0.9475,0.9475)(0.9475,0.93) };
78 |
79 | \node [pin=115:{0.9475}] at (0.9475,0.9475) {};
80 | \node [pin=155:{0.9562}] at (0.9562,0.9562) {};
81 | \node [pin=300:{0.9638}] at (0.9638,0.9638) {};
82 | \end{axis}
83 | %%Sample Plot End:---------------
84 | \end{tikzpicture}
85 | \end{document}
--------------------------------------------------------------------------------
/WordxTex.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29926.136
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WordxTex", "WordxTex.csproj", "{EE42B4EE-81D4-4053-941A-26286DE0616E}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "ICSharpCode.TextEditor\ICSharpCode.TextEditor\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DropDownControls", "DropDownControls\DropDownControls.csproj", "{1A0EB623-3EDD-4BA6-80EE-0FA61A708542}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug (.NET 3.5)|Any CPU = Debug (.NET 3.5)|Any CPU
15 | Debug|Any CPU = Debug|Any CPU
16 | Release (.NET 3.5)|Any CPU = Release (.NET 3.5)|Any CPU
17 | Release|Any CPU = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Debug (.NET 3.5)|Any CPU.ActiveCfg = Debug|Any CPU
21 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Debug (.NET 3.5)|Any CPU.Build.0 = Debug|Any CPU
22 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Release (.NET 3.5)|Any CPU.ActiveCfg = Release|Any CPU
25 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Release (.NET 3.5)|Any CPU.Build.0 = Release|Any CPU
26 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {EE42B4EE-81D4-4053-941A-26286DE0616E}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug (.NET 3.5)|Any CPU.ActiveCfg = Debug|Any CPU
29 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug (.NET 3.5)|Any CPU.Build.0 = Debug|Any CPU
30 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release (.NET 3.5)|Any CPU.ActiveCfg = Release|Any CPU
33 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release (.NET 3.5)|Any CPU.Build.0 = Release|Any CPU
34 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Debug (.NET 3.5)|Any CPU.ActiveCfg = Debug (.NET 3.5)|Any CPU
37 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Debug (.NET 3.5)|Any CPU.Build.0 = Debug (.NET 3.5)|Any CPU
38 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Release (.NET 3.5)|Any CPU.ActiveCfg = Release (.NET 3.5)|Any CPU
41 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Release (.NET 3.5)|Any CPU.Build.0 = Release (.NET 3.5)|Any CPU
42 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 | {1A0EB623-3EDD-4BA6-80EE-0FA61A708542}.Release|Any CPU.Build.0 = Release|Any CPU
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | GlobalSection(ExtensibilityGlobals) = postSolution
49 | SolutionGuid = {D09D0F09-2D2F-4130-B504-8454A5B763A0}
50 | EndGlobalSection
51 | EndGlobal
52 |
--------------------------------------------------------------------------------
/Sources/AboutBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Windows.Forms;
4 |
5 | namespace WordxTex
6 | {
7 | partial class AboutBox : Form
8 | {
9 | public AboutBox()
10 | {
11 | InitializeComponent();
12 | this.Text = String.Format("About {0}", AssemblyTitle);
13 | this.labelProductName.Text = AssemblyProduct;
14 | this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
15 | this.labelCopyright.Text = AssemblyCopyright;
16 | this.labelCompanyName.Text = AssemblyCompany;
17 | this.textBoxDescription.Text = AssemblyDescription;
18 | }
19 |
20 | #region Assembly Attribute Accessors
21 |
22 | public string AssemblyTitle
23 | {
24 | get
25 | {
26 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
27 | if (attributes.Length > 0)
28 | {
29 | AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
30 | if (titleAttribute.Title != "")
31 | {
32 | return titleAttribute.Title;
33 | }
34 | }
35 | return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
36 | }
37 | }
38 |
39 | public string AssemblyVersion
40 | {
41 | get
42 | {
43 | return Assembly.GetExecutingAssembly().GetName().Version.ToString();
44 | }
45 | }
46 |
47 | public string AssemblyDescription
48 | {
49 | get
50 | {
51 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
52 | if (attributes.Length == 0)
53 | {
54 | return "";
55 | }
56 | return ((AssemblyDescriptionAttribute)attributes[0]).Description;
57 | }
58 | }
59 |
60 | public string AssemblyProduct
61 | {
62 | get
63 | {
64 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
65 | if (attributes.Length == 0)
66 | {
67 | return "";
68 | }
69 | return ((AssemblyProductAttribute)attributes[0]).Product;
70 | }
71 | }
72 |
73 | public string AssemblyCopyright
74 | {
75 | get
76 | {
77 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
78 | if (attributes.Length == 0)
79 | {
80 | return "";
81 | }
82 | return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
83 | }
84 | }
85 |
86 | public string AssemblyCompany
87 | {
88 | get
89 | {
90 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
91 | if (attributes.Length == 0)
92 | {
93 | return "";
94 | }
95 | return ((AssemblyCompanyAttribute)attributes[0]).Company;
96 | }
97 | }
98 | #endregion
99 |
100 | private void okButton_Click(object sender, EventArgs e)
101 | {
102 | this.Close();
103 | }
104 |
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Sources/LaTexEdt.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/Sources/Ribbon.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/Sources/SettingsForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | grapher=dvipng;pngvRes=300;gr_arg=-q%%BlankSpace--picky%%BlankSpace-T%%BlankSpacetight%%BlankSpace-D300%%BlankSpace-bg%%BlankSpaceTransparent%%BlankSpace-o%%BlankSpace%%OutImgFile%%BlankSpace%%InDviFile;gtarget=.png;gaccept=.dvi;gtip=->.png
122 |
123 |
124 | grapher=dvipng;pngvRes=600;gr_arg=-q%%BlankSpace--picky%%BlankSpace-T%%BlankSpacetight%%BlankSpace-D600%%BlankSpace-bg%%BlankSpaceTransparent%%BlankSpace-o%%BlankSpace%%OutImgFile%%BlankSpace%%InDviFile;gtarget=.png;gaccept=.dvi;gtip=->.png
125 |
126 |
127 | grapher=dvipng;pngvRes=900;gr_arg=-q%%BlankSpace--picky%%BlankSpace-T%%BlankSpacetight%%BlankSpace-D900%%BlankSpace-bg%%BlankSpaceTransparent%%BlankSpace-o%%BlankSpace%%OutImgFile%%BlankSpace%%InDviFile;gtarget=.png;gaccept=.dvi;gtip=->.png
128 |
129 |
130 | grapher=dvipng;pngvRes=1200;gr_arg=-q%%BlankSpace--picky%%BlankSpace-T%%BlankSpacetight%%BlankSpace-D1200%%BlankSpace-bg%%BlankSpaceTransparent%%BlankSpace-o%%BlankSpace%%OutImgFile%%BlankSpace%%InDviFile;gtarget=.png;gaccept=.dvi;gtip=->.png
131 |
132 |
133 | grapher=dvipng;pngvRes=2400;gr_arg=-q%%BlankSpace--picky%%BlankSpace-T%%BlankSpacetight%%BlankSpace-D2400%%BlankSpace-bg%%BlankSpaceTransparent%%BlankSpace-o%%BlankSpace%%OutImgFile%%BlankSpace%%InDviFile;gtarget=.png;gaccept=.dvi;gtip=->.png
134 |
135 |
136 | 17, 17
137 |
138 |
--------------------------------------------------------------------------------
/Sources/LaTexEdt.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WordxTex
2 | {
3 | partial class LaTexEdt
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.btn_gen = new System.Windows.Forms.Button();
32 | this.logsBox = new System.Windows.Forms.RichTextBox();
33 | this.label2 = new System.Windows.Forms.Label();
34 | this.cb_AutoClose = new System.Windows.Forms.CheckBox();
35 | this.texCodeBox = new ICSharpCode.TextEditor.TextEditorControl();
36 | this.btn_prvTex = new System.Windows.Forms.Button();
37 | this.btn_nxtTeX = new System.Windows.Forms.Button();
38 | this.SuspendLayout();
39 | //
40 | // btn_gen
41 | //
42 | this.btn_gen.AutoSize = true;
43 | this.btn_gen.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
44 | this.btn_gen.Dock = System.Windows.Forms.DockStyle.Bottom;
45 | this.btn_gen.Location = new System.Drawing.Point(0, 289);
46 | this.btn_gen.Name = "btn_gen";
47 | this.btn_gen.Size = new System.Drawing.Size(434, 22);
48 | this.btn_gen.TabIndex = 6;
49 | this.btn_gen.Text = "Generation";
50 | this.btn_gen.UseVisualStyleBackColor = true;
51 | this.btn_gen.Click += new System.EventHandler(this.btn_gen_Click);
52 | //
53 | // logsBox
54 | //
55 | this.logsBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
56 | | System.Windows.Forms.AnchorStyles.Right)));
57 | this.logsBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
58 | this.logsBox.DetectUrls = false;
59 | this.logsBox.ForeColor = System.Drawing.SystemColors.WindowText;
60 | this.logsBox.Location = new System.Drawing.Point(47, 157);
61 | this.logsBox.Name = "logsBox";
62 | this.logsBox.ReadOnly = true;
63 | this.logsBox.Size = new System.Drawing.Size(381, 104);
64 | this.logsBox.TabIndex = 2;
65 | this.logsBox.TabStop = false;
66 | this.logsBox.Text = "";
67 | this.logsBox.WordWrap = false;
68 | //
69 | // label2
70 | //
71 | this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
72 | | System.Windows.Forms.AnchorStyles.Right)));
73 | this.label2.AutoSize = true;
74 | this.label2.Location = new System.Drawing.Point(6, 166);
75 | this.label2.Name = "label2";
76 | this.label2.Size = new System.Drawing.Size(35, 12);
77 | this.label2.TabIndex = 8;
78 | this.label2.Text = "logs:";
79 | //
80 | // cb_AutoClose
81 | //
82 | this.cb_AutoClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
83 | this.cb_AutoClose.AutoSize = true;
84 | this.cb_AutoClose.Checked = true;
85 | this.cb_AutoClose.CheckState = System.Windows.Forms.CheckState.Checked;
86 | this.cb_AutoClose.Location = new System.Drawing.Point(8, 267);
87 | this.cb_AutoClose.Name = "cb_AutoClose";
88 | this.cb_AutoClose.Size = new System.Drawing.Size(204, 16);
89 | this.cb_AutoClose.TabIndex = 3;
90 | this.cb_AutoClose.Text = "Close after compiling success.";
91 | this.cb_AutoClose.UseVisualStyleBackColor = true;
92 | //
93 | // texCodeBox
94 | //
95 | this.texCodeBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
96 | | System.Windows.Forms.AnchorStyles.Left)
97 | | System.Windows.Forms.AnchorStyles.Right)));
98 | this.texCodeBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
99 | this.texCodeBox.Font = new System.Drawing.Font("Consolas", 10F);
100 | this.texCodeBox.Highlighting = "TeX";
101 | this.texCodeBox.Location = new System.Drawing.Point(10, 5);
102 | this.texCodeBox.Name = "texCodeBox";
103 | this.texCodeBox.ShowTabs = true;
104 | this.texCodeBox.ShowVRuler = false;
105 | this.texCodeBox.Size = new System.Drawing.Size(418, 150);
106 | this.texCodeBox.TabIndent = 1;
107 | this.texCodeBox.TabIndex = 1;
108 | //
109 | // btn_prvTex
110 | //
111 | this.btn_prvTex.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
112 | this.btn_prvTex.Enabled = false;
113 | this.btn_prvTex.Location = new System.Drawing.Point(292, 263);
114 | this.btn_prvTex.Name = "btn_prvTex";
115 | this.btn_prvTex.Size = new System.Drawing.Size(65, 23);
116 | this.btn_prvTex.TabIndex = 4;
117 | this.btn_prvTex.Text = " MaxProgramNum)
80 | return new string[] { "", "" };
81 | string[] ExecProgramCurrent = new string[] { uePrograms[CurProgramNum], ueProgramsArgs[CurProgramNum] };
82 | if (CurProgramNum <= MaxProgramNum)
83 | CurProgramNum = CurProgramNum + 1;
84 | return ExecProgramCurrent;
85 | }
86 | public string[] setExecProgram(int ProgramQueNum)
87 | {
88 | if (ProgramQueNum <= MaxProgramNum)
89 | {
90 | string[] ExecProgramCurrent = new string[] { uePrograms[ProgramQueNum], ueProgramsArgs[ProgramQueNum] };
91 | return ExecProgramCurrent;
92 | }
93 | return null;
94 | }
95 | private ProgramResult exeProcessWithRslt()
96 | {
97 | string uelogs = "";
98 | string execPath = uePrograms[CurProgramNum];
99 | string args = ueProgramsArgs[CurProgramNum];
100 | using (Process Rprocess = new Process())
101 | {
102 | System.Timers.Timer execTimer = new System.Timers.Timer();
103 | execTimer.Interval = __maxRunTime * 1000;
104 | execTimer.Elapsed += delegate (object ta, ElapsedEventArgs te)
105 | {
106 | execTimer.Stop();
107 | try
108 | {
109 | if (!Rprocess.HasExited)
110 | Rprocess.Kill();
111 | }
112 | catch (System.Exception) { };
113 | };
114 | Rprocess.StartInfo.UseShellExecute = false; //不使用CMD
115 | Rprocess.StartInfo.CreateNoWindow = true; //不显示黑色窗口
116 | Rprocess.OutputDataReceived += delegate (object sender, DataReceivedEventArgs e)
117 | {
118 | string logs = "";
119 | try
120 | {
121 | logs = e.Data;
122 | }
123 | catch (System.Exception)
124 | {
125 | }
126 | uelogs = uelogs + "\n" + logs;
127 | ProgramsRunLogStepRs(logs, new EventArgs());
128 | };
129 | Rprocess.StartInfo.RedirectStandardOutput = true;
130 | Rprocess.ErrorDataReceived += delegate (object sender, DataReceivedEventArgs e)
131 | {
132 | string logs = "";
133 | try
134 | {
135 | logs = e.Data;
136 | }
137 | catch (System.Exception)
138 | {
139 | }
140 | uelogs = uelogs + "\n" + logs;
141 | ProgramsRunLogStepRs(logs, new EventArgs());
142 | };
143 | Rprocess.StartInfo.RedirectStandardError = true;
144 | Rprocess.StartInfo.FileName = execPath;
145 | Rprocess.StartInfo.Arguments = args;
146 | Rprocess.EnableRaisingEvents = true;
147 | execTimer.Enabled = true;
148 | execTimer.Start();
149 | if (!Rprocess.Start())
150 | {
151 | return new ProgramResult(execPath, args, -1, Terminated(), MaxProgramNum - CurProgramNum);
152 | }
153 | Rprocess.BeginOutputReadLine();
154 | Rprocess.BeginErrorReadLine();
155 | Rprocess.WaitForExit();
156 | ProgramResult pResult = new ProgramResult(execPath, args, Rprocess.ExitCode, Terminated(), MaxProgramNum - CurProgramNum);
157 | pResult.execLogs = uelogs;
158 | return pResult;
159 | }
160 | }
161 |
162 | }
163 |
164 | public class ProgramResult : System.Object
165 | {
166 | string __execName = null;
167 | string __execArgs = null;
168 | string __logs = null;
169 | int __exitCode = -1;
170 | int __programLeft = 0;
171 | bool __theLastProgram = true;
172 |
173 | public static string GetFullPath(string fileName)
174 | {
175 | if (File.Exists(fileName))
176 | return Path.GetFullPath(fileName);
177 |
178 | var values = Environment.GetEnvironmentVariable("PATH");
179 | foreach (var path in values.Split(Path.PathSeparator))
180 | {
181 | var fullPath = Path.Combine(path, fileName);
182 | if (File.Exists(fullPath))
183 | return fullPath;
184 | }
185 | return null;
186 | }
187 |
188 | public ProgramResult(string execName, string execArgs, int exitCode, bool theLastProgram, int programLeft)
189 | {
190 | __execName = GetFullPath(execName);
191 | __execArgs = execArgs;
192 | __exitCode = exitCode;
193 | __theLastProgram = theLastProgram;
194 | __programLeft = programLeft;
195 | }
196 | public string execName
197 | {
198 | get { return __execName; }
199 | }
200 | public string execArgs
201 | {
202 | get { return __execArgs; }
203 | }
204 | public string execLogs
205 | {
206 | get { return __logs; }
207 | set { __logs = value; }
208 | }
209 | public int exitCode
210 | {
211 | get { return __exitCode; }
212 | }
213 | public int programLeft
214 | {
215 | get { return __programLeft; }
216 | }
217 | public bool theLastProgram
218 | {
219 | get { return __theLastProgram; }
220 | }
221 |
222 | }
223 |
224 | }
225 |
--------------------------------------------------------------------------------
/Sources/SettingsForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace WordxTex
7 | {
8 | public partial class SettingsForm : Form
9 | {
10 | // 配置文件写操作函数 WritePrivateProfileString()
11 | [System.Runtime.InteropServices.DllImport("kernel32")]
12 | private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
13 | // 配置文件读操作函数 GetPrivateProfileString()
14 | [System.Runtime.InteropServices.DllImport("kernel32")]
15 | private static extern int GetPrivateProfileString(string section, string key, string def, System.Text.StringBuilder retVal, int size, string filePath);
16 |
17 | System.Text.StringBuilder tempIniValue = new System.Text.StringBuilder(255);
18 |
19 | string iniFile = System.Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\.WordxTex.ini";
20 |
21 | public event EventHandler generChangeEventHandler;
22 | public event EventHandler maxRunTimePerProgramChangeEventHandler;
23 | public event EventHandler showLabelOptionChangeEventHandler;
24 |
25 | public SettingsForm()
26 | {
27 | InitializeComponent();
28 | string tmpPath = System.Environment.GetEnvironmentVariable("TEMP");
29 | //防止终止该窗口
30 | this.FormClosing += delegate (object sender, FormClosingEventArgs e)
31 | {
32 | e.Cancel = true;
33 | this.Hide();
34 | };
35 | //防止EventHandle返回null
36 | generChangeEventHandler += delegate (object tmpo, EventArgs tmpe) { };
37 | maxRunTimePerProgramChangeEventHandler += delegate (object tmpo, EventArgs tmpe) { };
38 | showLabelOptionChangeEventHandler += delegate (object tmpo, EventArgs tmpe) { };
39 | //读出配置文件
40 | try
41 | {
42 | GetPrivateProfileString("Debugging", "debugMode", "", tempIniValue, 255, iniFile);
43 | if ((tempIniValue.Length != 0) && (bool.Parse(tempIniValue.ToString())) == true)
44 | {
45 | ComboTreeNode comboTreeNodeCpTest = new ComboTreeNode();
46 | comboTreeNodeCpTest.Expanded = false;
47 | comboTreeNodeCpTest.ForeColor = System.Drawing.Color.Empty;
48 | comboTreeNodeCpTest.Name = "winver_test";
49 | comboTreeNodeCpTest.Text = "winver_test";
50 | comboTreeNodeCpTest.Tag = "complier=winver;cp_arg=;ctarget=.xdv;ctip=.tex->.xdv";
51 | comboTreeNodeCpTest.ToolTip = null;
52 | ComboTreeNode comboTreeNodeGrTest = new ComboTreeNode();
53 | comboTreeNodeGrTest.Expanded = false;
54 | comboTreeNodeGrTest.ForeColor = System.Drawing.Color.Empty;
55 | comboTreeNodeGrTest.Name = "grapher_tmpe";
56 | comboTreeNodeGrTest.Text = "grapher_tmpe";
57 | comboTreeNodeGrTest.Tag = "grapher=winver;gr_arg=;gtarget=.svg;gaccept=.dvi,.xdv;gtip=->.svg";
58 | comboTreeNodeGrTest.ToolTip = null;
59 | ctb_compiler.Nodes.Add(comboTreeNodeCpTest);
60 | ctb_graphbox.Nodes.Add(comboTreeNodeGrTest);
61 | }
62 | else
63 | {
64 | WritePrivateProfileString("Debugging", "debugMode", "False", iniFile);
65 | }
66 | GetPrivateProfileString("Gener", "Complier", "", tempIniValue, 255, iniFile);
67 | if (tempIniValue.ToString().Length > 1)
68 | ctb_compiler.Path = tempIniValue.ToString();
69 | GetPrivateProfileString("Gener", "Grapher", "", tempIniValue, 255, iniFile);
70 | if (tempIniValue.ToString().Length > 1)
71 | ctb_graphbox.Path = tempIniValue.ToString();
72 | GetPrivateProfileString("Style", "Font", "", tempIniValue, 255, iniFile);
73 | if (tempIniValue.ToString().Length > 1)
74 | cb_fonts.Path = tempIniValue.ToString();
75 | GetPrivateProfileString("Option", "autoClean", "", tempIniValue, 255, iniFile);
76 | if (tempIniValue.ToString().Length > 1)
77 | ckb_autoclean.Checked = bool.Parse(tempIniValue.ToString());
78 | GetPrivateProfileString("Option", "showLabel", "", tempIniValue, 255, iniFile);
79 | if (tempIniValue.ToString().Length > 1)
80 | chb_show_fl.Checked = bool.Parse(tempIniValue.ToString());
81 | GetPrivateProfileString("Option", "workPath", "", tempIniValue, 255, iniFile);
82 | if (tempIniValue.ToString().Length > 1 && Directory.Exists(tempIniValue.ToString()))
83 | {
84 | tb_wkdir.Text = tempIniValue.ToString();
85 | }
86 |
87 | GetPrivateProfileString("Gener", "Time", "", tempIniValue, 255, iniFile);
88 | if (tempIniValue.ToString().Length > 1)
89 | sb_execPerPrgTime.Value = int.Parse(tempIniValue.ToString());
90 | }
91 | catch (ArgumentException)
92 | {
93 | //配置文件出错则删除配置文件
94 | if (File.Exists(iniFile))
95 | File.Delete(iniFile);
96 | }
97 | }
98 | public bool showLabel => chb_show_fl.Checked;
99 | public string workPath => tb_wkdir.Text;
100 | public bool workPathAutoClean => ckb_autoclean.Checked;
101 | public int maxRunTimePerProgram => Convert.ToInt32(sb_execPerPrgTime.Value);
102 | public string fontFx => (string)cb_fonts.SelectedNode.Tag;
103 | public string program_exec_params => (string)ctb_compiler.SelectedNode.Tag + ";" + (string)ctb_graphbox.SelectedNode.Tag;
104 | private void SettingsBox_Load(object sender, EventArgs e)
105 | {
106 | ctb_compiler.SelectedNodeChanged += ctb_gener_SelectedNodeChanged;
107 | ctb_graphbox.SelectedNodeChanged += ctb_gener_SelectedNodeChanged;
108 | generChangeEventHandler((string)ctb_compiler.SelectedNode.Tag + ";" + (string)ctb_graphbox.SelectedNode.Tag, new EventArgs());
109 | }
110 | private void ctb_gener_SelectedNodeChanged(object sender, EventArgs e)
111 | {
112 | generChangeEventHandler((string)ctb_compiler.SelectedNode.Tag + ";" + (string)ctb_graphbox.SelectedNode.Tag, new EventArgs());
113 | WritePrivateProfileString("Gener", "Complier", ctb_compiler.Path, iniFile);
114 | WritePrivateProfileString("Gener", "Grapher", ctb_graphbox.Path, iniFile);
115 | }
116 |
117 | private void btn_hide_Click(object sender, EventArgs e) => this.Hide();
118 |
119 | private void chb_show_fl_CheckedChanged(object sender, EventArgs e)
120 | {
121 | showLabelOptionChangeEventHandler(chb_show_fl.Checked, new EventArgs());
122 | WritePrivateProfileString("Option", "showLabel", chb_show_fl.Checked.ToString(), iniFile);
123 | }
124 |
125 | private void cb_fonts_Change(object sender, EventArgs e) => WritePrivateProfileString("Style", "Font", cb_fonts.Path, iniFile);
126 |
127 | private void sb_execPerPrgTime_ValueChanged(object sender, EventArgs e)
128 | {
129 | maxRunTimePerProgramChangeEventHandler(sb_execPerPrgTime.Value, new EventArgs());
130 | WritePrivateProfileString("Gener", "Time", sb_execPerPrgTime.Value.ToString(), iniFile);
131 | }
132 |
133 | private void textBox1_TextChanged(object sender, EventArgs e)
134 | {
135 | if (Directory.Exists(tb_wkdir.Text))
136 | WritePrivateProfileString("Option", "workPath", tb_wkdir.Text, iniFile);
137 | }
138 |
139 | private void ckb_autoclean_CheckedChanged(object sender, EventArgs e)
140 | {
141 | WritePrivateProfileString("Option", "autoClean", ckb_autoclean.Checked.ToString(), iniFile);
142 | }
143 |
144 | private void button2_Click(object sender, EventArgs e)
145 | {
146 | DirSelectDialog.Reset();
147 | DirSelectDialog.SelectedPath = tb_wkdir.Text;
148 | DirSelectDialog.ShowDialog();
149 | if (DirSelectDialog.SelectedPath.Length > 0)
150 | tb_wkdir.Text = DirSelectDialog.SelectedPath;
151 | }
152 |
153 | private void btn_clean_cache_Click(object sender, EventArgs e)
154 | {
155 | if (MessageBox.Show("Delete all files in: " + tb_wkdir.Text + "\\WordxTex", "confirm", MessageBoxButtons.OKCancel) == DialogResult.OK)
156 | {
157 | try
158 | {
159 | System.Collections.Generic.List FileList = Directory.GetFiles(tb_wkdir.Text + "\\WordxTex").ToList();
160 | for (int i = 0; i < FileList.ToList().Count; i++) File.Delete(FileList[i]);
161 | }
162 | catch (IOException)
163 | {
164 | MessageBox.Show("Some files in " + workPath + " were ocuupied, result may unsatisfy.", "Warning!!");
165 | };
166 | }
167 | }
168 |
169 | private void ctb_compiler_Click(object sender, EventArgs e)
170 | {
171 |
172 | }
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/Sources/AboutBox.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WordxTex
2 | {
3 | partial class AboutBox
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | protected override void Dispose(bool disposing)
14 | {
15 | if (disposing && (components != null))
16 | {
17 | components.Dispose();
18 | }
19 | base.Dispose(disposing);
20 | }
21 |
22 | #region Windows Form Designer generated code
23 |
24 | ///
25 | /// Required method for Designer support - do not modify
26 | /// the contents of this method with the code editor.
27 | ///
28 | private void InitializeComponent()
29 | {
30 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
31 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
32 | this.logoPictureBox = new System.Windows.Forms.PictureBox();
33 | this.labelProductName = new System.Windows.Forms.Label();
34 | this.labelVersion = new System.Windows.Forms.Label();
35 | this.labelCopyright = new System.Windows.Forms.Label();
36 | this.labelCompanyName = new System.Windows.Forms.Label();
37 | this.textBoxDescription = new System.Windows.Forms.TextBox();
38 | this.okButton = new System.Windows.Forms.Button();
39 | this.tableLayoutPanel.SuspendLayout();
40 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
41 | this.SuspendLayout();
42 | //
43 | // tableLayoutPanel
44 | //
45 | this.tableLayoutPanel.ColumnCount = 2;
46 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F));
47 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F));
48 | this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0);
49 | this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0);
50 | this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1);
51 | this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2);
52 | this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3);
53 | this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4);
54 | this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5);
55 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
56 | this.tableLayoutPanel.Location = new System.Drawing.Point(9, 8);
57 | this.tableLayoutPanel.Name = "tableLayoutPanel";
58 | this.tableLayoutPanel.RowCount = 6;
59 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
60 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
61 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
62 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
63 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
64 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
65 | this.tableLayoutPanel.Size = new System.Drawing.Size(417, 245);
66 | this.tableLayoutPanel.TabIndex = 0;
67 | //
68 | // logoPictureBox
69 | //
70 | this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
71 | this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
72 | this.logoPictureBox.Location = new System.Drawing.Point(3, 3);
73 | this.logoPictureBox.Name = "logoPictureBox";
74 | this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6);
75 | this.logoPictureBox.Size = new System.Drawing.Size(131, 239);
76 | this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
77 | this.logoPictureBox.TabIndex = 12;
78 | this.logoPictureBox.TabStop = false;
79 | //
80 | // labelProductName
81 | //
82 | this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
83 | this.labelProductName.Location = new System.Drawing.Point(143, 0);
84 | this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
85 | this.labelProductName.MaximumSize = new System.Drawing.Size(0, 16);
86 | this.labelProductName.Name = "labelProductName";
87 | this.labelProductName.Size = new System.Drawing.Size(271, 16);
88 | this.labelProductName.TabIndex = 19;
89 | this.labelProductName.Text = "WordxTex";
90 | this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
91 | //
92 | // labelVersion
93 | //
94 | this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
95 | this.labelVersion.Location = new System.Drawing.Point(143, 24);
96 | this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
97 | this.labelVersion.MaximumSize = new System.Drawing.Size(0, 16);
98 | this.labelVersion.Name = "labelVersion";
99 | this.labelVersion.Size = new System.Drawing.Size(271, 16);
100 | this.labelVersion.TabIndex = 0;
101 | this.labelVersion.Text = "Version 0.1 Beta";
102 | this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
103 | //
104 | // labelCopyright
105 | //
106 | this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
107 | this.labelCopyright.Location = new System.Drawing.Point(143, 48);
108 | this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
109 | this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 16);
110 | this.labelCopyright.Name = "labelCopyright";
111 | this.labelCopyright.Size = new System.Drawing.Size(271, 16);
112 | this.labelCopyright.TabIndex = 21;
113 | this.labelCopyright.Text = "OpenSource";
114 | this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
115 | //
116 | // labelCompanyName
117 | //
118 | this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill;
119 | this.labelCompanyName.Location = new System.Drawing.Point(143, 72);
120 | this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
121 | this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 16);
122 | this.labelCompanyName.Name = "labelCompanyName";
123 | this.labelCompanyName.Size = new System.Drawing.Size(271, 16);
124 | this.labelCompanyName.TabIndex = 22;
125 | this.labelCompanyName.Text = "Rylan Dong";
126 | this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
127 | //
128 | // textBoxDescription
129 | //
130 | this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
131 | this.textBoxDescription.Location = new System.Drawing.Point(143, 99);
132 | this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
133 | this.textBoxDescription.Multiline = true;
134 | this.textBoxDescription.Name = "textBoxDescription";
135 | this.textBoxDescription.ReadOnly = true;
136 | this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
137 | this.textBoxDescription.Size = new System.Drawing.Size(271, 116);
138 | this.textBoxDescription.TabIndex = 23;
139 | this.textBoxDescription.TabStop = false;
140 | this.textBoxDescription.Text = "github:";
141 | //
142 | // okButton
143 | //
144 | this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
145 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
146 | this.okButton.Location = new System.Drawing.Point(339, 221);
147 | this.okButton.Name = "okButton";
148 | this.okButton.Size = new System.Drawing.Size(75, 21);
149 | this.okButton.TabIndex = 24;
150 | this.okButton.Text = "&OK";
151 | this.okButton.Click += new System.EventHandler(this.okButton_Click);
152 | //
153 | // AboutBox
154 | //
155 | this.AcceptButton = this.okButton;
156 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
157 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
158 | this.ClientSize = new System.Drawing.Size(435, 261);
159 | this.Controls.Add(this.tableLayoutPanel);
160 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
161 | this.MaximizeBox = false;
162 | this.MinimizeBox = false;
163 | this.Name = "AboutBox";
164 | this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8);
165 | this.ShowIcon = false;
166 | this.ShowInTaskbar = false;
167 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
168 | this.Text = "About";
169 | this.tableLayoutPanel.ResumeLayout(false);
170 | this.tableLayoutPanel.PerformLayout();
171 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
172 | this.ResumeLayout(false);
173 |
174 | }
175 |
176 | #endregion
177 |
178 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
179 | private System.Windows.Forms.PictureBox logoPictureBox;
180 | private System.Windows.Forms.Label labelProductName;
181 | private System.Windows.Forms.Label labelVersion;
182 | private System.Windows.Forms.Label labelCopyright;
183 | private System.Windows.Forms.Label labelCompanyName;
184 | private System.Windows.Forms.TextBox textBoxDescription;
185 | private System.Windows.Forms.Button okButton;
186 | }
187 | }
188 |
--------------------------------------------------------------------------------
/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\Button_About.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\Button_Baseline_Down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\Button_Baseline_Reset.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\Resources\Button_Baseline_Up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\Resources\Button_Edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\Resources\Button_Insert_Graph.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\Resources\Button_Insert_MathChemRea.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\Resources\Button_Insert_MathChemStru.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\Resources\Button_Insert_MathEQ.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
149 | ..\Resources\Button_Insert_symbol.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
150 |
151 |
152 | ..\Resources\Button_Insert_Tex.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
153 |
154 |
155 | ..\Resources\Button_Settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
156 |
157 |
158 | ..\Resources\tex_fontsize_style.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
159 |
160 |
161 | ..\Resources\tex_sample_awesymbol.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
162 |
163 |
164 | ..\Resources\tex_sample_chemrea.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
165 |
166 |
167 | ..\Resources\tex_sample_chemstr.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
168 |
169 |
170 | ..\Resources\tex_sample_matheq.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
171 |
172 |
173 | ..\Resources\tex_sample_plot.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
174 |
175 |
--------------------------------------------------------------------------------
/ThisAddIn.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | #pragma warning disable 414
12 | namespace WordxTex {
13 |
14 |
15 | ///
16 | [Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0)]
17 | [global::System.Security.Permissions.PermissionSetAttribute(global::System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")]
18 | public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase {
19 |
20 | internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes;
21 |
22 | internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags;
23 |
24 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
25 | private global::System.Object missing = global::System.Type.Missing;
26 |
27 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
28 | internal Microsoft.Office.Interop.Word.Application Application;
29 |
30 | ///
31 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
32 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
33 | public ThisAddIn(global::Microsoft.Office.Tools.Word.ApplicationFactory factory, global::System.IServiceProvider serviceProvider) :
34 | base(factory, serviceProvider, "AddIn", "ThisAddIn") {
35 | Globals.Factory = factory;
36 | }
37 |
38 | ///
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
41 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
42 | protected override void Initialize() {
43 | base.Initialize();
44 | this.Application = this.GetHostItem(typeof(Microsoft.Office.Interop.Word.Application), "Application");
45 | Globals.ThisAddIn = this;
46 | global::System.Windows.Forms.Application.EnableVisualStyles();
47 | this.InitializeCachedData();
48 | this.InitializeControls();
49 | this.InitializeComponents();
50 | this.InitializeData();
51 | }
52 |
53 | ///
54 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
55 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
56 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
57 | protected override void FinishInitialization() {
58 | this.InternalStartup();
59 | this.OnStartup();
60 | }
61 |
62 | ///
63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
65 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
66 | protected override void InitializeDataBindings() {
67 | this.BeginInitialization();
68 | this.BindToData();
69 | this.EndInitialization();
70 | }
71 |
72 | ///
73 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
74 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
75 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
76 | private void InitializeCachedData() {
77 | if ((this.DataHost == null)) {
78 | return;
79 | }
80 | if (this.DataHost.IsCacheInitialized) {
81 | this.DataHost.FillCachedData(this);
82 | }
83 | }
84 |
85 | ///
86 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
87 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
88 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
89 | private void InitializeData() {
90 | }
91 |
92 | ///
93 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
94 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
95 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
96 | private void BindToData() {
97 | }
98 |
99 | ///
100 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
101 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
102 | private void StartCaching(string MemberName) {
103 | this.DataHost.StartCaching(this, MemberName);
104 | }
105 |
106 | ///
107 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
108 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
109 | private void StopCaching(string MemberName) {
110 | this.DataHost.StopCaching(this, MemberName);
111 | }
112 |
113 | ///
114 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
115 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
116 | private bool IsCached(string MemberName) {
117 | return this.DataHost.IsCached(this, MemberName);
118 | }
119 |
120 | ///
121 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
122 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
123 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
124 | private void BeginInitialization() {
125 | this.BeginInit();
126 | this.CustomTaskPanes.BeginInit();
127 | this.VstoSmartTags.BeginInit();
128 | }
129 |
130 | ///
131 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
132 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
133 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
134 | private void EndInitialization() {
135 | this.VstoSmartTags.EndInit();
136 | this.CustomTaskPanes.EndInit();
137 | this.EndInit();
138 | }
139 |
140 | ///
141 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
142 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
143 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
144 | private void InitializeControls() {
145 | this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this);
146 | this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this);
147 | }
148 |
149 | ///
150 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
151 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
152 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
153 | private void InitializeComponents() {
154 | }
155 |
156 | ///
157 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
158 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
159 | private bool NeedsFill(string MemberName) {
160 | return this.DataHost.NeedsFill(this, MemberName);
161 | }
162 |
163 | ///
164 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
165 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
166 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
167 | protected override void OnShutdown() {
168 | this.VstoSmartTags.Dispose();
169 | this.CustomTaskPanes.Dispose();
170 | base.OnShutdown();
171 | }
172 | }
173 |
174 | ///
175 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
176 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
177 | internal sealed partial class Globals {
178 |
179 | ///
180 | private Globals() {
181 | }
182 |
183 | private static ThisAddIn _ThisAddIn;
184 |
185 | private static global::Microsoft.Office.Tools.Word.ApplicationFactory _factory;
186 |
187 | private static ThisRibbonCollection _ThisRibbonCollection;
188 |
189 | internal static ThisAddIn ThisAddIn {
190 | get {
191 | return _ThisAddIn;
192 | }
193 | set {
194 | if ((_ThisAddIn == null)) {
195 | _ThisAddIn = value;
196 | }
197 | else {
198 | throw new System.NotSupportedException();
199 | }
200 | }
201 | }
202 |
203 | internal static global::Microsoft.Office.Tools.Word.ApplicationFactory Factory {
204 | get {
205 | return _factory;
206 | }
207 | set {
208 | if ((_factory == null)) {
209 | _factory = value;
210 | }
211 | else {
212 | throw new System.NotSupportedException();
213 | }
214 | }
215 | }
216 |
217 | internal static ThisRibbonCollection Ribbons {
218 | get {
219 | if ((_ThisRibbonCollection == null)) {
220 | _ThisRibbonCollection = new ThisRibbonCollection(_factory.GetRibbonFactory());
221 | }
222 | return _ThisRibbonCollection;
223 | }
224 | }
225 | }
226 |
227 | ///
228 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
229 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
230 | internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase {
231 |
232 | ///
233 | internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) :
234 | base(factory) {
235 | }
236 | }
237 | }
238 |
--------------------------------------------------------------------------------
/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WordxTex.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WordxTex.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap Button_About {
67 | get {
68 | object obj = ResourceManager.GetObject("Button_About", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap Button_Baseline_Down {
77 | get {
78 | object obj = ResourceManager.GetObject("Button_Baseline_Down", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized resource of type System.Drawing.Bitmap.
85 | ///
86 | internal static System.Drawing.Bitmap Button_Baseline_Reset {
87 | get {
88 | object obj = ResourceManager.GetObject("Button_Baseline_Reset", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// Looks up a localized resource of type System.Drawing.Bitmap.
95 | ///
96 | internal static System.Drawing.Bitmap Button_Baseline_Up {
97 | get {
98 | object obj = ResourceManager.GetObject("Button_Baseline_Up", resourceCulture);
99 | return ((System.Drawing.Bitmap)(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// Looks up a localized resource of type System.Drawing.Bitmap.
105 | ///
106 | internal static System.Drawing.Bitmap Button_Edit {
107 | get {
108 | object obj = ResourceManager.GetObject("Button_Edit", resourceCulture);
109 | return ((System.Drawing.Bitmap)(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// Looks up a localized resource of type System.Drawing.Bitmap.
115 | ///
116 | internal static System.Drawing.Bitmap Button_Insert_Graph {
117 | get {
118 | object obj = ResourceManager.GetObject("Button_Insert_Graph", resourceCulture);
119 | return ((System.Drawing.Bitmap)(obj));
120 | }
121 | }
122 |
123 | ///
124 | /// Looks up a localized resource of type System.Drawing.Bitmap.
125 | ///
126 | internal static System.Drawing.Bitmap Button_Insert_MathChemRea {
127 | get {
128 | object obj = ResourceManager.GetObject("Button_Insert_MathChemRea", resourceCulture);
129 | return ((System.Drawing.Bitmap)(obj));
130 | }
131 | }
132 |
133 | ///
134 | /// Looks up a localized resource of type System.Drawing.Bitmap.
135 | ///
136 | internal static System.Drawing.Bitmap Button_Insert_MathChemStru {
137 | get {
138 | object obj = ResourceManager.GetObject("Button_Insert_MathChemStru", resourceCulture);
139 | return ((System.Drawing.Bitmap)(obj));
140 | }
141 | }
142 |
143 | ///
144 | /// Looks up a localized resource of type System.Drawing.Bitmap.
145 | ///
146 | internal static System.Drawing.Bitmap Button_Insert_MathEQ {
147 | get {
148 | object obj = ResourceManager.GetObject("Button_Insert_MathEQ", resourceCulture);
149 | return ((System.Drawing.Bitmap)(obj));
150 | }
151 | }
152 |
153 | ///
154 | /// Looks up a localized resource of type System.Drawing.Bitmap.
155 | ///
156 | internal static System.Drawing.Bitmap Button_Insert_symbol {
157 | get {
158 | object obj = ResourceManager.GetObject("Button_Insert_symbol", resourceCulture);
159 | return ((System.Drawing.Bitmap)(obj));
160 | }
161 | }
162 |
163 | ///
164 | /// Looks up a localized resource of type System.Drawing.Bitmap.
165 | ///
166 | internal static System.Drawing.Bitmap Button_Insert_Tex {
167 | get {
168 | object obj = ResourceManager.GetObject("Button_Insert_Tex", resourceCulture);
169 | return ((System.Drawing.Bitmap)(obj));
170 | }
171 | }
172 |
173 | ///
174 | /// Looks up a localized resource of type System.Drawing.Bitmap.
175 | ///
176 | internal static System.Drawing.Bitmap Button_Settings {
177 | get {
178 | object obj = ResourceManager.GetObject("Button_Settings", resourceCulture);
179 | return ((System.Drawing.Bitmap)(obj));
180 | }
181 | }
182 |
183 | ///
184 | /// Looks up a localized string similar to \renewcommand{\normalsize}{\fontsize{%%WordxTex_Font_Symbol}{%%WordxTex_Font_Symbol}\selectfont}
185 | ///%%WordxTex_Equation_Font_Symbal
186 | ///\DeclareMathSizes{8}{8}{7}{5}
187 | ///\DeclareMathSizes{9}{9}{7}{5}
188 | ///\DeclareMathSizes{10}{10}{8}{5}
189 | ///\DeclareMathSizes{11}{11}{9}{7}
190 | ///\DeclareMathSizes{12}{12}{9}{7}
191 | ///\DeclareMathSizes{14}{14}{10}{7}
192 | ///\DeclareMathSizes{16}{16}{12}{8}
193 | ///\DeclareMathSizes{18}{18}{14}{10}
194 | ///\DeclareMathSizes{20}{20}{16}{12}
195 | ///\DeclareMathSizes{24}{24}{18}{14}
196 | ///\DeclareMathSizes{28}{28}{20}{16}
197 | ///\DeclareMath [rest of string was truncated]";.
198 | ///
199 | internal static string tex_fontsize_style {
200 | get {
201 | return ResourceManager.GetString("tex_fontsize_style", resourceCulture);
202 | }
203 | }
204 |
205 | ///
206 | /// Looks up a localized string similar to %!WordxTex_TexContent DO NOT DELETE THIS LINE
207 | ///\documentclass{minimal}
208 | ///%%param.sty for font adjustment.
209 | ///\usepackage{param}
210 | ///\usepackage{color,xcolor}
211 | ///\usepackage{fontawesome}
212 | ///\definecolor{upmain}{%%cMode}{%%cParam}
213 | ///\normalsize
214 | ///\begin{document}
215 | ///%%sample
216 | ///%\textcolor{upmain}{\faEnvelope}
217 | ///\end{document}.
218 | ///
219 | internal static string tex_sample_awesymbol {
220 | get {
221 | return ResourceManager.GetString("tex_sample_awesymbol", resourceCulture);
222 | }
223 | }
224 |
225 | ///
226 | /// Looks up a localized string similar to %!WordxTex_TexContent DO NOT DELETE THIS LINE
227 | ///\documentclass{standalone}
228 | ///%%param.sty for font adjustment.
229 | ///\usepackage{param}
230 | ///\usepackage{textcomp}
231 | ///\usepackage[version=4]{mhchem}
232 | ///\normalsize
233 | ///
234 | ///\begin{document}
235 | ///%%sample
236 | ///%\ce{A + B <=>[HP][LP] C}
237 | ///\end{document}.
238 | ///
239 | internal static string tex_sample_chemrea {
240 | get {
241 | return ResourceManager.GetString("tex_sample_chemrea", resourceCulture);
242 | }
243 | }
244 |
245 | ///
246 | /// Looks up a localized string similar to %!WordxTex_TexContent DO NOT DELETE THIS LINE
247 | ///\documentclass{standalone}
248 | ///%%param.sty for font adjustment.
249 | ///\usepackage{param}
250 | ///\usepackage{chemfig}
251 | ///\usepackage[active,tightpage]{preview}
252 | ///\normalsize
253 | ///\PreviewEnvironment{tikzpicture}
254 | ///\setlength\PreviewBorder{0pt}
255 | ///
256 | ///\begin{document}
257 | ///%%sample
258 | ///%\chemfig{*6(-=-=-=)}
259 | ///\end{document}.
260 | ///
261 | internal static string tex_sample_chemstr {
262 | get {
263 | return ResourceManager.GetString("tex_sample_chemstr", resourceCulture);
264 | }
265 | }
266 |
267 | ///
268 | /// Looks up a localized string similar to %!WordxTex_TexContent DO NOT DELETE THIS LINE
269 | ///\documentclass{minimal}
270 | ///%%param.sty for font adjustment.
271 | ///\usepackage{param}
272 | ///\normalsize
273 | ///
274 | ///\begin{document}
275 | ///\[
276 | ///%%sample
277 | ///%\int_{x}^{y} \sqrt[3]{\exp(z)}\, \mathrm{d}z
278 | ///\]
279 | ///\end{document}.
280 | ///
281 | internal static string tex_sample_matheq {
282 | get {
283 | return ResourceManager.GetString("tex_sample_matheq", resourceCulture);
284 | }
285 | }
286 |
287 | ///
288 | /// Looks up a localized string similar to %!WordxTex_TexContent DO NOT DELETE THIS LINE
289 | ///\documentclass{standalone}
290 | ///%%param.sty for font adjustment.
291 | ///\usepackage{param}
292 | ///\usepackage{pgfplots}
293 | ///\usepackage{mathpazo}
294 | ///\usepackage{filecontents}
295 | ///\pgfplotsset{width=0.95\textwidth,compat=1.13}
296 | ///\renewcommand{\normalsize}{\fontsize{10}{10}\selectfont}
297 | ///\normalsize
298 | ///
299 | ///%%Sample Data Content Start:---------------
300 | ///\begin{filecontents*}{0.5atm_ethanal_aq.dat}
301 | ///L V
302 | ///0.936 0.94056
303 | ///0.94 0.943692
304 | ///0.944 0.946891
305 | ///0.948 0.950161
306 | ///0.952 0.953502
307 | ///0.956 0.956918 [rest of string was truncated]";.
308 | ///
309 | internal static string tex_sample_plot {
310 | get {
311 | return ResourceManager.GetString("tex_sample_plot", resourceCulture);
312 | }
313 | }
314 | }
315 | }
316 |
--------------------------------------------------------------------------------
/Sources/Ribbon.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WordxTex
2 | {
3 | partial class Ribbon : Microsoft.Office.Tools.Ribbon.RibbonBase
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | public Ribbon()
11 | : base(Globals.Factory.GetRibbonFactory())
12 | {
13 | InitializeComponent();
14 | }
15 |
16 | ///
17 | /// Clean up any resources being used.
18 | ///
19 | /// true if managed resources should be disposed; otherwise, false.
20 | protected override void Dispose(bool disposing)
21 | {
22 | if (disposing && (components != null))
23 | {
24 | components.Dispose();
25 | }
26 | base.Dispose(disposing);
27 | }
28 |
29 | #region Component Designer generated code
30 |
31 | ///
32 | /// Required method for Designer support - do not modify
33 | /// the contents of this method with the code editor.
34 | ///
35 | private void InitializeComponent()
36 | {
37 | this.tab1 = this.Factory.CreateRibbonTab();
38 | this.WordxTex = this.Factory.CreateRibbonGroup();
39 | this.btn_insertTex = this.Factory.CreateRibbonButton();
40 | this.btn_insMath = this.Factory.CreateRibbonButton();
41 | this.btn_insChemReact = this.Factory.CreateRibbonButton();
42 | this.btn_insChemStruct = this.Factory.CreateRibbonButton();
43 | this.btn_ins_symbol = this.Factory.CreateRibbonButton();
44 | this.btn_insplot = this.Factory.CreateRibbonButton();
45 | this.separator3 = this.Factory.CreateRibbonSeparator();
46 | this.btn_edit = this.Factory.CreateRibbonButton();
47 | this.btn_batchEdit = this.Factory.CreateRibbonButton();
48 | this.separator4 = this.Factory.CreateRibbonSeparator();
49 | this.btn_baselineU = this.Factory.CreateRibbonButton();
50 | this.btn_baselineDn = this.Factory.CreateRibbonButton();
51 | this.btn_baselineRt = this.Factory.CreateRibbonButton();
52 | this.separator5 = this.Factory.CreateRibbonSeparator();
53 | this.lb_gen_tip = this.Factory.CreateRibbonLabel();
54 | this.btn_settings = this.Factory.CreateRibbonButton();
55 | this.btn_about = this.Factory.CreateRibbonButton();
56 | this.tab_WordxTex = this.Factory.CreateRibbonTab();
57 | this.tab1.SuspendLayout();
58 | this.WordxTex.SuspendLayout();
59 | this.tab_WordxTex.SuspendLayout();
60 | this.SuspendLayout();
61 | //
62 | // tab1
63 | //
64 | this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
65 | this.tab1.Groups.Add(this.WordxTex);
66 | this.tab1.Label = "TabAddIns";
67 | this.tab1.Name = "tab1";
68 | //
69 | // WordxTex
70 | //
71 | this.WordxTex.Items.Add(this.btn_insertTex);
72 | this.WordxTex.Items.Add(this.btn_insMath);
73 | this.WordxTex.Items.Add(this.btn_insChemReact);
74 | this.WordxTex.Items.Add(this.btn_insChemStruct);
75 | this.WordxTex.Items.Add(this.btn_ins_symbol);
76 | this.WordxTex.Items.Add(this.btn_insplot);
77 | this.WordxTex.Items.Add(this.separator3);
78 | this.WordxTex.Items.Add(this.btn_edit);
79 | this.WordxTex.Items.Add(this.btn_batchEdit);
80 | this.WordxTex.Items.Add(this.separator4);
81 | this.WordxTex.Items.Add(this.btn_baselineU);
82 | this.WordxTex.Items.Add(this.btn_baselineDn);
83 | this.WordxTex.Items.Add(this.btn_baselineRt);
84 | this.WordxTex.Items.Add(this.separator5);
85 | this.WordxTex.Items.Add(this.lb_gen_tip);
86 | this.WordxTex.Items.Add(this.btn_settings);
87 | this.WordxTex.Items.Add(this.btn_about);
88 | this.WordxTex.Label = "WordxTex";
89 | this.WordxTex.Name = "WordxTex";
90 | //
91 | // btn_insertTex
92 | //
93 | this.btn_insertTex.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
94 | this.btn_insertTex.Image = global::WordxTex.Properties.Resources.Button_Insert_Tex;
95 | this.btn_insertTex.KeyTip = "I";
96 | this.btn_insertTex.Label = "Insert TeX";
97 | this.btn_insertTex.Name = "btn_insertTex";
98 | this.btn_insertTex.ScreenTip = "Insert LaTex Content.";
99 | this.btn_insertTex.ShowImage = true;
100 | this.btn_insertTex.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_insertTex_Click);
101 | //
102 | // btn_insMath
103 | //
104 | this.btn_insMath.Image = global::WordxTex.Properties.Resources.Button_Insert_MathEQ;
105 | this.btn_insMath.Label = "Math Equation";
106 | this.btn_insMath.Name = "btn_insMath";
107 | this.btn_insMath.ScreenTip = "Insert Math Equation.";
108 | this.btn_insMath.ShowImage = true;
109 | this.btn_insMath.ShowLabel = false;
110 | this.btn_insMath.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_insMath_Click);
111 | //
112 | // btn_insChemReact
113 | //
114 | this.btn_insChemReact.Image = global::WordxTex.Properties.Resources.Button_Insert_MathChemRea;
115 | this.btn_insChemReact.Label = "Chemical Reaction";
116 | this.btn_insChemReact.Name = "btn_insChemReact";
117 | this.btn_insChemReact.ScreenTip = "Insert Chemical Expression";
118 | this.btn_insChemReact.ShowImage = true;
119 | this.btn_insChemReact.ShowLabel = false;
120 | this.btn_insChemReact.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_insChemReact_Click);
121 | //
122 | // btn_insChemStruct
123 | //
124 | this.btn_insChemStruct.Image = global::WordxTex.Properties.Resources.Button_Insert_MathChemStru;
125 | this.btn_insChemStruct.Label = "Chemical Structure";
126 | this.btn_insChemStruct.Name = "btn_insChemStruct";
127 | this.btn_insChemStruct.ScreenTip = "Insert Chemical Structure";
128 | this.btn_insChemStruct.ShowImage = true;
129 | this.btn_insChemStruct.ShowLabel = false;
130 | this.btn_insChemStruct.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_insChemStruct_Click);
131 | //
132 | // btn_ins_symbol
133 | //
134 | this.btn_ins_symbol.Image = global::WordxTex.Properties.Resources.Button_Insert_symbol;
135 | this.btn_ins_symbol.Label = "Insert Symbol";
136 | this.btn_ins_symbol.Name = "btn_ins_symbol";
137 | this.btn_ins_symbol.ScreenTip = "Insert Awesome Symbol";
138 | this.btn_ins_symbol.ShowImage = true;
139 | this.btn_ins_symbol.ShowLabel = false;
140 | this.btn_ins_symbol.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_ins_symbol_Click);
141 | //
142 | // btn_insplot
143 | //
144 | this.btn_insplot.Image = global::WordxTex.Properties.Resources.Button_Insert_Graph;
145 | this.btn_insplot.Label = "Plot";
146 | this.btn_insplot.Name = "btn_insplot";
147 | this.btn_insplot.ScreenTip = "Insert Plot Graph";
148 | this.btn_insplot.ShowImage = true;
149 | this.btn_insplot.ShowLabel = false;
150 | this.btn_insplot.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_insplot_Click);
151 | //
152 | // separator3
153 | //
154 | this.separator3.Name = "separator3";
155 | //
156 | // btn_edit
157 | //
158 | this.btn_edit.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
159 | this.btn_edit.Enabled = false;
160 | this.btn_edit.Image = global::WordxTex.Properties.Resources.Button_Edit;
161 | this.btn_edit.Label = "Edit";
162 | this.btn_edit.Name = "btn_edit";
163 | this.btn_edit.ShowImage = true;
164 | this.btn_edit.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_edit_Click);
165 | //
166 | // btn_batchEdit
167 | //
168 | this.btn_batchEdit.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
169 | this.btn_batchEdit.Label = "Batch Edit";
170 | this.btn_batchEdit.Name = "btn_batchEdit";
171 | this.btn_batchEdit.ShowImage = true;
172 | this.btn_batchEdit.Visible = false;
173 | this.btn_batchEdit.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_batchEdit_Click);
174 | //
175 | // separator4
176 | //
177 | this.separator4.Name = "separator4";
178 | //
179 | // btn_baselineU
180 | //
181 | this.btn_baselineU.Image = global::WordxTex.Properties.Resources.Button_Baseline_Up;
182 | this.btn_baselineU.Label = "Baseline Move Up";
183 | this.btn_baselineU.Name = "btn_baselineU";
184 | this.btn_baselineU.ShowImage = true;
185 | this.btn_baselineU.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_baselineU_Click);
186 | //
187 | // btn_baselineDn
188 | //
189 | this.btn_baselineDn.Image = global::WordxTex.Properties.Resources.Button_Baseline_Down;
190 | this.btn_baselineDn.Label = "Baseline Move Down";
191 | this.btn_baselineDn.Name = "btn_baselineDn";
192 | this.btn_baselineDn.ShowImage = true;
193 | this.btn_baselineDn.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_baselineDn_Click);
194 | //
195 | // btn_baselineRt
196 | //
197 | this.btn_baselineRt.Image = global::WordxTex.Properties.Resources.Button_Baseline_Reset;
198 | this.btn_baselineRt.Label = "Baseline Reset";
199 | this.btn_baselineRt.Name = "btn_baselineRt";
200 | this.btn_baselineRt.ShowImage = true;
201 | this.btn_baselineRt.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_baselineRt_Click);
202 | //
203 | // separator5
204 | //
205 | this.separator5.Name = "separator5";
206 | //
207 | // lb_gen_tip
208 | //
209 | this.lb_gen_tip.Label = "genTip";
210 | this.lb_gen_tip.Name = "lb_gen_tip";
211 | //
212 | // btn_settings
213 | //
214 | this.btn_settings.Image = global::WordxTex.Properties.Resources.Button_Settings;
215 | this.btn_settings.Label = "Settings";
216 | this.btn_settings.Name = "btn_settings";
217 | this.btn_settings.ShowImage = true;
218 | this.btn_settings.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_settings_Click);
219 | //
220 | // btn_about
221 | //
222 | this.btn_about.Image = global::WordxTex.Properties.Resources.Button_About;
223 | this.btn_about.Label = "About";
224 | this.btn_about.Name = "btn_about";
225 | this.btn_about.ShowImage = true;
226 | this.btn_about.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btn_about_Click);
227 | //
228 | // tab_WordxTex
229 | //
230 | this.tab_WordxTex.Label = "WordxTex";
231 | this.tab_WordxTex.Name = "tab_WordxTex";
232 | //
233 | // Ribbon
234 | //
235 | this.Name = "Ribbon";
236 | this.RibbonType = "Microsoft.Word.Document";
237 | this.Tabs.Add(this.tab1);
238 | this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.Ribbon_Load);
239 | this.tab1.ResumeLayout(false);
240 | this.tab1.PerformLayout();
241 | this.WordxTex.ResumeLayout(false);
242 | this.WordxTex.PerformLayout();
243 | this.tab_WordxTex.ResumeLayout(false);
244 | this.tab_WordxTex.PerformLayout();
245 | this.ResumeLayout(false);
246 |
247 | }
248 |
249 | #endregion
250 |
251 | internal Microsoft.Office.Tools.Ribbon.RibbonTab tab1;
252 | internal Microsoft.Office.Tools.Ribbon.RibbonGroup WordxTex;
253 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_insertTex;
254 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_insMath;
255 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_insChemReact;
256 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_insChemStruct;
257 | internal Microsoft.Office.Tools.Ribbon.RibbonSeparator separator3;
258 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_edit;
259 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_baselineU;
260 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_baselineDn;
261 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_baselineRt;
262 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_settings;
263 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_about;
264 | internal Microsoft.Office.Tools.Ribbon.RibbonTab tab_WordxTex;
265 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_insplot;
266 | internal Microsoft.Office.Tools.Ribbon.RibbonSeparator separator4;
267 | internal Microsoft.Office.Tools.Ribbon.RibbonLabel lb_gen_tip;
268 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_batchEdit;
269 | internal Microsoft.Office.Tools.Ribbon.RibbonButton btn_ins_symbol;
270 | internal Microsoft.Office.Tools.Ribbon.RibbonSeparator separator5;
271 | }
272 |
273 | partial class ThisRibbonCollection
274 | {
275 | internal Ribbon Ribbon1
276 | {
277 | get { return this.GetRibbon(); }
278 | }
279 | }
280 | }
281 |
--------------------------------------------------------------------------------
/Sources/Ribbon.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Office.Interop.Word;
2 | using Microsoft.Office.Tools.Ribbon;
3 | using System;
4 | using System.IO;
5 | using WordxTex.Properties;
6 |
7 | namespace WordxTex
8 | {
9 | public partial class Ribbon
10 | {
11 | public bool programCheck;
12 | public static SettingsForm settingsBox = new SettingsForm();
13 |
14 | private void btn_baselineU_Click(object sender, RibbonControlEventArgs e)
15 | {
16 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
17 | if (ThisDoc == null || ThisDoc.ReadOnly)
18 | return;
19 | ThisDoc.Application.Selection.Font.Position = ThisDoc.Application.Selection.Font.Position + 1;
20 | }
21 |
22 | private void btn_baselineRt_Click(object sender, RibbonControlEventArgs e)
23 | {
24 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
25 | if (ThisDoc == null || ThisDoc.ReadOnly)
26 | return;
27 | ThisDoc.Application.Selection.Font.Position = 0;
28 | }
29 |
30 | private void btn_baselineDn_Click(object sender, RibbonControlEventArgs e)
31 | {
32 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
33 | if (ThisDoc == null || ThisDoc.ReadOnly)
34 | return;
35 | ThisDoc.Application.Selection.Font.Position = ThisDoc.Application.Selection.Font.Position - 1;
36 | }
37 |
38 | private void btn_edit_Click(object sender, RibbonControlEventArgs e)
39 | {
40 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
41 | if (ThisDoc == null || ThisDoc.ReadOnly)
42 | return;
43 | InlineShapes SelectedObj = ThisDoc.Application.Selection.InlineShapes;
44 | if (SelectedObj.Count == 0)
45 | return;
46 | InlineShape SelectedObjFirst = SelectedObj[1];
47 | if (!SelectedObjFirst.AlternativeText.Contains("WordxTex_TexContent"))
48 | return;
49 | LaTexEdt CodeEditor = new LaTexEdt(false, SelectedObjFirst.AlternativeText, 0, 0);
50 | CodeEditor.ShowDialog();
51 | }
52 |
53 | private void btn_insChemStruct_Click(object sender, RibbonControlEventArgs e)
54 | {
55 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
56 | if (ThisDoc == null || ThisDoc.ReadOnly)
57 | return;
58 | LaTexEdt CodeEditor = new LaTexEdt(false, Resources.tex_sample_chemstr, 289, 321);
59 | CodeEditor.Show();
60 | }
61 |
62 | private void btn_insChemReact_Click(object sender, RibbonControlEventArgs e)
63 | {
64 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
65 | if (ThisDoc == null || ThisDoc.ReadOnly)
66 | return;
67 | LaTexEdt CodeEditor = new LaTexEdt(false, Resources.tex_sample_chemrea, 217, 252);
68 | CodeEditor.Show();
69 | }
70 |
71 | private void btn_insMath_Click(object sender, RibbonControlEventArgs e)
72 | {
73 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
74 | if (ThisDoc == null || ThisDoc.ReadOnly)
75 | return;
76 | LaTexEdt CodeEditor = new LaTexEdt(false, Resources.tex_sample_matheq, 163, 218);
77 | CodeEditor.Show();
78 | }
79 |
80 | public static string get_param_value(string param, string name)
81 | {
82 | char spep = ';';
83 | string[] CompileI = param.Split(spep);
84 | string[] K;
85 | foreach (string cI in CompileI)
86 | {
87 | K = cI.Split('=');
88 | if (K[0] == name)
89 | {
90 | return K[1];
91 | }
92 | }
93 | return "";
94 | }
95 |
96 | private void Ribbon_Load(object sender, RibbonUIEventArgs e)
97 | {
98 | SettingsBox_Intl(false);
99 | //settingsBox.generChangeEventHandler += delegate (Object prg_params, EventArgs Evr)
100 | //{
101 | // check_programs();
102 | //};
103 |
104 | Globals.ThisAddIn.Application.WindowBeforeDoubleClick += Application_WindowBeforeDoubleClick;
105 |
106 | Globals.ThisAddIn.Application.WindowSelectionChange += delegate (Selection Sel)
107 | {
108 | if (programCheck == false)
109 | {
110 | btn_edit.Enabled = false;
111 | return;
112 | }
113 | if (Globals.ThisAddIn.Application.Selection.Type == WdSelectionType.wdSelectionIP)
114 | {
115 | btn_edit.Enabled = false;
116 | return;
117 | }
118 | editContentCheck(Sel);
119 | };
120 | }
121 |
122 | private void Application_WindowBeforeDoubleClick(Selection Sel, ref bool Cancel)
123 | {
124 | InlineShapes SelectedObj = Sel.InlineShapes;
125 | if (SelectedObj.Count == 0)
126 | return;
127 | InlineShape SelectedObjFirst = SelectedObj[1];
128 | if (!SelectedObjFirst.AlternativeText.Contains("WordxTex_TexContent"))
129 | return;
130 | LaTexEdt CodeEditor = new LaTexEdt(false, SelectedObjFirst.AlternativeText, 0, 0);
131 | CodeEditor.ShowDialog();
132 | }
133 |
134 | private void SettingsBox_Intl(bool form_terminated)
135 | {
136 | //读取配置
137 | if (form_terminated) settingsBox = new SettingsForm();
138 | settingsBox.FormClosed += ((formObj, ea) => SettingsBox_Intl(true)); //防止设置窗口中止
139 | settingsBox.generChangeEventHandler += ((prg_params, Evr) => check_programs()); //即TeX程序配置
140 | //显示标签与否
141 | btn_insMath.ShowLabel = settingsBox.showLabel;
142 | btn_insChemReact.ShowLabel = settingsBox.showLabel;
143 | btn_insChemStruct.ShowLabel = settingsBox.showLabel;
144 | btn_ins_symbol.ShowLabel = settingsBox.showLabel;
145 | btn_insplot.ShowLabel = settingsBox.showLabel;
146 | btn_baselineU.ShowLabel = settingsBox.showLabel;
147 | btn_baselineDn.ShowLabel = settingsBox.showLabel;
148 | btn_baselineRt.ShowLabel = settingsBox.showLabel;
149 | settingsBox.showLabelOptionChangeEventHandler += delegate (Object checkStatus, EventArgs Evr)
150 | {
151 | btn_insMath.ShowLabel = (bool)checkStatus;
152 | btn_insChemReact.ShowLabel = (bool)checkStatus;
153 | btn_insChemStruct.ShowLabel = (bool)checkStatus;
154 | btn_ins_symbol.ShowLabel = (bool)checkStatus;
155 | btn_insplot.ShowLabel = (bool)checkStatus;
156 | btn_baselineU.ShowLabel = (bool)checkStatus;
157 | btn_baselineDn.ShowLabel = (bool)checkStatus;
158 | btn_baselineRt.ShowLabel = (bool)checkStatus;
159 | };
160 |
161 | check_programs();//检查Tex配置
162 | }
163 |
164 | private void editContentCheck(Selection Sel)
165 | {
166 | try
167 | {
168 | if (Sel.InlineShapes[1].AlternativeText.Contains("WordxTex_TexContent")) btn_edit.Enabled = true;
169 | }
170 | catch (System.Exception)
171 | {
172 | btn_edit.Enabled = false;
173 | return;
174 | }
175 | }
176 | private void btn_settings_Click(object sender, RibbonControlEventArgs e) => settingsBox.Show();
177 |
178 | private void btn_insplot_Click(object sender, RibbonControlEventArgs e)
179 | {
180 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
181 | if (ThisDoc == null || ThisDoc.ReadOnly)
182 | return;
183 | LaTexEdt CodeEditor = new LaTexEdt(false, Resources.tex_sample_plot, 0, 0);
184 | //CodeEditor.updateSRC(Resources.tex_sample_plot);
185 | CodeEditor.Show();
186 | }
187 |
188 | private void btn_about_Click(object sender, RibbonControlEventArgs e) => new AboutBox().ShowDialog();
189 |
190 | private void check_programs()
191 | {
192 | if (
193 | (!ExistsOnPath(get_param_value(settingsBox.program_exec_params, "complier") + ".exe")) ||
194 | (!ExistsOnPath(get_param_value(settingsBox.program_exec_params, "grapher") + ".exe"))
195 | )
196 | {
197 | lb_gen_tip.Label = "Fatal: Programs invalid!";
198 | btn_insertTex.Enabled = false;
199 | btn_insChemStruct.Enabled = false;
200 | btn_insMath.Enabled = false;
201 | btn_insChemReact.Enabled = false;
202 | btn_insplot.Enabled = false;
203 | btn_ins_symbol.Enabled = false;
204 | programCheck = false;
205 | btn_edit.Enabled = false;
206 | return;
207 | }
208 | if (get_param_value(settingsBox.program_exec_params, "gaccept").Contains(get_param_value(settingsBox.program_exec_params, "ctarget")))
209 | {
210 | lb_gen_tip.Label = "Ready: " + get_param_value(settingsBox.program_exec_params, "ctip") + get_param_value(settingsBox.program_exec_params, "gtip");
211 | btn_insertTex.Enabled = true;
212 | btn_insChemStruct.Enabled = true;
213 | btn_insMath.Enabled = true;
214 | btn_insChemReact.Enabled = true;
215 | btn_insplot.Enabled = true;
216 | btn_ins_symbol.Enabled = true;
217 | programCheck = true;
218 | }
219 | else
220 | {
221 | lb_gen_tip.Label = "Fatal: Improper combination!";
222 | btn_insertTex.Enabled = false;
223 | btn_insChemStruct.Enabled = false;
224 | btn_insMath.Enabled = false;
225 | btn_insChemReact.Enabled = false;
226 | btn_insplot.Enabled = false;
227 | btn_ins_symbol.Enabled = false;
228 | programCheck = false;
229 | btn_edit.Enabled = false;
230 | }
231 | }
232 | public static bool ExistsOnPath(string fileName) => GetFullPath(fileName) != null;
233 |
234 | public static string GetFullPath(string fileName)
235 | {
236 | if (File.Exists(fileName))
237 | return Path.GetFullPath(fileName);
238 |
239 | var values = Environment.GetEnvironmentVariable("PATH");
240 | foreach (var path in values.Split(Path.PathSeparator))
241 | {
242 | var fullPath = Path.Combine(path, fileName);
243 | if (File.Exists(fullPath))
244 | return fullPath;
245 | }
246 | return null;
247 | }
248 |
249 | private void btn_batchEdit_Click(object sender, RibbonControlEventArgs e)
250 | {
251 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
252 | if (ThisDoc == null || ThisDoc.ReadOnly)
253 | return;
254 | int IntlStart = ThisDoc.Application.Selection.Start;
255 | int IntlEnd = ThisDoc.Application.Selection.End;
256 | ThisDoc.Application.Selection.SetRange(ThisDoc.Application.Selection.Start, ThisDoc.Application.Selection.Start + 1);
257 |
258 | Selection TexObj = ThisDoc.Application.Selection;
259 | Range TexItem = null;
260 | bool if_TexObject = false;
261 |
262 | InlineShape TexObjInline = null;
263 | int TexObjInline_prvstart = 0;
264 | int TexObjInline_start = 1;
265 |
266 | if (TexObj.InlineShapes.Count != 0)
267 | {
268 | TexObjInline = TexObj.InlineShapes[1];
269 | if_TexObject = (TexObjInline.Type != WdInlineShapeType.wdInlineShapePicture);
270 | if_TexObject = (if_TexObject && TexObjInline.AlternativeText.Contains("WordxTex_TexContent"));
271 | }
272 | else
273 | {
274 | TexItem = ThisDoc.Application.Selection.GoToNext(WdGoToItem.wdGoToGraphic);
275 | ThisDoc.Application.Selection.SetRange(ThisDoc.Application.Selection.Start, ThisDoc.Application.Selection.Start + 1);
276 | TexObj = ThisDoc.Application.Selection;
277 | }
278 | while ((!if_TexObject) && TexObj.InlineShapes.Count != 0 && ((TexObjInline_prvstart != TexObjInline_start)))
279 | {
280 | TexObjInline_prvstart = TexObjInline_start;
281 | TexItem = ThisDoc.Application.Selection.GoToNext(WdGoToItem.wdGoToGraphic);
282 | ThisDoc.Application.Selection.SetRange(ThisDoc.Application.Selection.Start, ThisDoc.Application.Selection.Start + 1);
283 | TexObj = ThisDoc.Application.Selection;
284 | TexObjInline_start = TexObj.Start;
285 | TexObjInline = TexObj.InlineShapes[1];
286 | if_TexObject = (TexObjInline.Type != WdInlineShapeType.wdInlineShapePicture);
287 | if_TexObject = (if_TexObject && TexObjInline.AlternativeText.Contains("WordxTex_TexContent"));
288 | };
289 | if (if_TexObject)
290 | {
291 | LaTexEdt CodeEditor = new LaTexEdt(true, TexObjInline.AlternativeText, 0, 0);
292 | //CodeEditor.updateSRC(TexObjInline.AlternativeText);
293 | CodeEditor.Show();
294 | }
295 | else
296 | {
297 | ThisDoc.Application.Selection.SetRange(IntlStart, IntlEnd);
298 | }
299 | }
300 |
301 | private void btn_insertTex_Click(object sender, RibbonControlEventArgs e)
302 | {
303 | LaTexEdt CodeEditor = new LaTexEdt(false, "%!WordxTex_TexContent DO NOT DELETE THIS LINE\n", 46, 46);
304 | CodeEditor.Show();
305 | }
306 |
307 | private void btn_ins_symbol_Click(object sender, RibbonControlEventArgs e)
308 | {
309 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument; ;
310 | if (ThisDoc == null || ThisDoc.ReadOnly)
311 | return;
312 | LaTexEdt CodeEditor = new LaTexEdt(false, Resources.tex_sample_awesymbol, 183, 248);
313 | //CodeEditor.updateSRC(Resources.tex_sample_matheq);
314 | CodeEditor.Show();
315 | }
316 |
317 | }
318 | }
319 |
--------------------------------------------------------------------------------
/WordxTex.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
21 | {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
22 | Debug
23 | AnyCPU
24 | {EE42B4EE-81D4-4053-941A-26286DE0616E}
25 | Library
26 | false
27 | WordxTex
28 | WordxTex
29 | v4.5
30 | VSTO40
31 | False
32 |
33 | true
34 | F:\WordxTex\
35 |
36 | en
37 | 0.5.0.0
38 | false
39 | false
40 | 0
41 | days
42 | WordxTex
43 | WordxTex
44 | https://github.com/rylandev/WordxTex
45 | WordxTex
46 | A TeX Add-in word
47 | 3
48 |
49 |
50 |
51 | False
52 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29
53 | true
54 |
55 |
56 | False
57 | .NET Framework 3.5 SP1
58 | false
59 |
60 |
61 | False
62 | Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29
63 | true
64 |
65 |
66 |
67 |
71 | Word
72 |
73 |
89 |
90 | true
91 | full
92 | false
93 | bin\Debug\
94 | false
95 | $(DefineConstants);DEBUG;TRACE
96 | 4
97 | false
98 |
99 |
115 |
116 | pdbonly
117 | true
118 | bin\Release\
119 | false
120 | $(DefineConstants);TRACE
121 | 4
122 | false
123 |
124 |
127 |
128 |
129 | False
130 |
131 |
132 | False
133 |
134 |
135 | False
136 |
137 |
138 | False
139 |
140 |
141 |
142 | False
143 |
144 |
145 | False
146 |
147 |
148 | False
149 |
150 |
151 | False
152 |
153 |
154 | False
155 |
156 |
157 | False
158 |
159 |
160 |
161 |
162 | False
163 |
164 |
165 | False
166 |
167 |
168 | False
169 |
170 |
171 | False
172 |
173 |
174 | False
175 |
176 |
177 |
178 |
179 | True
180 |
181 |
182 |
183 |
184 | False
185 | true
186 |
187 |
188 | False
189 | true
190 |
191 |
192 | False
193 |
194 |
195 |
205 |
206 |
207 | Form
208 |
209 |
210 | SettingsForm.cs
211 |
212 |
213 | Form
214 |
215 |
216 | AboutBox.cs
217 |
218 |
219 |
220 | Form
221 |
222 |
223 | LaTexEdt.cs
224 |
225 |
226 | Code
227 |
228 |
229 | AboutBox.cs
230 |
231 |
232 | LaTexEdt.cs
233 |
234 |
235 | ResXFileCodeGenerator
236 | Resources.Designer.cs
237 | Designer
238 |
239 |
240 | True
241 | Resources.resx
242 | True
243 |
244 |
245 | Ribbon.cs
246 |
247 |
248 | SettingsForm.cs
249 |
250 |
251 | SettingsSingleFileGenerator
252 | Settings.Designer.cs
253 |
254 |
255 | True
256 | Settings.settings
257 | True
258 |
259 |
260 | Component
261 |
262 |
263 | Ribbon.cs
264 |
265 |
266 | Code
267 |
268 |
269 | ThisAddIn.cs
270 |
271 |
272 | ThisAddIn.Designer.xml
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 | {1a0eb623-3edd-4ba6-80ee-0fa61a708542}
328 | DropDownControls
329 |
330 |
331 | {2d18be89-d210-49eb-a9dd-2246fbb3df6d}
332 | ICSharpCode.TextEditor
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 | 10.0
346 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
347 |
348 |
349 | true
350 |
351 |
352 | WordxTex_TemporaryKey.pfx
353 |
354 |
355 | 9FE0BCDD8F2B021E36EDE7A60D1B24A7F4201FA2
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
--------------------------------------------------------------------------------
/Sources/LaTexEdt.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Office.Core;
2 | using Microsoft.Office.Interop.Word;
3 | using System;
4 | using System.Diagnostics;
5 | using System.Drawing;
6 | using System.Drawing.Imaging;
7 | using System.IO;
8 | using System.Linq;
9 | using System.Threading;
10 | using System.Windows.Forms;
11 | using WordxTex.Properties;
12 |
13 | namespace WordxTex
14 | {
15 | public partial class LaTexEdt : Form
16 | {
17 | public string workPath = Ribbon.settingsBox.workPath + "\\WordxTex";
18 | public LaTexEdt(bool BatchMode, string Code, int caretStart, int caretEnd)
19 | {
20 | InitializeComponent();
21 | if (BatchMode) //批量模式(测试中)
22 | {
23 | btn_prvTex.Enabled = true;
24 | btn_nxtTeX.Enabled = true;
25 | }
26 | else
27 | {
28 | btn_nxtTeX.Visible = false;
29 | btn_prvTex.Visible = false;
30 | }
31 | this.TopMost = true;
32 | this.texCodeBox.Text = Code;
33 | this.Shown += delegate (object sender, EventArgs evt)
34 | {
35 | texCodeBox.ActiveTextAreaControl.Caret.Position = texCodeBox.Document.OffsetToPosition(caretStart);
36 | texCodeBox.ActiveTextAreaControl.SelectionManager.ClearSelection();
37 | texCodeBox.ActiveTextAreaControl.SelectionManager.SetSelection(
38 | new ICSharpCode.TextEditor.Document.DefaultSelection(
39 | texCodeBox.Document, texCodeBox.Document.OffsetToPosition(caretStart),
40 | texCodeBox.Document.OffsetToPosition(caretEnd)
41 | ));
42 | texCodeBox.Refresh();
43 | texCodeBox.Focus();
44 | };
45 | }
46 | string __targetImgFile;
47 | string __texContent = "";
48 | public Process Rprocess = new Process();//创建进程对象
49 |
50 | private void btn_gen_Click(object sender, EventArgs e)
51 | {
52 | btn_gen.Enabled = false; //防止按多次
53 | Cursor = Cursors.AppStarting;
54 | logsBox.ForeColor = System.Drawing.SystemColors.WindowText;
55 | logsBox.Clear(); //清空日志框,防溢出
56 | logsBox.ClearUndo();
57 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
58 | string occupied_id = "param_" + Guid.NewGuid().ToString();
59 | if (ThisDoc == null || ThisDoc.ReadOnly) return;
60 | string workPath = Ribbon.settingsBox.workPath + "\\WordxTex";
61 | latex_style_gen(workPath);
62 | string TexFile = workPath + "\\" + occupied_id + ".tex";
63 | __texContent = texCodeBox.Text;
64 | System.Text.UTF8Encoding UTF8Enc = new System.Text.UTF8Encoding(false);
65 | File.WriteAllText(TexFile, texCodeBox.Text, UTF8Enc); //将tex文件写入到磁盘
66 | latex_compile(Ribbon.settingsBox.program_exec_params, occupied_id); //编译tex
67 | }
68 | private void latex_compile(string cp_param, string OccupiedName)
69 | {
70 | //命令准备
71 | string Complier = Ribbon.GetFullPath(Ribbon.get_param_value(cp_param, "complier") + ".exe");
72 | string Grapher = Ribbon.GetFullPath(Ribbon.get_param_value(cp_param, "grapher") + ".exe");
73 | string TexFile = workPath + "\\" + OccupiedName + ".tex";
74 | string OutDviFile = workPath + "\\" + OccupiedName + Ribbon.get_param_value(cp_param, "ctarget");
75 | string OutImgFile = workPath + "\\" + OccupiedName + Ribbon.get_param_value(cp_param, "gtarget");
76 | __targetImgFile = OutImgFile;
77 | string Complier_Args = Ribbon.get_param_value(cp_param, "cp_arg");
78 | string Grapher_Args = Ribbon.get_param_value(cp_param, "gr_arg");
79 | Complier_Args = Complier_Args.Replace("%%BlankSpace", " ");
80 | Complier_Args = Complier_Args.Replace("%%InTexFile", TexFile);
81 | Complier_Args = Complier_Args.Replace("%%OutDir", workPath);
82 | Complier_Args = Complier_Args.Replace("%%Equal", "=");
83 | Complier_Args = Complier_Args.Replace("\\", "/");
84 | Grapher_Args = Grapher_Args.Replace("%%BlankSpace", " ");
85 | Grapher_Args = Grapher_Args.Replace("%%OutImgFile", OutImgFile);
86 | Grapher_Args = Grapher_Args.Replace("%%InDviFile", OutDviFile);
87 | Grapher_Args = Grapher_Args.Replace("%%Equal", "=");
88 | Grapher_Args = Grapher_Args.Replace("\\", "/");
89 |
90 | if (false == System.IO.Directory.Exists(workPath)) System.IO.Directory.CreateDirectory(workPath); //检测工作目录是否需要创建
91 |
92 | latex_style_gen(workPath); //生成自动模板
93 | //准备命令队列
94 | WordxTex.wTModule.ProgramQueue CpQueue = new WordxTex.wTModule.ProgramQueue(
95 | new string[] { Complier, Grapher },
96 | new string[] { Complier_Args, Grapher_Args },
97 | Ribbon.settingsBox.maxRunTimePerProgram);
98 | ThreadStart thrdstart = new ThreadStart(CpQueue.Run); //使用另一线程运行
99 | Thread thrd = new Thread(thrdstart);
100 | CpQueue.ProgramsRunLogStepRs += CpQueue_ProgramsRunLogStepRs;
101 | CpQueue.ProgramsRunResult += CpQueue_ProgramsRunResult;
102 | CpQueue.ProgramsRunCmdLine += CpQueue_ProgramsRunCmdLine;
103 | thrd.Start();
104 | }
105 |
106 | private void CpQueue_ProgramsRunCmdLine(object pCmdline, EventArgs e)
107 | {
108 |
109 | if (pCmdline == null) return;
110 | string oLogs = "";
111 | try
112 | {
113 | oLogs = (string)pCmdline;
114 | }
115 | catch (System.NullReferenceException)
116 | {
117 | return;
118 | }
119 | if (oLogs.Length > 0)
120 | {
121 | Control.CheckForIllegalCrossThreadCalls = false; //跨线程操作
122 | logsBox.AppendText((string)pCmdline);
123 | logsBox.AppendText("\r\n");
124 | }
125 | }
126 |
127 | private void CpQueue_ProgramsRunResult(object reports, EventArgs e)
128 | {
129 | Control.CheckForIllegalCrossThreadCalls = false; //跨线程操作
130 | Object[] execReports = (Object[])reports;
131 | if (cb_AutoClose.Checked) logsBox.Clear();
132 | logsBox.AppendText("Runned!\r\n");
133 | for (int i = 0; i < execReports.Length; i++)
134 | {
135 | wTModule.ProgramResult oReport = (wTModule.ProgramResult)execReports[i];
136 | if (oReport.exitCode != 0)
137 | {
138 | //写入日志框
139 | int logsBoxCount = logsBox.Text.Length;
140 | string programExecParam = "[" + (i + 1).ToString() + "/" + execReports.Length + "] Error: " + oReport.execName + " " + oReport.execArgs + "\r\n";
141 | string programExitCodeParam = "Error With Exit Code: " + oReport.exitCode.ToString() + "\r\n";
142 | logsBox.AppendText(programExecParam);
143 | logsBox.AppendText(programExitCodeParam);
144 | logsBox.AppendText(oReport.execLogs);
145 | //错误运行
146 | logsBox.Select(logsBoxCount, programExecParam.Length + programExitCodeParam.Length - 4);
147 | logsBox.SelectionColor = Color.Red; //标红
148 | logsBox.SelectionStart = logsBoxCount;
149 | logsBox.ScrollToCaret(); //移动光标到错误位置
150 | Cursor = Cursors.Default;
151 | btn_gen.Enabled = true;//恢复按钮
152 | return; //停止运行
153 | }
154 | }
155 | if (!File.Exists(__targetImgFile))
156 | {
157 | for (int i = 0; i < execReports.Length; i++)
158 | {
159 | wTModule.ProgramResult oReport = (wTModule.ProgramResult)execReports[i];
160 | //写入日志框
161 | int logsBoxCount = logsBox.Text.Length;
162 | logsBox.AppendText("[" + (i + 1).ToString() + "/" + execReports.Length + "] Error: " + oReport.execName + " " + oReport.execArgs + "\r\n");
163 | logsBox.AppendText("Error With Exit Code: " + oReport.exitCode.ToString() + "\r\n" + oReport.execLogs);
164 | };
165 | logsBox.AppendText("Failed! File Not Found: \r\n" + __targetImgFile);
166 | Cursor = Cursors.Default;
167 | logsBox.ForeColor = Color.Red; //标红
168 | btn_gen.Enabled = true;//恢复按钮
169 | return; //停止运行
170 | }
171 | logsBox.Select(logsBox.Text.Length, 0);
172 | logsBox.ScrollToCaret();
173 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
174 | //完成运行队列
175 | int shapePosition = 0;
176 | InlineShape inDocPic;
177 | if (ThisDoc.Application.Selection.Type != WdSelectionType.wdSelectionIP)
178 | {
179 | shapePosition = ThisDoc.Application.Selection.Font.Position;
180 | ThisDoc.Application.Selection.Delete(); //删除选中 的数据
181 | }
182 | if (Ribbon.get_param_value(Ribbon.settingsBox.program_exec_params, "grapher") == (string)"dvipng")
183 | {
184 | //dvipng 产出PNG为72dpi,将生成的png图片转换分辨率
185 | string pngvRes = Ribbon.get_param_value(Ribbon.settingsBox.program_exec_params, "pngvRes");
186 | int pngdpi = int.Parse(pngvRes);
187 | Bitmap bMp = (Bitmap)Image.FromFile(__targetImgFile);
188 | bMp.SetResolution(pngdpi, pngdpi);
189 | string R_imgFile = workPath + "\\param" + "_" + pngvRes + ".png";
190 | bMp.Save(R_imgFile, ImageFormat.Png);
191 | bMp.Dispose();
192 | inDocPic = ThisDoc.InlineShapes.AddPicture(R_imgFile);
193 | }
194 | else
195 | {
196 | inDocPic = ThisDoc.InlineShapes.AddPicture(__targetImgFile);//svg直接插入
197 | }
198 | inDocPic.AlternativeText = __texContent; //写入Tex数据
199 | inDocPic.Select(); //选择新插入的图片
200 | ThisDoc.Application.Selection.Font.Position = shapePosition; //基线还原
201 | if (cb_AutoClose.Checked) //检测自动关闭
202 | this.Close();
203 | Cursor = Cursors.Default;
204 | btn_gen.Enabled = true; //复原按钮
205 | return;
206 | }
207 |
208 | private void CpQueue_ProgramsRunLogStepRs(object logs, EventArgs e)
209 | {
210 | if ((logs == null) || !cb_AutoClose.Checked) return;
211 | string oLogs = "";
212 | try
213 | {
214 | oLogs = (string)logs;
215 | }
216 | catch (System.NullReferenceException)
217 | {
218 | return;
219 | }
220 | if (oLogs.Length > 0)
221 | {
222 | Control.CheckForIllegalCrossThreadCalls = false; //跨线程操作
223 | logsBox.AppendText("\r\n");
224 | logsBox.AppendText((string)logs);
225 | }
226 | }
227 |
228 | private void LaTexEdt_Load(object sender, EventArgs e)
229 | {
230 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
231 | this.FormClosed += ((sndr, ev) => Globals.ThisAddIn.Application.Activate());
232 | if (false == System.IO.Directory.Exists(workPath))
233 | System.IO.Directory.CreateDirectory(workPath);
234 | if (Ribbon.settingsBox.workPathAutoClean)
235 | {
236 | try
237 | {
238 | System.Collections.Generic.List FileList = Directory.GetFiles(workPath).ToList();
239 | for (int i = 0; i < FileList.ToList().Count; i++) File.Delete(FileList[i]);
240 | }
241 | catch (IOException)
242 | {
243 | MessageBox.Show("Some files in " + workPath + " were ocuupied, result may unsatisfy.", "Warning!!");
244 | };
245 | }
246 | latex_style_gen(workPath); //生成自动模板
247 | this.Deactivate += LaTexEdt_Deactivate;
248 | this.FormClosing += ((RSender, me) => this.Deactivate -= LaTexEdt_Deactivate);
249 | this.Activated += ((RSender, me) => this.Opacity = 1);
250 | }
251 |
252 | private void LaTexEdt_Deactivate(object sender, EventArgs e) => this.Opacity = 0.5;
253 |
254 | private void latex_style_gen(string destDir)
255 | {
256 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
257 | string TexStyFile = workPath + "\\param.sty"; //自动模板途径
258 | string colorMode = "rgb";
259 | string colorParam = "0,0,0";
260 | switch (ThisDoc.Application.Selection.Font.TextColor.Type)
261 | {
262 | case MsoColorType.msoColorTypeRGB:
263 | System.Drawing.Color unCorcSelectedColor = System.Drawing.Color.FromArgb(ThisDoc.Application.Selection.Font.TextColor.RGB);
264 | System.Drawing.Color selectedColor = System.Drawing.Color.FromArgb(unCorcSelectedColor.B, unCorcSelectedColor.G, unCorcSelectedColor.R);
265 | colorMode = "rgb";
266 | colorParam =
267 | selectedColor.R.ToString() + "," +
268 | selectedColor.G.ToString() + "," +
269 | selectedColor.B.ToString();
270 | break;
271 | case MsoColorType.msoColorTypeScheme:
272 | colorMode = "gray";
273 | colorParam = "0";
274 | if (ThisDoc.Application.Selection.Font.TextColor.Brightness >= 0 && ThisDoc.Application.Selection.Font.TextColor.Brightness <= 1)
275 | colorParam = ThisDoc.Application.Selection.Font.TextColor.Brightness.ToString();
276 | break;
277 | case MsoColorType.msoColorTypeCMYK:
278 | colorMode = "cmyk";
279 | colorParam =
280 | ThisDoc.Application.Selection.Font.TextColor.Cyan.ToString() + "," +
281 | ThisDoc.Application.Selection.Font.TextColor.Yellow.ToString() + "," +
282 | ThisDoc.Application.Selection.Font.TextColor.Magenta.ToString() + "," +
283 | ThisDoc.Application.Selection.Font.TextColor.Black.ToString();
284 | break;
285 |
286 | default:
287 | break;
288 | }
289 |
290 | if (ThisDoc == null || ThisDoc.ReadOnly)
291 | return;
292 | using (FileStream fs = new FileStream(TexStyFile, FileMode.Create))
293 | {
294 | string fullStyle = Resources.tex_fontsize_style;
295 | string texFontSize = ThisDoc.Application.Selection.Font.Size.ToString(); //当前应用设置的字体大小
296 | fullStyle = fullStyle.Replace("%%WordxTex_Font_Symbol", texFontSize); //将模板内的通配符替换为字体大小
297 | fullStyle = fullStyle.Replace("%%WordxTex_Equation_Font_Symbal", Ribbon.settingsBox.fontFx); //替换为所选字体样式
298 | fullStyle = fullStyle.Replace("%%cMode", colorMode);
299 | fullStyle = fullStyle.Replace("%%cParam", colorParam);
300 | byte[] TexContent = System.Text.Encoding.Default.GetBytes(fullStyle);
301 | fs.Write(TexContent, 0, TexContent.Length); //写入style文件
302 | fs.Flush();
303 | fs.Close();
304 | };
305 | }
306 | //批量模式按钮 VVV
307 | private void btn_nxtTeX_Click(object sender, EventArgs e)
308 | {
309 | Microsoft.Office.Interop.Word.Document ThisDoc = Globals.ThisAddIn.Application.ActiveDocument;
310 | Microsoft.Office.Interop.Word.Range TexItem = null;
311 | ThisDoc.Application.Selection.SetRange(ThisDoc.Application.Selection.Start, ThisDoc.Application.Selection.End + 1);
312 | TexItem = ThisDoc.Application.Selection.GoToNext(WdGoToItem.wdGoToGraphic);
313 | TexItem.SetRange(TexItem.Start, TexItem.End + 1);
314 | TexItem.Select();
315 | InlineShapes SelectedObj = ThisDoc.Application.Selection.InlineShapes;
316 | InlineShape SelectedObjFirst = SelectedObj[1];
317 | if (ThisDoc == null || ThisDoc.ReadOnly)
318 | return;
319 | if (SelectedObj.Count == 0)
320 | return;
321 | if (!SelectedObjFirst.AlternativeText.Contains("WordxTex_TexContent"))
322 | return;
323 | texCodeBox.Clear();
324 | texCodeBox.Text = SelectedObjFirst.AlternativeText;
325 | }
326 |
327 | private void btn_prvTex_Click(object sender, EventArgs e)
328 | {
329 |
330 | }
331 |
332 | private void logsBox_TextChanged(object sender, EventArgs e)
333 | {
334 | logsBox.Select(logsBox.Text.Length, 0);
335 | }
336 |
337 |
338 | }
339 | }
340 |
--------------------------------------------------------------------------------
/Sources/SettingsForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WordxTex
2 | {
3 | partial class SettingsForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | ComboTreeNode comboTreeNode1 = new ComboTreeNode();
32 | ComboTreeNode comboTreeNode2 = new ComboTreeNode();
33 | ComboTreeNode comboTreeNode3 = new ComboTreeNode();
34 | ComboTreeNode comboTreeNode4 = new ComboTreeNode();
35 | ComboTreeNode comboTreeNode5 = new ComboTreeNode();
36 | ComboTreeNode comboTreeNode6 = new ComboTreeNode();
37 | ComboTreeNode comboTreeNode7 = new ComboTreeNode();
38 | ComboTreeNode comboTreeNode8 = new ComboTreeNode();
39 | ComboTreeNode comboTreeNode9 = new ComboTreeNode();
40 | ComboTreeNode comboTreeNode10 = new ComboTreeNode();
41 | ComboTreeNode comboTreeNode11 = new ComboTreeNode();
42 | ComboTreeNode comboTreeNode12 = new ComboTreeNode();
43 | ComboTreeNode comboTreeNode13 = new ComboTreeNode();
44 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
45 | ComboTreeNode comboTreeNode14 = new ComboTreeNode();
46 | ComboTreeNode comboTreeNode15 = new ComboTreeNode();
47 | ComboTreeNode comboTreeNode16 = new ComboTreeNode();
48 | ComboTreeNode comboTreeNode17 = new ComboTreeNode();
49 | ComboTreeNode comboTreeNode18 = new ComboTreeNode();
50 | ComboTreeNode comboTreeNode19 = new ComboTreeNode();
51 | ComboTreeNode comboTreeNode20 = new ComboTreeNode();
52 | ComboTreeNode comboTreeNode21 = new ComboTreeNode();
53 | ComboTreeNode comboTreeNode22 = new ComboTreeNode();
54 | this.ctb_compiler = new ComboTreeBox();
55 | this.ctb_graphbox = new ComboTreeBox();
56 | this.label1 = new System.Windows.Forms.Label();
57 | this.label2 = new System.Windows.Forms.Label();
58 | this.btn_hide = new System.Windows.Forms.Button();
59 | this.chb_show_fl = new System.Windows.Forms.CheckBox();
60 | this.cb_fonts = new ComboTreeBox();
61 | this.label3 = new System.Windows.Forms.Label();
62 | this.sb_execPerPrgTime = new System.Windows.Forms.NumericUpDown();
63 | this.execTime = new System.Windows.Forms.Label();
64 | this.tb_wkdir = new System.Windows.Forms.TextBox();
65 | this.btn_clean_cache = new System.Windows.Forms.Button();
66 | this.btn_wkDir_select = new System.Windows.Forms.Button();
67 | this.ckb_autoclean = new System.Windows.Forms.CheckBox();
68 | this.label4 = new System.Windows.Forms.Label();
69 | this.DirSelectDialog = new System.Windows.Forms.FolderBrowserDialog();
70 | ((System.ComponentModel.ISupportInitialize)(this.sb_execPerPrgTime)).BeginInit();
71 | this.SuspendLayout();
72 | //
73 | // ctb_compiler
74 | //
75 | this.ctb_compiler.DroppedDown = false;
76 | this.ctb_compiler.Location = new System.Drawing.Point(63, 12);
77 | this.ctb_compiler.Name = "ctb_compiler";
78 | comboTreeNode1.Expanded = true;
79 | comboTreeNode1.ForeColor = System.Drawing.Color.Empty;
80 | comboTreeNode1.Name = "xeLaTeX";
81 | comboTreeNode2.Expanded = true;
82 | comboTreeNode2.ForeColor = System.Drawing.Color.Empty;
83 | comboTreeNode2.Name = "->.xdv";
84 | comboTreeNode2.Tag = "complier=xelatex;cp_arg=-interaction%%Equalnonstopmode%%BlankSpace-no-pdf%%BlankS" +
85 | "pace-output-directory%%Equal%%OutDir%%BlankSpace%%InTexFile;ctarget=.xdv;ctip=.t" +
86 | "ex->.xdv";
87 | comboTreeNode2.Text = ".tex-xeLaTeX->.xdv";
88 | comboTreeNode2.ToolTip = null;
89 | comboTreeNode3.Expanded = true;
90 | comboTreeNode3.ForeColor = System.Drawing.Color.Empty;
91 | comboTreeNode3.Name = "->.pdf";
92 | comboTreeNode3.Tag = "complier=xelatex;cp_arg=-interaction%%Equalnonstopmode%%BlankSpace%%BlankSpace-ou" +
93 | "tput-directory%%Equal%%OutDir%%BlankSpace%%InTexFile;ctarget=.pdf;ctip=.tex->.pd" +
94 | "f";
95 | comboTreeNode3.Text = ".tex-xeLaTeX->.pdf";
96 | comboTreeNode3.ToolTip = null;
97 | comboTreeNode1.Nodes.Add(comboTreeNode2);
98 | comboTreeNode1.Nodes.Add(comboTreeNode3);
99 | comboTreeNode1.Selectable = false;
100 | comboTreeNode1.Tag = null;
101 | comboTreeNode1.Text = "xeLaTeX";
102 | comboTreeNode1.ToolTip = null;
103 | comboTreeNode4.Expanded = true;
104 | comboTreeNode4.ForeColor = System.Drawing.Color.Empty;
105 | comboTreeNode4.Name = "LaTeX";
106 | comboTreeNode5.Expanded = true;
107 | comboTreeNode5.ForeColor = System.Drawing.Color.Empty;
108 | comboTreeNode5.Name = "->.dvi";
109 | comboTreeNode5.Tag = "complier=latex;cp_arg=-interaction%%Equalnonstopmode%%BlankSpace-output-format%%E" +
110 | "qualdvi%%BlankSpace-output-directory%%Equal%%OutDir%%BlankSpace%%InTexFile;ctarg" +
111 | "et=.dvi;ctip=.tex->.dvi";
112 | comboTreeNode5.Text = ".tex-LaTeX->.dvi";
113 | comboTreeNode5.ToolTip = null;
114 | comboTreeNode4.Nodes.Add(comboTreeNode5);
115 | comboTreeNode4.Selectable = false;
116 | comboTreeNode4.Tag = null;
117 | comboTreeNode4.Text = "LaTeX";
118 | comboTreeNode4.ToolTip = null;
119 | comboTreeNode6.Expanded = true;
120 | comboTreeNode6.ForeColor = System.Drawing.Color.Empty;
121 | comboTreeNode6.Name = "LuaLaTeX";
122 | comboTreeNode7.Expanded = false;
123 | comboTreeNode7.ForeColor = System.Drawing.Color.Empty;
124 | comboTreeNode7.Name = "->.dvi";
125 | comboTreeNode7.Tag = "complier=lualatex;cp_arg=-interaction%%Equalnonstopmode%%BlankSpace--output-forma" +
126 | "t%%Equaldvi%%BlankSpace-output-directory%%Equal%%OutDir%%BlankSpace%%InTexFile;c" +
127 | "target=.dvi;ctip=.tex->.dvi";
128 | comboTreeNode7.Text = ".tex-LuaLaTeX->.dvi";
129 | comboTreeNode7.ToolTip = null;
130 | comboTreeNode8.Expanded = true;
131 | comboTreeNode8.ForeColor = System.Drawing.Color.Empty;
132 | comboTreeNode8.Name = "->.pdf";
133 | comboTreeNode8.Tag = "complier=lualatex;cp_arg=-interaction%%Equalnonstopmode%%BlankSpace-output-direct" +
134 | "ory%%Equal%%OutDir%%BlankSpace%%InTexFile;ctarget=.pdf;ctip=.tex->.pdf";
135 | comboTreeNode8.Text = ".tex-LuaLaTeX->.pdf";
136 | comboTreeNode8.ToolTip = null;
137 | comboTreeNode6.Nodes.Add(comboTreeNode7);
138 | comboTreeNode6.Nodes.Add(comboTreeNode8);
139 | comboTreeNode6.Selectable = false;
140 | comboTreeNode6.Tag = null;
141 | comboTreeNode6.Text = "LuaLaTeX";
142 | comboTreeNode6.ToolTip = null;
143 | this.ctb_compiler.Nodes.Add(comboTreeNode1);
144 | this.ctb_compiler.Nodes.Add(comboTreeNode4);
145 | this.ctb_compiler.Nodes.Add(comboTreeNode6);
146 | this.ctb_compiler.Path = "xeLaTeX\\.tex-xeLaTeX->.xdv";
147 | this.ctb_compiler.SelectedNode = comboTreeNode2;
148 | this.ctb_compiler.Size = new System.Drawing.Size(209, 23);
149 | this.ctb_compiler.TabIndex = 0;
150 | this.ctb_compiler.Click += new System.EventHandler(this.ctb_compiler_Click);
151 | //
152 | // ctb_graphbox
153 | //
154 | this.ctb_graphbox.DroppedDown = false;
155 | this.ctb_graphbox.Location = new System.Drawing.Point(63, 41);
156 | this.ctb_graphbox.Name = "ctb_graphbox";
157 | comboTreeNode9.Expanded = true;
158 | comboTreeNode9.ForeColor = System.Drawing.Color.Empty;
159 | comboTreeNode9.Name = "dvisvgm";
160 | comboTreeNode10.Expanded = true;
161 | comboTreeNode10.ForeColor = System.Drawing.Color.Empty;
162 | comboTreeNode10.Name = "[.dvi,.xdv]->.svg";
163 | comboTreeNode10.Tag = "grapher=dvisvgm;gr_arg=--output%%Equal%%OutImgFile%%BlankSpace-n%%BlankSpace%%InD" +
164 | "viFile;gtarget=.svg;gaccept=.dvi,.xdv;gtip=->.svg";
165 | comboTreeNode10.Text = "[.dvi,.xdv]-dvisvgm->.svg";
166 | comboTreeNode10.ToolTip = null;
167 | comboTreeNode11.Expanded = true;
168 | comboTreeNode11.ForeColor = System.Drawing.Color.Empty;
169 | comboTreeNode11.Name = ".pdf->.svg";
170 | comboTreeNode11.Tag = "grapher=dvisvgm;gr_arg=--pdf%%BlankSpace--output%%Equal%%OutImgFile%%BlankSpace-n" +
171 | "%%BlankSpace%%InDviFile;gtarget=.svg;gaccept=.pdf;gtip=->.svg";
172 | comboTreeNode11.Text = ".pdf-dvisvgm->.svg";
173 | comboTreeNode11.ToolTip = null;
174 | comboTreeNode9.Nodes.Add(comboTreeNode10);
175 | comboTreeNode9.Nodes.Add(comboTreeNode11);
176 | comboTreeNode9.Selectable = false;
177 | comboTreeNode9.Tag = null;
178 | comboTreeNode9.Text = "dvisvgm";
179 | comboTreeNode9.ToolTip = null;
180 | comboTreeNode12.Expanded = true;
181 | comboTreeNode12.ForeColor = System.Drawing.Color.Empty;
182 | comboTreeNode12.Name = "dvipng";
183 | comboTreeNode13.Expanded = true;
184 | comboTreeNode13.ForeColor = System.Drawing.Color.Empty;
185 | comboTreeNode13.Name = ".dvi-dvipng->(300dpi).png";
186 | comboTreeNode13.Tag = resources.GetString("comboTreeNode13.Tag");
187 | comboTreeNode13.Text = ".dvi-dvipng->(300dpi).png";
188 | comboTreeNode13.ToolTip = null;
189 | comboTreeNode14.Expanded = true;
190 | comboTreeNode14.ForeColor = System.Drawing.Color.Empty;
191 | comboTreeNode14.Name = ".dvi-dvipng->(600dpi).png";
192 | comboTreeNode14.Tag = resources.GetString("comboTreeNode14.Tag");
193 | comboTreeNode14.Text = ".dvi-dvipng->(600dpi).png";
194 | comboTreeNode14.ToolTip = null;
195 | comboTreeNode15.Expanded = true;
196 | comboTreeNode15.ForeColor = System.Drawing.Color.Empty;
197 | comboTreeNode15.Name = ".dvi-dvipng->(900dpi).png";
198 | comboTreeNode15.Tag = resources.GetString("comboTreeNode15.Tag");
199 | comboTreeNode15.Text = ".dvi-dvipng->(900dpi).png";
200 | comboTreeNode15.ToolTip = null;
201 | comboTreeNode16.Expanded = true;
202 | comboTreeNode16.ForeColor = System.Drawing.Color.Empty;
203 | comboTreeNode16.Name = ".dvi-dvipng->(1200dpi).png";
204 | comboTreeNode16.Tag = resources.GetString("comboTreeNode16.Tag");
205 | comboTreeNode16.Text = ".dvi-dvipng->(1200dpi).png";
206 | comboTreeNode16.ToolTip = null;
207 | comboTreeNode17.Expanded = true;
208 | comboTreeNode17.ForeColor = System.Drawing.Color.Empty;
209 | comboTreeNode17.Name = ".dvi-dvipng->(2400dpi).png";
210 | comboTreeNode17.Tag = resources.GetString("comboTreeNode17.Tag");
211 | comboTreeNode17.Text = ".dvi-dvipng->(2400dpi).png";
212 | comboTreeNode17.ToolTip = null;
213 | comboTreeNode12.Nodes.Add(comboTreeNode13);
214 | comboTreeNode12.Nodes.Add(comboTreeNode14);
215 | comboTreeNode12.Nodes.Add(comboTreeNode15);
216 | comboTreeNode12.Nodes.Add(comboTreeNode16);
217 | comboTreeNode12.Nodes.Add(comboTreeNode17);
218 | comboTreeNode12.Selectable = false;
219 | comboTreeNode12.Tag = null;
220 | comboTreeNode12.Text = "dvipng";
221 | comboTreeNode12.ToolTip = null;
222 | this.ctb_graphbox.Nodes.Add(comboTreeNode9);
223 | this.ctb_graphbox.Nodes.Add(comboTreeNode12);
224 | this.ctb_graphbox.Path = "dvisvgm\\[.dvi,.xdv]-dvisvgm->.svg";
225 | this.ctb_graphbox.SelectedNode = comboTreeNode10;
226 | this.ctb_graphbox.Size = new System.Drawing.Size(209, 23);
227 | this.ctb_graphbox.TabIndex = 1;
228 | //
229 | // label1
230 | //
231 | this.label1.AutoSize = true;
232 | this.label1.Location = new System.Drawing.Point(40, 47);
233 | this.label1.Name = "label1";
234 | this.label1.Size = new System.Drawing.Size(17, 12);
235 | this.label1.TabIndex = 2;
236 | this.label1.Text = "->";
237 | //
238 | // label2
239 | //
240 | this.label2.AutoSize = true;
241 | this.label2.Location = new System.Drawing.Point(1, 17);
242 | this.label2.Name = "label2";
243 | this.label2.Size = new System.Drawing.Size(59, 12);
244 | this.label2.TabIndex = 3;
245 | this.label2.Text = "Compiler:";
246 | //
247 | // btn_hide
248 | //
249 | this.btn_hide.Location = new System.Drawing.Point(197, 210);
250 | this.btn_hide.Name = "btn_hide";
251 | this.btn_hide.Size = new System.Drawing.Size(75, 23);
252 | this.btn_hide.TabIndex = 4;
253 | this.btn_hide.Text = "hide";
254 | this.btn_hide.UseVisualStyleBackColor = true;
255 | this.btn_hide.Click += new System.EventHandler(this.btn_hide_Click);
256 | //
257 | // chb_show_fl
258 | //
259 | this.chb_show_fl.AutoSize = true;
260 | this.chb_show_fl.Location = new System.Drawing.Point(3, 188);
261 | this.chb_show_fl.Name = "chb_show_fl";
262 | this.chb_show_fl.Size = new System.Drawing.Size(138, 16);
263 | this.chb_show_fl.TabIndex = 5;
264 | this.chb_show_fl.Text = "Show function label";
265 | this.chb_show_fl.UseVisualStyleBackColor = true;
266 | this.chb_show_fl.CheckedChanged += new System.EventHandler(this.chb_show_fl_CheckedChanged);
267 | //
268 | // cb_fonts
269 | //
270 | this.cb_fonts.DroppedDown = false;
271 | this.cb_fonts.Location = new System.Drawing.Point(63, 77);
272 | this.cb_fonts.Name = "cb_fonts";
273 | comboTreeNode18.Expanded = true;
274 | comboTreeNode18.ForeColor = System.Drawing.Color.Empty;
275 | comboTreeNode18.Name = "default";
276 | comboTreeNode18.Tag = "%%default";
277 | comboTreeNode18.Text = "default";
278 | comboTreeNode18.ToolTip = null;
279 | comboTreeNode19.Expanded = true;
280 | comboTreeNode19.ForeColor = System.Drawing.Color.Empty;
281 | comboTreeNode19.Name = "txfonts";
282 | comboTreeNode19.Tag = "\\usepackage{txfonts}";
283 | comboTreeNode19.Text = "txfonts";
284 | comboTreeNode19.ToolTip = "\\usepackage{txfonts}";
285 | comboTreeNode20.Expanded = true;
286 | comboTreeNode20.ForeColor = System.Drawing.Color.Empty;
287 | comboTreeNode20.Name = "fourier";
288 | comboTreeNode20.Tag = "\\usepackage{fourier}";
289 | comboTreeNode20.Text = "fourier";
290 | comboTreeNode20.ToolTip = "\\usepackage{fourier}";
291 | comboTreeNode21.Expanded = true;
292 | comboTreeNode21.ForeColor = System.Drawing.Color.Empty;
293 | comboTreeNode21.Name = "mathptmx";
294 | comboTreeNode21.Tag = "\\usepackage{mathptmx,tgtermes}";
295 | comboTreeNode21.Text = "mathptmx";
296 | comboTreeNode21.ToolTip = "\\usepackage{mathptmx,tgtermes}";
297 | comboTreeNode22.Expanded = true;
298 | comboTreeNode22.ForeColor = System.Drawing.Color.Empty;
299 | comboTreeNode22.Name = "charter";
300 | comboTreeNode22.Tag = "\\usepackage[charter]{mathdesign}";
301 | comboTreeNode22.Text = "charter";
302 | comboTreeNode22.ToolTip = "\\usepackage[charter]{mathdesign}";
303 | this.cb_fonts.Nodes.Add(comboTreeNode18);
304 | this.cb_fonts.Nodes.Add(comboTreeNode19);
305 | this.cb_fonts.Nodes.Add(comboTreeNode20);
306 | this.cb_fonts.Nodes.Add(comboTreeNode21);
307 | this.cb_fonts.Nodes.Add(comboTreeNode22);
308 | this.cb_fonts.Path = "default";
309 | this.cb_fonts.SelectedNode = comboTreeNode18;
310 | this.cb_fonts.Size = new System.Drawing.Size(209, 23);
311 | this.cb_fonts.TabIndex = 6;
312 | this.cb_fonts.SelectedNodeChanged += new System.EventHandler(this.cb_fonts_Change);
313 | //
314 | // label3
315 | //
316 | this.label3.AutoSize = true;
317 | this.label3.Location = new System.Drawing.Point(19, 82);
318 | this.label3.Name = "label3";
319 | this.label3.Size = new System.Drawing.Size(41, 12);
320 | this.label3.TabIndex = 7;
321 | this.label3.Text = "Fonts:";
322 | //
323 | // sb_execPerPrgTime
324 | //
325 | this.sb_execPerPrgTime.Location = new System.Drawing.Point(210, 160);
326 | this.sb_execPerPrgTime.Maximum = new decimal(new int[] {
327 | 360,
328 | 0,
329 | 0,
330 | 0});
331 | this.sb_execPerPrgTime.Minimum = new decimal(new int[] {
332 | 30,
333 | 0,
334 | 0,
335 | 0});
336 | this.sb_execPerPrgTime.Name = "sb_execPerPrgTime";
337 | this.sb_execPerPrgTime.Size = new System.Drawing.Size(62, 21);
338 | this.sb_execPerPrgTime.TabIndex = 8;
339 | this.sb_execPerPrgTime.Value = new decimal(new int[] {
340 | 30,
341 | 0,
342 | 0,
343 | 0});
344 | this.sb_execPerPrgTime.ValueChanged += new System.EventHandler(this.sb_execPerPrgTime_ValueChanged);
345 | //
346 | // execTime
347 | //
348 | this.execTime.AutoSize = true;
349 | this.execTime.Location = new System.Drawing.Point(2, 163);
350 | this.execTime.Name = "execTime";
351 | this.execTime.Size = new System.Drawing.Size(197, 12);
352 | this.execTime.TabIndex = 7;
353 | this.execTime.Text = "Max wait time(per program, sec):";
354 | //
355 | // tb_wkdir
356 | //
357 | this.tb_wkdir.Location = new System.Drawing.Point(63, 106);
358 | this.tb_wkdir.Name = "tb_wkdir";
359 | this.tb_wkdir.Size = new System.Drawing.Size(165, 21);
360 | this.tb_wkdir.TabIndex = 9;
361 | this.tb_wkdir.Text = "C:\\Users\\benter\\AppData\\Local\\Temp";
362 | this.tb_wkdir.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
363 | //
364 | // btn_clean_cache
365 | //
366 | this.btn_clean_cache.Location = new System.Drawing.Point(153, 131);
367 | this.btn_clean_cache.Name = "btn_clean_cache";
368 | this.btn_clean_cache.Size = new System.Drawing.Size(119, 23);
369 | this.btn_clean_cache.TabIndex = 10;
370 | this.btn_clean_cache.Text = "Clean Files";
371 | this.btn_clean_cache.UseVisualStyleBackColor = true;
372 | this.btn_clean_cache.Click += new System.EventHandler(this.btn_clean_cache_Click);
373 | //
374 | // btn_wkDir_select
375 | //
376 | this.btn_wkDir_select.Font = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
377 | this.btn_wkDir_select.Location = new System.Drawing.Point(234, 106);
378 | this.btn_wkDir_select.Name = "btn_wkDir_select";
379 | this.btn_wkDir_select.Size = new System.Drawing.Size(38, 23);
380 | this.btn_wkDir_select.TabIndex = 11;
381 | this.btn_wkDir_select.Text = "...";
382 | this.btn_wkDir_select.UseVisualStyleBackColor = true;
383 | this.btn_wkDir_select.Click += new System.EventHandler(this.button2_Click);
384 | //
385 | // ckb_autoclean
386 | //
387 | this.ckb_autoclean.AutoSize = true;
388 | this.ckb_autoclean.Checked = true;
389 | this.ckb_autoclean.CheckState = System.Windows.Forms.CheckState.Checked;
390 | this.ckb_autoclean.Location = new System.Drawing.Point(63, 135);
391 | this.ckb_autoclean.Name = "ckb_autoclean";
392 | this.ckb_autoclean.Size = new System.Drawing.Size(84, 16);
393 | this.ckb_autoclean.TabIndex = 12;
394 | this.ckb_autoclean.Text = "Auto clean";
395 | this.ckb_autoclean.UseVisualStyleBackColor = true;
396 | this.ckb_autoclean.CheckedChanged += new System.EventHandler(this.ckb_autoclean_CheckedChanged);
397 | //
398 | // label4
399 | //
400 | this.label4.AutoSize = true;
401 | this.label4.Location = new System.Drawing.Point(1, 110);
402 | this.label4.Name = "label4";
403 | this.label4.Size = new System.Drawing.Size(59, 12);
404 | this.label4.TabIndex = 13;
405 | this.label4.Text = "Work Dir:";
406 | //
407 | // SettingsForm
408 | //
409 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
410 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
411 | this.ClientSize = new System.Drawing.Size(284, 236);
412 | this.Controls.Add(this.label4);
413 | this.Controls.Add(this.ckb_autoclean);
414 | this.Controls.Add(this.btn_wkDir_select);
415 | this.Controls.Add(this.btn_clean_cache);
416 | this.Controls.Add(this.tb_wkdir);
417 | this.Controls.Add(this.sb_execPerPrgTime);
418 | this.Controls.Add(this.execTime);
419 | this.Controls.Add(this.label3);
420 | this.Controls.Add(this.cb_fonts);
421 | this.Controls.Add(this.chb_show_fl);
422 | this.Controls.Add(this.btn_hide);
423 | this.Controls.Add(this.label2);
424 | this.Controls.Add(this.label1);
425 | this.Controls.Add(this.ctb_graphbox);
426 | this.Controls.Add(this.ctb_compiler);
427 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
428 | this.MaximizeBox = false;
429 | this.MinimizeBox = false;
430 | this.Name = "SettingsForm";
431 | this.ShowIcon = false;
432 | this.ShowInTaskbar = false;
433 | this.Text = "WordxTex - Settings";
434 | this.TopMost = true;
435 | this.Load += new System.EventHandler(this.SettingsBox_Load);
436 | ((System.ComponentModel.ISupportInitialize)(this.sb_execPerPrgTime)).EndInit();
437 | this.ResumeLayout(false);
438 | this.PerformLayout();
439 |
440 | }
441 | #endregion
442 |
443 | private ComboTreeBox ctb_compiler;
444 | private ComboTreeBox ctb_graphbox;
445 | private System.Windows.Forms.Label label1;
446 | private System.Windows.Forms.Label label2;
447 | private System.Windows.Forms.Button btn_hide;
448 | private System.Windows.Forms.CheckBox chb_show_fl;
449 | private ComboTreeBox cb_fonts;
450 | private System.Windows.Forms.Label label3;
451 | private System.Windows.Forms.NumericUpDown sb_execPerPrgTime;
452 | private System.Windows.Forms.Label execTime;
453 | private System.Windows.Forms.TextBox tb_wkdir;
454 | private System.Windows.Forms.Button btn_clean_cache;
455 | private System.Windows.Forms.Button btn_wkDir_select;
456 | private System.Windows.Forms.CheckBox ckb_autoclean;
457 | private System.Windows.Forms.Label label4;
458 | private System.Windows.Forms.FolderBrowserDialog DirSelectDialog;
459 | }
460 | }
--------------------------------------------------------------------------------