Пример #1
0
 /// <summary>
 ///     构建编辑范围
 /// </summary>
 /// <param name="status">锁定的编辑对象</param>
 /// <param name="arrestMode">编辑阻止模式</param>
 /// <param name="endRaiseEvent">锁定完成后是否发出属性修改事件(已取消功能)</param>
 public EditScope(IndexEditStatus status, EditArrestMode arrestMode = EditArrestMode.All, bool endRaiseEvent = false)
 {
     _preScope      = _currentScope;
     _currentScope  = this;
     _status        = status;
     _oldArrest     = _status.Arrest;
     _status.Arrest = arrestMode;
     _endRaiseEvent = endRaiseEvent;
 }
Пример #2
0
 /// <summary>
 ///     复制修改状态
 /// </summary>
 /// <param name="target">要复制的源</param>
 private void CopyStateInner(IndexEditStatus target)
 {
     if (target.modifiedProperties == null)
     {
         modifiedProperties = null;
     }
     else
     {
         for (var index = 0; index < target.ModifiedProperties.Length; index++)
         {
             modifiedProperties[index] = target.ModifiedProperties[index];
         }
     }
 }
Пример #3
0
 /// <summary>
 ///     重置
 /// </summary>
 public void Reset(sbyte type = Exist)
 {
     _status    = null;
     IsReadOnly = false;
     _state     = type;
 }
Пример #4
0
 /// <summary>
 ///     复制修改状态
 /// </summary>
 /// <param name="target">要复制的源</param>
 internal void CopyState(IndexEditStatus target)
 {
     CopyStateInner(target);
 }