Ejemplo n.º 1
0
        public object AddNew()
        {
            StateRow newRow = new StateRow();

            List.Add(newRow);

            return(newRow);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a StateRow based on the specified name and adds it to the
        /// StateRowCollection.
        /// </summary>
        /// <param name="name">
        /// The state name.
        /// </param>
        /// <returns>
        /// The position into which the StateRow was inserted into the
        /// StareRowCollection.
        /// </returns>
        public int Add(string name)
        {
            StateRow newRow = new StateRow();

            newRow.Name = name;

            return(Add(newRow));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a StateRow based on the specified name and initial state
        /// and adds it to the StateRowCollection.
        /// </summary>
        /// <param name="name">
        /// The state name.
        /// </param>
        /// <param name="initialState">
        /// The state's initial state.
        /// </param>
        /// <returns>
        /// The position into which the StateRow was inserted into the
        /// StareRowCollection.
        /// </returns>
        public int Add(string name, string initialState)
        {
            StateRow newRow = new StateRow();

            newRow.Name         = name;
            newRow.InitialState = initialState;

            return(Add(newRow));
        }
Ejemplo n.º 4
0
        protected override void OnRemoveComplete(int index, object value)
        {
            StateRow oldRow = (StateRow)value;

            oldRow.EditCancelled -= new EventHandler(EditCancelledHandler);

            OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));

            base.OnRemoveComplete(index, value);
        }
Ejemplo n.º 5
0
        protected override void OnInsertComplete(int index, object value)
        {
            StateRow newRow = (StateRow)value;

            newRow.EditCancelled += new EventHandler(EditCancelledHandler);

            OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));

            base.OnInsertComplete(index, value);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Creates a StateRow based on the specified name, initial state, and
        /// history type and adds it to the StateRowCollection.
        /// </summary>
        /// <param name="name">
        /// The state name.
        /// </param>
        /// <param name="initialState">
        /// The state's initial state.
        /// </param>
        /// <param name="historyType">
        /// The state's history type.
        /// </param>
        /// <returns>
        /// The position into which the StateRow was inserted into the
        /// StareRowCollection.
        /// </returns>
        public int Add(string name, string initialState, HistoryType historyType)
        {
            StateRow newRow = new StateRow();

            newRow.Name         = name;
            newRow.InitialState = initialState;
            newRow.HistoryType  = historyType;

            return(Add(newRow));
        }
Ejemplo n.º 7
0
        protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            if (oldValue != newValue)
            {
                StateRow oldRow = (StateRow)oldValue;
                StateRow newRow = (StateRow)newValue;

                oldRow.EditCancelled -= new EventHandler(EditCancelledHandler);
                newRow.EditCancelled += new EventHandler(EditCancelledHandler);

                OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
            }

            base.OnSetComplete(index, oldValue, newValue);
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Adds a StateRow to the StateRowCollection.
 /// </summary>
 /// <param name="row">
 /// The StateRow to add to the StateRowCollection.
 /// </param>
 /// <returns>
 /// The position into which the StateRow was inserted into the
 /// StareRowCollection.
 /// </returns>
 public int Add(StateRow row)
 {
     return(List.Add(row));
 }