コード例 #1
0
        private void MakeComplicatedWork(Action <byte[]> action, byte[] bytes)
        {
            DoingWork = true;
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            action(bytes);
            stopwatch.Stop();
            NotifyPopup.ShowToast("用时" + (int)stopwatch.Elapsed.TotalSeconds + "." + stopwatch.Elapsed.Milliseconds + "秒");
            DoingWork = false;
        }
コード例 #2
0
        private async Task MakeComplicatedWork(Func <Task> action)
        {
            DoingWork = true;
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            await action();

            stopwatch.Stop();
            NotifyPopup.ShowToast("用时" + (int)stopwatch.Elapsed.TotalSeconds + "." + stopwatch.Elapsed.Milliseconds + "秒");
            DoingWork = false;
        }
コード例 #3
0
        public static void ShowToast(string message)
        {
            NotifyPopup notify = new NotifyPopup(message);

            notify.Show();
        }