private void ShowCardViewToolWindow(Card mingleCard)
{
try
{
var window =
(CardViewWindowPane) Package.FindToolWindow(typeof (CardViewWindowPane), 0, true);
if ((null == window) || (null == window.Frame))
throw new NotSupportedException(VisualStudio.Resources.CanNotCreateWindow);
window.Bind(mingleCard, RefreshMurmurs);
var windowFrame = (IVsWindowFrame) window.Frame;
ErrorHandler.ThrowOnFailure(windowFrame.Show());
}
catch (Exception ex)
{
TraceLog.Exception(new StackFrame().GetMethod().Name, ex);
MessageBox.Show(ex.Message.Contains("404")
? string.Format(CultureInfo.CurrentCulture, "{0} {1}",
VisualStudio.Resources.CardNotFound, mingleCard.Number)
: ex.Message);
}
}