private void OnBeforeQueryStatus(object sender, EventArgs e) { ThreadHelper.ThrowIfNotOnUIThread(); var myCommand = sender as OleMenuCommand; if (myCommand == null) { return; } if (TidyControl.RunningTidy == null) { myCommand.Text = Resources.RunTidy; } else { myCommand.Text = Resources.TidyInProgress; } var project = m_cppSupport.GetProjectFromSelected(); if (project != null && project.Object is VCProject) { myCommand.Visible = true; } else { myCommand.Visible = false; } }
private void OnBeforeQueryStatus(object sender, EventArgs e) { ThreadHelper.ThrowIfNotOnUIThread(); var myCommand = sender as OleMenuCommand; if (myCommand == null) { return; } var project = m_cppSupport.GetProjectFromSelected(); if (project != null && project.Object is VCProject) { myCommand.Visible = true; } else { myCommand.Visible = false; } }