void _indicator_Elapsed(object sender, EventArgs e) { _indicator.Stop(); if (_showIndicator) { RootForm.Invoke(new Action(() => { Cursor.Current = Cursors.Default; })); } }
protected override void OnShowLoadIndicator(string title) { RootForm.Invoke(new Action(() => { Cursor.Current = Cursors.WaitCursor; _showIndicator = false; _indicator.Start(); })); }
protected override void ShouldNavigate(Link link, Pane pane, Action handler) { RootForm.Invoke(new Action(() => { if (PaneManager.Instance.ShouldNavigate(link, pane, NavigationType.Forward)) { handler.Invoke(); } })); }
protected override void OnHideLoadIndicator() { _showIndicator = true; if (!_indicator.IsEnabled) { RootForm.Invoke(new Action(() => { Cursor.Current = Cursors.Default; })); } var elapse = DateTime.UtcNow.Ticks - _lastNavTime; Device.Log.Metric(string.Format("Rendering the layer cost {0}ms", new TimeSpan(elapse).TotalMilliseconds)); }