Beispiel #1
0
        //Get "Console" size properly and Scroll "Console" to the end
        void GetConsoleSize(object sender, EventArgs args)
        {
            ConsoleWidth  = Console.Width;
            ConsoleHeight = Console.Height;
            ScrollHeight  = ConsoleBack.Height;

            // Scroll "Console" to the End
            // Make ScrollToAsync into Timer due to timing probelm(?)
            Device.StartTimer(TimeSpan.FromMilliseconds(1), () =>
            {
                ConsoleBack.ScrollToAsync(0, ConsoleHeight - ScrollHeight, false);
                return(false);   // Timer Cycle is only one time
            });
        }
        double ScrollHeight; //ScrollWidth



        //Get "Console" size properly and Scroll "Console" to the end
        void GetConsoleSize(object sender, EventArgs args)
        {
            ConsoleWidth  = Console.Width;
            ConsoleHeight = Console.Height;
            ScrollHeight  = ConsoleBack.Height;
            //Label1.Text = string.Format("W:{0},  ScH:{1},  CnH:{2}, CoH: {3},  SizeChange:{4}",
            //                            ConsoleWidth, ScrollHeight, ConsoleHeight,
            //                            ConsoleBack.Content.Height, ConsoleSizeChanged++);

            // Scroll "Console" to the Botom End
#if SystemIO
            ConsoleBack.ScrollToAsync(0, Console.Height - ConsoleBack.Height, false);
#endif
#if PCLStorage
            // Make ScrollToAsync into Timer due to timing probelm(?)
            Device.StartTimer(TimeSpan.FromMilliseconds(1), () =>
            {
                ConsoleBack.ScrollToAsync(0, Console.Height - ConsoleBack.Height, false);
                return(false);   // Timer Cycle is only one time
            });
#endif
        }