Exemplo n.º 1
0
        static void ctrl_Insert(string RecoResult)
        {
            // Convert To LaTeX expression
            try
            {
                StringReader  sr = new StringReader(RecoResult);
                StringWriter  sw = new StringWriter();
                XPathDocument myXPathDocument = new XPathDocument(sr);
                XslTransform  myXslTransform  = new XslTransform();
                XmlTextWriter writer          = new XmlTextWriter(sw);
                string        mmltexpath      = System.Reflection.Assembly.GetEntryAssembly().Location;
                mmltexpath = mmltexpath.Replace("TeXTablet.exe", "mmltex.xsl");
                myXslTransform.Load(mmltexpath);
                myXslTransform.Transform(myXPathDocument, null, writer);
                writer.Close();
                string latex = sw.ToString();
                Clipboard.SetData(DataFormats.Text, (Object)latex);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: {0}", e.ToString());
            }

            ctrl.Hide();
            Application.Exit();
        }
Exemplo n.º 2
0
 public void Close()
 {
     if (IsAvailable)
     {
         _panel.Hide();
     }
 }