private void Copy(PanelViewModel from, PanelViewModel to) { string fromfull = from.TotalPath + "\\" + from.SelectedItem; if (from.IsFile) { CopyService.CopyFile(fromfull, to.TotalPath); } else if (from.IsDir) { var dialog = MessageBox.Show($"Przekopiować folder wraz z całą jego zawartością?", "Uwaga", MessageBoxButton.YesNoCancel); if (dialog != MessageBoxResult.Cancel) { CopyService.CopyDirectory(fromfull, to.TotalPath, dialog == MessageBoxResult.Yes); } } to.TotalPath = to.TotalPath; //Reload the panel }
public MainViewModel() { panelLvm = new PanelViewModel(); panelRvm = new PanelViewModel(); }