private static void SetTitle(PhotinoWindow window, IWorkspace workspace) { var drawingName = workspace.Drawing.Settings.FileName is null ? "(Untitled)" : Path.GetFileName(workspace.Drawing.Settings.FileName); var dirtyMarker = workspace.IsDirty ? " *" : ""; var title = $"{WindowTitle} [{drawingName}]{dirtyMarker}"; window.SetTitle(title); }