Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 /// <summary>
 /// Adds the specified value.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public int Add(XAxisText value)
 {
     return(List.Add(value));
 }
Esempio n. 4
0
 /// <summary>
 /// Removes the specified value.
 /// </summary>
 /// <param name="value">The value.</param>
 public void Remove(XAxisText value)
 {
     List.Remove(value);
 }
Esempio n. 5
0
 /// <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);
 }
Esempio n. 6
0
 /// <summary>
 /// Indexes the of.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public int IndexOf(XAxisText value)
 {
     return(List.IndexOf(value));
 }