| 316 | } |
| 317 | |
| 318 | virtual const EXPCMDSTATE State( IShellItemArray* selection) |
| 319 | { |
| 320 | Print(selection); |
| 321 | |
| 322 | switch (m_op) |
| 323 | { |
| 324 | case CopyOperation::Copy: |
| 325 | case CopyOperation::Move: |
| 326 | return ShellItemArray{ selection }.size() != 0 ? ECS_ENABLED : ECS_DISABLED; |
| 327 | case CopyOperation::Paste: |
| 328 | return (Recorder::HasRecord() && (!selection || ShellItemArray{ selection }.size() == 0)) ? ECS_ENABLED : ECS_DISABLED; |
| 329 | case CopyOperation::Delete: |
| 330 | return ECS_DISABLED; |
| 331 | default: |
| 332 | return ECS_ENABLED; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | // IExplorerCommand |
| 337 | HRESULT GetTitle( IShellItemArray* items, PWSTR* name) |