コード例 #1
0
        /// <summary>
        /// This is the main method. It shows the dialog and runs the compiler
        /// </summary>
        /// <param name="TexCode"></param>
        /// <param name="OutputFile"></param>
        public static void Export(string TexCode, string OutputFile)
        {
            ExportCompileDialog ecd = new ExportCompileDialog();

            ecd.TheVM.DoCompile(TexCode, OutputFile);

            ecd.Show();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: wilsoc5/tikzedt
        private void Form1_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }

            AddStatusLine("Welcome to TikzEdt!");
            AddStatusLine("This software is under development. All help/feedback/feature requests/error reports are welcome.");
            AddStatusLine("Application data is stored in " + Helper.GetAppdataPath() + ".");
            AddStatusLine("Working directory is now: " + Helper.GetCurrentWorkingDir());

            GlobalUI.UI.OnGlobalStatus                 += new EventHandler <GlobalStatusEventData>(UI_OnGlobalStatus);
            GlobalUI.UI.OnExportCompile                += (s, ee) => ExportCompileDialog.Export(ee.Code, ee.File);
            TheCompiler.Instance.OnTexOutput           += new EventHandler <TexCompiler.CompileEventArgs>(Instance_OnTexOutput);
            TheCompiler.Instance.OnCompileEvent        += new EventHandler <TexCompiler.CompileEventArgs>(Instance_OnCompileEvent);
            TikzToBMPFactory.Instance.JobNumberChanged += new EventHandler(Instance_JobNumberChanged);

            //txtCode.SetHighlighting("C#");
            //ICSharpCode.TextEditor.Document.IDocument doc;
            //doc.
            //ICSharpCode.TextEditor.Document.DocumentFactory df = new ICSharpCode.TextEditor.Document.DocumentFactory();
            //ICSharpCode.TextEditor.Document.IDocument doc =  df.CreateDocument();
            //doc.HighlightingStrategy = ICSharpCode.TextEditor.Document.HighlightingStrategyFactory.CreateHighlightingStrategy();

            //txtCode.Document = doc;

            //doc.Insert(0, "gjhghjgjhG");
            //doc.TextContentChanged += new EventHandler(doc_TextContentChanged);
            //doc.DocumentChanged += new ICSharpCode.TextEditor.Document.DocumentEventHandler(doc_DocumentChanged);

            //txtCode.Refresh();
            //txtCode.LoadFile(

            if (!String.IsNullOrWhiteSpace(AppMethods.StartupFile))
            {
                TheVM.LoadFile(AppMethods.StartupFile);
            }
        }