public UmlNote AddNote(NoteLocation location, string noteText, IUmlFill background = null) { noteText = noteText?.Trim(); if (string.IsNullOrEmpty(noteText)) { return(null); } var note = GetOrCreateNote(location); if (background != null) { note.Background = background; } note.Text += "\n" + noteText; return(note); }
public static bool IsEmpty(this IUmlFill fill) { return(string.IsNullOrEmpty(fill?.GetCode())); }
public static string GetCodeWithSpace(this IUmlFill fill, bool convertToRgb = false) { var code = fill?.GetCode(convertToRgb); return(string.IsNullOrEmpty(code) ? string.Empty : " " + code); }