Overview

Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.Dialogs
Inheritance: System.Windows.Forms.Form | Visibility: internal sealed

WorkspaceManagerDialog(BeepDocumentHost host) builds a dialog with a ListView showing all saved workspaces (Name, Description, Saved timestamp), plus four action buttons: Save Current As, Rename, Delete, and Close. The Layout is managed via a TableLayoutPanel. The companion WorkspaceNameDialog is a lightweight single-field input dialog for rename and new-workspace prompts.

Operations

OperationMethodDescription
Populate ListPopulateList()Clears and re-fills ListView from host.GetAllWorkspaces(), showing Name, Description, and Saved timestamp columns
Save Current AsOnSaveCurrent()Captures current layout as a new named workspace via host.SaveWorkspace(). Opens WorkspaceNameDialog for name input.
RenameOnRename()Uses WorkspaceNameDialog to rename the selected workspace via host.RenameWorkspace(). Only enabled when a ListView item is selected.
DeleteOnDelete()Prompts for confirmation, then calls host.DeleteWorkspace() on the selected workspace. Only enabled when selected.

WorkspaceNameDialog

Internal sealed Form subclass in the same file. Minimal single-field input dialog:

  • Property: EnteredName (string) -- the text the user confirmed
  • Constructor: WorkspaceNameDialog(string initial, string title, string prompt)
  • Keyboard support: Enter = OK, Escape = Cancel
  • Used by both Save Current As and Rename operations

Examples

// Open the workspace manager:
var dialog = new WorkspaceManagerDialog(host);
dialog.ShowDialog();

// Operations available at design time:
// - Save Current As "Debug Layout"
// - Rename "Debug Layout" to "Release Layout"
// - Delete old workspace
// (Load/Switch is a runtime operation handled by host.SwitchWorkspace)