protected override void ShowRecord() { //todo: add the document view name to the task label //todo: fast machine, this doesn't really seem to do any good. I think maybe the parts that //are taking a longtime are not getting Breath(). //todo: test on a machine that is slow enough to see if this is helpful or not! using (ProgressState progress = FwXWindow.CreatePredictiveProgressState(m_mediator, this.m_vectorName)) { progress.Breath(); Debug.Assert(m_rootSite != null); progress.Breath(); base.ShowRecord(); Clerk.SaveOnChangeRecord(); progress.Breath(); if (Clerk.CurrentObject == null) { m_rootSite.Hide(); return; } try { progress.SetMilestone(); m_rootSite.Show(); using (new WaitCursor(this)) { IChangeRootObject root = m_rootSite as IChangeRootObject; if (root != null && !Clerk.SuspendLoadingRecordUntilOnJumpToRecord) { root.SetRoot(Clerk.CurrentObject.Hvo); } } } catch (Exception error) { if (m_mediator.PropertyTable.GetBoolProperty("DoingAutomatedTest", false)) { throw; } else //don't really need to make the program stop just because we could not show this record. { IApp app = (IApp)m_mediator.PropertyTable.GetValue("App"); ErrorReporter.ReportException(error, app.SettingsKey, m_mediator.FeedbackInfoProvider.SupportEmailAddress, null, false); } } } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Base method saves any time you switch between records. /// </summary> /// ------------------------------------------------------------------------------------ protected virtual void PrepCacheForNewRecord() { Clerk.SaveOnChangeRecord(); }