private void AddError(string message, FormVM form) { WriteError newErrorInfo = new WriteError(message, studyUnit, form); if (!ContainsError(newErrorInfo)) { AddError(newErrorInfo); } }
public WriteError(string message, EDOUnitVM edoUnit, FormVM form) { Message = message; EDOUnit = edoUnit; Form = form; }
public MenuItemVM(MenuElem elem, FormVM content) { this.elem = elem; this.content = content; this.MenuItems = new ObservableCollection<MenuItemVM>(); }
public MenuItemVM FindMenuItem(FormVM form) { foreach (MenuItemVM menuItem in MenuItems) { if (menuItem.Content == form) { return menuItem; } foreach (MenuItemVM childMenuItem in menuItem.MenuItems) { if (childMenuItem.Content == form) { return childMenuItem; } } } return null; }
public bool Contains(FormVM form) { return FindMenuItem(form) != null; }