private void WindowVisibleChange(object sender, EventArgs e)
{
if (m_digitCommand == null)
m_digitCommand = CurrentDigitTool.CurrentTool.currentDigit;
if (m_digitCommand == null)
return;
if ((this.Visible) && !CurrentDigitTool.CurrentTool.currentDockableWindow.IsVisible())
{
if (!(m_digitCommand.FromDeactivate()))
{
m_digitCommand.DeactivatedFromDock(true);
ESRI.ArcGIS.Framework.IApplication app = (ESRI.ArcGIS.Framework.IApplication)this.Hook;
app.CurrentTool = null;
}
}
m_digitCommand.EndFeedBack();
m_digitCommand.FromDeactivate(false);
}