/// <summary> /// Загрузка списка форм /// </summary> /// <param name="viewMode">Режим просмотра</param> internal void LoadList(ViewMode viewMode) { switch (viewMode) { case ViewMode.BookCommon: if (currentListMode != ViewMode.BookCommon) { currentListMode = ViewMode.BookCommon; lbPages.Items.Clear(); lbPages.Items.AddRange(ViewModeStruct.GetListBook()); } currentMode = ViewMode.BookCommon; lbPages.SelectedIndex = 0; break; case ViewMode.ReceptCommon: if (currentListMode != ViewMode.ReceptCommon) { currentListMode = ViewMode.ReceptCommon; lbPages.Items.Clear(); lbPages.Items.AddRange(ViewModeStruct.GetListRecept()); } currentMode = ViewMode.ReceptCommon; lbPages.SelectedIndex = 0; break; default: throw new NotImplementedException("The method or operation is not implemented."); } //throw new Exception("The method or operation is not implemented."); }
public bool Equals(ViewModeStruct str) { return(this.name.Equals(str.name) && this.mode.Equals(str.mode)); }