Esempio n. 1
0
        void OutputCaptions(System.IO.DirectoryInfo output, Output_aa[] converters, int size)
        {
            //xslt��ǂݍ���
            var xsltDoc = new XmlDocument();
            var xslt_args = new System.Xml.Xsl.XsltArgumentList();
            xsltDoc.LoadXml(Properties.Resources.Xslt);
            xslt_args.AddParam("Mode", "", "Movie");

            for (int i = 0; i < converters.Length; i++)
                using (var fileStrm = new System.IO.FileStream(output.FullName + "\\" + _jsName + i + ".js", System.IO.FileMode.Create))
                using (var bmp = new System.Drawing.Bitmap(_bmpFiles[i].OpenRead()))
                {
                    xslt_args.AddParam("captionIndex", "", i);
                    converters[i] = new Output_aa(bmp, _chars);
                    converters[i].ReducingImage += delegate(object sender, EventArgs e)
                    {
                        Console.WriteLine(i + "�ԖڊJ�n");
                    };
                    converters[i].CreatingHtml += delegate(object sender, EventArgs e)
                    {
                        Console.WriteLine(i + "�Ԗڊ���");
                    };

                    converters[i].Transform(size, fileStrm, xsltDoc, xslt_args);
                    xslt_args.RemoveParam("captionIndex", "");
                }
        }