/// <summary> /// Gets the selection of the form controls. /// </summary> /// <param name="boxes">The boxes.</param> /// <param name="cardorder">The cardorder.</param> /// <param name="cardorderdir">The cardorderdir.</param> /// <param name="cardstate">The cardstate.</param> /// <remarks>Documented by Dev02, 2007-11-26</remarks> private void GetGUISelection(out List<int> boxes, out QueryOrder cardorder, out QueryOrderDir cardorderdir, out QueryCardState cardstate) { boxes = new System.Collections.Generic.List<int>(); if (checkBoxAllBoxes.Checked) { for (int index = 0; index <= Dictionary.Boxes.Count; index++) boxes.Add(index); } else { foreach (int index in listViewBoxesSelection.CheckedIndices) boxes.Add(index); } cardorder = QueryOrdersEnum[comboBoxCardOrder.SelectedIndex < 0 ? 0 : comboBoxCardOrder.SelectedIndex]; cardorderdir = cbReverseOrder.Checked ? QueryOrderDir.Descending : QueryOrderDir.Ascending; cardstate = QueryCardState.Active; }
/// <summary> /// Gets the query structs. /// </summary> /// <param name="boxes">The boxes.</param> /// <param name="cardstate">The cardstate.</param> /// <returns></returns> /// <remarks>Documented by Dev02, 2008-01-03</remarks> private List<MLifter.DAL.Interfaces.QueryStruct> GetQueryStructs(List<int> chapters, List<int> boxes, QueryCardState cardstate) { if (chapters.Count < 1 || boxes.Count < 1) return null; //get cards with desired selection and ordering List<QueryStruct> querystructs = new List<QueryStruct>(); foreach (int chapter in chapters) foreach (int box in boxes) querystructs.Add(new QueryStruct(chapter, box, cardstate)); return querystructs; }
/// <summary> /// Gets the query structs. /// </summary> /// <param name="boxes">The boxes.</param> /// <param name="cardstate">The cardstate.</param> /// <returns></returns> /// <remarks>Documented by Dev02, 2008-01-03</remarks> private List <MLifter.DAL.Interfaces.QueryStruct> GetQueryStructs(List <int> chapters, List <int> boxes, QueryCardState cardstate) { if (chapters.Count < 1 || boxes.Count < 1) { return(null); } //get cards with desired selection and ordering List <QueryStruct> querystructs = new List <QueryStruct>(); foreach (int chapter in chapters) { foreach (int box in boxes) { querystructs.Add(new QueryStruct(chapter, box, cardstate)); } } return(querystructs); }
/// <summary> /// Gets the selection of the form controls. /// </summary> /// <param name="boxes">The boxes.</param> /// <param name="cardorder">The cardorder.</param> /// <param name="cardorderdir">The cardorderdir.</param> /// <param name="cardstate">The cardstate.</param> /// <remarks>Documented by Dev02, 2007-11-26</remarks> private void GetGUISelection(out List <int> boxes, out QueryOrder cardorder, out QueryOrderDir cardorderdir, out QueryCardState cardstate) { boxes = new System.Collections.Generic.List <int>(); if (checkBoxAllBoxes.Checked) { for (int index = 0; index <= Dictionary.Boxes.Count; index++) { boxes.Add(index); } } else { foreach (int index in listViewBoxesSelection.CheckedIndices) { boxes.Add(index); } } cardorder = QueryOrdersEnum[comboBoxCardOrder.SelectedIndex < 0 ? 0 : comboBoxCardOrder.SelectedIndex]; cardorderdir = cbReverseOrder.Checked ? QueryOrderDir.Descending : QueryOrderDir.Ascending; cardstate = QueryCardState.Active; }
/// <summary> /// Initializes a new instance of the <see cref="QueryStruct"/> struct. /// </summary> /// <param name="chapterId">The chapter id for which the query should search (values <=0 are ignored).</param> /// <param name="boxId">The box id for which the query should search (values <=0 are ignored).</param> /// <param name="cardState">State of the card for which the query should search.</param> /// <remarks>Documented by Dev03, 2007-09-05</remarks> public QueryStruct(int chapterId, int boxId, QueryCardState cardState) { ChapterId = chapterId; BoxId = boxId; CardState = cardState; }
/// <summary> /// Initializes a new instance of the <see cref="QueryStruct"/> struct. /// </summary> /// <param name="chapterId">The chapter id (values <=0 are ignored).</param> /// <param name="boxId">The box id (values <=0 are ignored).</param> /// <remarks>Documented by Dev03, 2007-09-05</remarks> public QueryStruct(int chapterId, int boxId) { ChapterId = chapterId; BoxId = boxId; CardState = QueryCardState.All; }
/// <summary> /// Initializes a new instance of the <see cref="QueryStruct"/> struct. /// </summary> /// <param name="cardState">State of the card for which the query should search.</param> /// <remarks>Documented by Dev03, 2007-09-05</remarks> public QueryStruct(QueryCardState cardState) { ChapterId = -1; BoxId = -1; CardState = cardState; }