コード例 #1
0
ファイル: ScaleStateList.cs プロジェクト: 1907931256/jx
 /// <summary>
 /// Construct a new <see c_ref="ScaleStateList" /> automatically from an
 /// existing <see c_ref="YAxisList" />.
 /// </summary>
 /// <param name="list">The <see c_ref="YAxisList" /> (a list of Y axes),
 /// from which to retrieve the state and create the <see c_ref="ScaleState" />
 /// objects.</param>
 public ScaleStateList(YAxisList list)
 {
     foreach (Axis axis in list)
     {
         Add(new ScaleState(axis));
     }
 }
コード例 #2
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The <see c_ref="YAxisList"/> object from which to copy</param>
 public YAxisList(YAxisList rhs)
 {
     foreach (YAxis item in rhs)
     {
         Add(item.Clone());
     }
 }
コード例 #3
0
ファイル: ScaleStateList.cs プロジェクト: 1907931256/jx
        /*
         *              /// <summary>
         *              /// Indexer to access the specified <see c_ref="ScaleState"/> object by
         *              /// its ordinal position in the list.
         *              /// </summary>
         *              /// <param name="index">The ordinal position (zero-based) of the
         *              /// <see c_ref="ScaleState"/> object to be accessed.</param>
         *              /// <value>A <see c_ref="ScaleState"/> object reference.</value>
         *              public ScaleState this[ int index ]
         *              {
         *                      get { return (ScaleState) List[index]; }
         *                      set { List[index] = value; }
         *              }
         *              /// <summary>
         *              /// Add a <see c_ref="ScaleState"/> object to the collection at the end of the list.
         *              /// </summary>
         *              /// <param name="state">A reference to the <see c_ref="ScaleState"/> object to
         *              /// be added</param>
         *              /// <seealso c_ref="IList.Add"/>
         *              public void Add( ScaleState state )
         *              {
         *                      List.Add( state );
         *              }
         */

        /// <summary>
        ///
        /// </summary>
        /// <param name="list"></param>
        public void ApplyScale(YAxisList list)
        {
            int count = Math.Min(list.Count, Count);

            for (int i = 0; i < count; i++)
            {
                this[i].ApplyScale(list[i]);
            }
        }
コード例 #4
0
ファイル: ScaleStateList.cs プロジェクト: 1907931256/jx
        /// <summary>
        /// Iterate through the list of <see c_ref="ScaleState" /> objects, comparing them
        /// to the state of the specified <see c_ref="YAxisList" /> <see c_ref="Axis" />
        /// objects.
        /// </summary>
        /// <param name="list">A <see c_ref="YAxisList" /> object specifying a list of
        /// <see c_ref="Axis" /> objects to be compared with this <see c_ref="ScaleStateList" />.
        /// </param>
        /// <returns>true if a difference is found, false otherwise</returns>
        public bool IsChanged(YAxisList list)
        {
            int count = Math.Min(list.Count, Count);

            for (int i = 0; i < count; i++)
            {
                if (this[i].IsChanged(list[i]))
                {
                    return(true);
                }
            }

            return(false);
        }