private void AddChildFolder(ProjectFolder f) { f.RemoveCommand.Attach(param => this.OnRemoveFolder(param), param => this.CanDoRemoveFolder(param)); Children.Add(f); }
private bool CanDoRemoveFolder(ProjectFolder f) { return true; }
public void OnAddFile(ProjectFolder vm) { if (vm == null) throw new ArgumentException("Command param is null."); IFileHandle handle = JadeCore.GuiUtils.PromptOpenFile(".cs", "C# Source files (.cs)|*.cs", true); if (handle == null) { return; } vm.AddNewFile(handle); vm.Expanded = true; WorkspaceController.CurrentWorkspaceModified = true; }
private void OnRemoveFolder(ProjectFolder f) { if (JadeControls.GuiUtils.ConfirmYNAction("Do you want remove Project Folder " + f.DisplayName + "?") == false) return; if (Children.Contains(f) && _data.RemoveFolder(f.DisplayName)) { Children.Remove(f); _workspace.Modified = true; OnPropertyChanged("Children"); return; } }
private void AddChildFolder(ProjectFolder f) { Children.Add(f); }