MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / State

Method State

FastCopyShellExtension/dllmain.cpp:318–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 1

initMethod · 0.80

Calls 2

PrintFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected