QueryAnalyzer/Commands/ShortIDCmd.cs
/// <summary>Defines the method that determines whether the command can execute in its current state.</summary>
/// <param name="parameter">Data used by the command.  If the command does not require data to be passed, this object can be set to null.</param>
/// <returns>true if this command can be executed; otherwise, false.</returns>
Defines the method that determines whether the command can execute in its current state.
Defines the method that determines whether the command can execute in its current state .
public override bool CanExecute(object parameter)
        {
            var context = parameter as ContentTreeContext;
            if (context == null)
            {
                return false;
            }
            return true;
        }
public override bool CanExecute ( object parameter ) { var context = parameter as ContentTreeContext ; if ( context == null ) { return false ; } return true ; }
Defines the method that determines whether the command can execute in its current state.
Defines the method that determines whether the command can execute in its current state .
//if (context.SelectedItems.Count() == 1 && //    !context.SelectedItems.OfType<DatabaseTreeViewItem>().Any() && //    !context.SelectedItems.OfType<SiteTreeViewItem>().Any())
true if this command can be executed; otherwise, false.
true if this command can be executed ; otherwise false .
parameter
object
Data used by the command.  If the command does not require data to be passed, this object can be set to null.
Data used by the command . If the command does not require data to be passed this object can be set to null .