Exemplo n.º 1
0
        public string GetString(string msg, string defStr)
        {
            string s = null;

            ThreadUtil.RunOnMainThread(() => {
                s = ItConsole.getString(msg, defStr);
            }, true);

            return(s);
        }
Exemplo n.º 2
0
        public void BenchDraw()
        {
            ItConsole.println("BenchDraw start");

            Stopwatch sw = new Stopwatch();

            sw.Start();
            int i = 0;

            while (i < 120)
            {
                ThreadUtil.RunOnMainThread(() =>
                {
                    Controller.ReflectToView();
                }, true);
                i++;
            }
            sw.Stop();

            ItConsole.println("BenchDraw end");
            ItConsole.println($"BenchDraw cnt:{i} time:{sw.ElapsedMilliseconds}ms");
        }
Exemplo n.º 3
0
 private void RunOnMainThread(Action action)
 {
     ThreadUtil.RunOnMainThread(action, true);
 }
Exemplo n.º 4
0
 public void RunOnMainThread(Action action)
 {
     ThreadUtil.RunOnMainThread(action, true);
 }