private void CommanderPanel_CopyTrigger(object obj, bool moveInsteadOfCopying = false) { CommanderPanel sourcePanel = obj as CommanderPanel; if (sourcePanel == null) { return; } CommanderPanel destinationPanel = null; if (commanderPanelLeft == sourcePanel) { destinationPanel = commanderPanelRight; } else { destinationPanel = commanderPanelLeft; } if (sourcePanel.CurrentPath == "" || destinationPanel.CurrentPath == "") { ShowError("Aby wykonać operację, ścieżki w obu panelach muszą być poprawne."); return; } CopySomething(sourcePanel.CurrentPath, sourcePanel.CurrentSelectedItem, destinationPanel.CurrentPath, moveInsteadOfCopying); //RefreshBothPanels(); }
private string CommanderPanel_ItemSelectedEvent(object arg1, EventArgs arg2) { CommanderPanel currentPanel = arg1 as CommanderPanel; if (currentPanel == null) { ShowError("No panel provided to CommanderPanelLeft_ItemSelectedEvent"); } return(ItemSelectedEvent(currentPanel.CurrentPath, currentPanel.CurrentSelectedItem)); }
private void CommanderPanel_DeleteTrigger(object obj) { CommanderPanel sourcePanel = obj as CommanderPanel; if (sourcePanel == null) { return; } DeleteSomething(sourcePanel.CurrentPath, sourcePanel.CurrentSelectedItem); // RefreshBothPanels(); }
private void CommanderPanel_NewFolderTrigger(object obj, string folderName) { CommanderPanel sourcePanel = obj as CommanderPanel; if (sourcePanel == null) { return; } if (sourcePanel.CurrentPath == "") { ShowError("Nie ustawiono żadnej ścieżki!"); return; } CreateNewFolder(Path.Combine(sourcePanel.CurrentPath, folderName)); RefreshBothPanels(); }