Exemplo n.º 1
0
        public static void Test(string fen = null, int fractionWidth = 100, float[] numericAnnotationsLeft = null, float[] numericAnnotationsRight = null)
        {
            PositionDocument p = new PositionDocument();

            if (fen == null)
            {
                fen = "8/R7/7p/6k1/6p1/8/PP1r2PP/6K1 b - - 0 46";
            }
            Position testPos = Position.FromFEN(fen);

            ShowPos(testPos, null, "line1\r\nline2", "line1\r\nline2", fractionWidth, numericAnnotationsLeft, numericAnnotationsRight);
        }
Exemplo n.º 2
0
        public static void ShowPos(Position pos, string header, string textLeft, string textRight,
                                   int fractionWidth = 100,
                                   float[] numericAnnotationsLeft  = null,
                                   float[] numericAnnotationsRight = null)
        {
            PositionDocument p = new PositionDocument();

            p.WritePos(pos, header, textLeft, textRight, fractionWidth, numericAnnotations: numericAnnotationsLeft);
            p.WritePos(pos, header, textLeft, textRight, fractionWidth, numericAnnotations: numericAnnotationsRight);
            System.IO.File.WriteAllLines("temp.html", new string[] { p.FinalText() });
            System.IO.File.WriteAllText(@"c:\temp\t.html", p.FinalText());
            //Console.WriteLine(p.FinalText());

            // TODO: for cross-platform, see: https://brockallen.com/2016/09/24/process-start-for-urls-on-net-core/
            string fileURL = @"c:\temp\t.html";

            LaunchURL(fileURL);

            //Process.Start(fileURL);
        }