private void MapAndAddPhaseLines() { if (dateLineGraph.DatePhaseLines == null || dateLineGraph.DatePhaseLines.Count <= 0) { return; } for (int i = 0; i < dateLineGraph.DatePhaseLines.Count; i++) { DateXAxisText datePhaseLine = dateLineGraph.DatePhaseLines[i]; XAxisText phaseLine = new XAxisText(); // Start value DateTime startDate = datePhaseLine.StartDate; TimeSpan ts = startDate - this.startDate; if (dateMode == DateMode.Day || dateMode == DateMode.HalfDay) { phaseLine.XValueStart = ts.Hours; } else { phaseLine.XValueStart = ts.Days; } // End value DateTime endDate = datePhaseLine.EndDate; ts = endDate - this.startDate; if (dateMode == DateMode.Day || dateMode == DateMode.HalfDay) { phaseLine.XValueEnd = ts.Hours; } else { phaseLine.XValueEnd = ts.Days; } //Text phaseLine.Text = datePhaseLine.Text; dateLineGraph.PhaseLines.Add(phaseLine); } }
/// <summary> /// Determines whether [contains] [the specified value]. /// </summary> /// <param name="value">The value.</param> /// <returns> /// <c>true</c> if [contains] [the specified value]; otherwise, <c>false</c>. /// </returns> public bool Contains(XAxisText value) { return(List.Contains(value)); }
/// <summary> /// Adds the specified value. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public int Add(XAxisText value) { return(List.Add(value)); }
/// <summary> /// Removes the specified value. /// </summary> /// <param name="value">The value.</param> public void Remove(XAxisText value) { List.Remove(value); }
/// <summary> /// Inserts the specified index. /// </summary> /// <param name="index">The index.</param> /// <param name="value">The value.</param> public void Insert(int index, XAxisText value) { List.Insert(index, value); }
/// <summary> /// Indexes the of. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public int IndexOf(XAxisText value) { return(List.IndexOf(value)); }