コード例 #1
0
ファイル: Xliff.cs プロジェクト: un-pogaz/ChromatikTool
 static public Xliff LoadXliffXML(string xml)
 {
     try
     {
         return(new Xliff(XmlDocumentCreate.DocumentXML(xml)));
     }
     catch (Exception ex)
     {
         throw new XliffException(ex);
     }
 }
コード例 #2
0
 static public QtTranslation LoadTranslationXML(string xml)
 {
     try
     {
         return(new QtTranslation(XmlDocumentCreate.DocumentXML(xml)));
     }
     catch (Exception ex)
     {
         throw new QtTranslationException(ex);
     }
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: un-pogaz/ChromatikTool
        static void Main()
        {
            /// RotorEnigma Ia = RotorEnigma.I;
            /// Ia.InitialPosition = Ia.OperatingAlphabet[5];
            /// Hexa h = new Hexa(byte.MaxValue);
            ///
            /// Enigma enigma1 = new Enigma(Reflector.B, Ia, RotorEnigma.II, RotorEnigma.VIII);
            /// enigma1.ToString();
            /// string test = enigma1.Process("HELLO WORLD !");
            /// enigma1.Reset();
            /// string rslt0 = enigma1.Process(test);
            ///
            /// Enigma enigma3 = enigma1.Clone(true);
            /// string rslt3 = enigma3.Process(test);



            string[] tbl = new string[] {
                HashKey.DigestFile(HashAlgorithmEnum.MD5, "XLIFF_2.xlf"),
                HashKey.DigestFile(HashAlgorithmEnum.SHA1, "XLIFF_2.xlf"),
                HashKey.DigestFile(HashAlgorithmEnum.SHA256, "XLIFF_2.xlf"),
                HashKey.DigestFile(HashAlgorithmEnum.SHA384, "XLIFF_2.xlf"),
                HashKey.DigestFile(HashAlgorithmEnum.SHA512, "XLIFF_2.xlf"),
                HashKey.DigestFile(HashAlgorithmEnum.KeyedHashAlgorithm, "XLIFF_2.xlf"),
                HashKey.DigestFile(HashAlgorithmEnum.RIPEMD160, "XLIFF_2.xlf"),
            };

            Chromatik.Unicode.Unicode.Load("en");

            tbl.ForEach(Incremente);

            //System.Globalization.Localization.QtTranslation trs = System.Globalization.Localization.QtTranslation.LoadTranslation(@"for_translation_sigil_sigil_fr.ts.xml");
            //trs.Save("test.ts.xml");


            ;
            Xliff xliff = Xliff.LoadXliff("XLIFF_2.xlf");

            string    fI = xliff.IDs[1];
            XliffFile fS = xliff.Identifieds[1];


            xliff[0].ID = "f3";
            xliff[0].ID = "f2";

            XmlDocument xml = XmlDocumentCreate.DocumentXML("<xml><span>kkkkkkk</span> <span de=\"\">yyyy</span><i> 65246541 </i><span>sdfwsfd</span></xml>");

            XmlDocumentWriter.Document("test.0.xml", xml, DocumentType.HTML5);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }