Esempio n. 1
0
    public static void WriteHelpExtension(string Name, Pix PixSource, Pix PixTarget, string[] Line1, Languages Lang = Languages.vbnet)
    {
        if (PixSource != null)
        {
            PixSource.WriteJpeg("..\\..\\ALL_Help\\HelpImages\\" + Name + "_S.jpg", 75, 0);
        }

        if (PixTarget != null)
        {
            PixTarget.WriteJpeg("..\\..\\ALL_Help\\HelpImages\\" + Name + "_T.jpg", 75, 0);
        }

        if (File.Exists("..\\..\\VB_Lib\\IncludeComments.xml") == true)
        {
            System.Xml.XmlDocument XML = new System.Xml.XmlDocument();
            XML.Load("..\\..\\VB_LIB\\IncludeComments.xml");
            System.Xml.XmlNode Node = XML.SelectSingleNode("Comments/" + Name);

            if ((Node == null))
            {
                return;
            }

            var CodeNode = Node.SelectSingleNode("example/code[@language=\"" + Lang.ToString() + "\"]");

            if ((CodeNode == null))
            {
                return;
            }

            CodeNode.InnerXml = Environment.NewLine + string.Join(Environment.NewLine, Line1);
            XML.Save("IncludeComments.xml");
        }
    }