Exemple #1
0
 /// <summary>
 /// Merge the specified object into this object
 /// </summary>
 /// <param name="from">The object to copy values from</param>
 public void Merge(ISimulationGeneratorFactors from)
 {
     foreach (var fromCol in from.Columns)
     {
         Columns.Add(new KeyValuePair <string, string>(fromCol.Key, fromCol.Value));
     }
 }
Exemple #2
0
                public void PaintSimulationZone(ISimulationGeneratorFactors factor, VisualElements visualElement)
                {
                    string factorValue1 = factor.GetFactorValue(FactorName1);
                    string factorValue2 = factor.GetFactorValue(FactorName2);

                    int index1 = values1.IndexOf(factorValue1);

                    if (index1 == -1)
                    {
                        values1.Add(factorValue1);
                        index1 = values1.Count - 1;
                    }

                    int index2 = values2.IndexOf(factorValue2);

                    if (index2 == -1)
                    {
                        values2.Add(factorValue2);
                        index2 = values2.Count - 1;
                    }

                    index1 = index1 % MaximumIndex1;
                    index2 = index2 % MaximumIndex2;
                    Setter1(visualElement, index1);
                    Setter2(visualElement, index2);
                }
Exemple #3
0
        /// <summary>Returns true if this object is equal to rhs</summary>
        /// <param name="compareTo">The object to compare to</param>
        public bool Equals(ISimulationGeneratorFactors compareTo)
        {
            for (int i = 0; i < compareTo.Columns.Count; i++)
            {
                string keyToFind = compareTo.Columns[i].Key;
                if (Columns.Find(col => col.Key == keyToFind).Key != keyToFind)
                {
                    return(false);
                }
            }

            if (Factors.Count() != compareTo.Factors.Count())
            {
                return(false);
            }
            for (int i = 0; i < Factors.Count; i++)
            {
                if (Factors[i].Key != compareTo.Factors[i].Key ||
                    Factors[i].Value != compareTo.Factors[i].Value)
                {
                    return(false);
                }
            }

            return(true);
        }
Exemple #4
0
                public void PaintSimulationZone(ISimulationGeneratorFactors factor, VisualElements visualElement)
                {
                    string factorValue = factor.GetFactorValue(FactorName);
                    int    index       = values.IndexOf(factorValue);

                    if (index == -1)
                    {
                        values.Add(factorValue);
                        index = values.Count - 1;
                    }
                    index = index % MaximumIndex;
                    Setter(visualElement, index);
                }
Exemple #5
0
                public void PaintSimulationZone(ISimulationGeneratorFactors factor, VisualElements visualElement, Series series)
                {
                    string factorValue = factor.GetFactorValue(FactorName);

                    int index1 = values.IndexOf(factorValue);

                    if (index1 == -1)
                    {
                        values.Add(factorValue);
                        index1 = values.Count - 1;
                    }
                    int index2 = index1 / MaximumIndex1;

                    index2 = index2 % MaximumIndex2;
                    index1 = index1 % MaximumIndex1;
                    Setter1(visualElement, index1);
                    Setter2(visualElement, index2);
                }
Exemple #6
0
        /// <summary>Returns true if this object is equal to rhs</summary>
        /// <param name="compareTo">The object to compare to</param>
        public bool Equals(ISimulationGeneratorFactors compareTo)
        {
            if (ColumnName != compareTo.ColumnName)
            {
                return(false);
            }
            if (Factors.Count() != compareTo.Factors.Count())
            {
                return(false);
            }
            for (int i = 0; i < Factors.Count; i++)
            {
                if (Factors[i].Key != compareTo.Factors[i].Key ||
                    Factors[i].Value != compareTo.Factors[i].Value)
                {
                    return(false);
                }
            }

            return(true);
        }
Exemple #7
0
                public void PaintSimulationZone(ISimulationGeneratorFactors factor, VisualElements visualElement, Series series)
                {
                    int index;

                    if (FactorName == "Graph series")
                    {
                        index = (series.Parent as Graph).Series.IndexOf(series);
                    }
                    else
                    {
                        string factorValue = factor.GetFactorValue(FactorName);

                        index = values.IndexOf(factorValue);
                        if (index == -1)
                        {
                            values.Add(factorValue);
                            index = values.Count - 1;
                        }
                    }

                    index = index % MaximumIndex;
                    Setter(visualElement, index);
                }
Exemple #8
0
 public void PaintSimulationZone(ISimulationGeneratorFactors factor, VisualElements visualElement)
 {
     visualElement.colour = Colour;
     visualElement.Line   = LineType;
     visualElement.Marker = MarkerType;
 }
Exemple #9
0
 /// <summary>
 /// Merge the specified object into this object
 /// </summary>
 /// <param name="from">The object to copy values from</param>
 public void Merge(ISimulationGeneratorFactors from)
 {
     ColumnValues.AddRange(from.ColumnValues);
 }