예제 #1
0
        /// <summary>
        /// Begins an edit on an object.
        /// </summary>
        void IEditableObject.BeginEdit()
        {
            var eventArgs = new BeginEditEventArgs(this);

            _beginEditingEvent.SafeInvoke(this, eventArgs);
            OnBeginEdit(eventArgs);

            if (_backup != null)
            {
                return;
            }

            if (eventArgs.Cancel)
            {
                Log.Info("IEditableObject.BeginEdit is canceled by the event args");
                return;
            }

            Log.Debug("IEditableObject.BeginEdit");

            _backup = new BackupData(this);
        }
예제 #2
0
        /// <summary>
        /// Begins an edit on an object.
        /// </summary>
        void IEditableObject.BeginEdit()
        {
            if (_backup != null)
            {
                Log.Debug("IEditableObject is already in edit state");
                return;
            }

            var eventArgs = new BeginEditEventArgs(this);

            _beginEditingEvent.SafeInvoke(this, eventArgs);
            OnBeginEdit(eventArgs);

            if (eventArgs.Cancel)
            {
                Log.Info("IEditableObject.BeginEdit is canceled by the event args");
                return;
            }

            Log.Debug("IEditableObject.BeginEdit");

            _backup = new BackupData(this, GetSerializerForIEditableObject());
        }
예제 #3
0
 /// <summary>
 /// Raises the <see cref="IEditableObject.BeginEdit"/> event.
 /// </summary>
 /// <param name="e">The <see cref="System.ComponentModel.BeginEditEventArgs"/> instance containing the event data.</param>
 protected virtual void OnBeginEdit(BeginEditEventArgs e)
 {
 }
예제 #4
0
 protected override void OnBeginEdit(BeginEditEventArgs e)
 {
     OnBeginEditCalled = true;
 }
 private void FeatureLayer_BeginSaveEdits(object sender, BeginEditEventArgs e)
 {
 }
예제 #6
0
 protected override void OnBeginEdit(BeginEditEventArgs e)
 {
     //System.Diagnostics.Trace.WriteLine(String.Format("Ino - VM: Start BeginEdit ({0} - {1})", Id, GetHashCode()));
     base.OnBeginEdit(e);
     System.Diagnostics.Trace.WriteLine(String.Format("Ino - VM: End BeginEdit ({0} - {1})", Id, GetHashCode()));
 }
예제 #7
0
 private void FeatureLayer_BeginSaveEdits(object sender, BeginEditEventArgs e)
 {
 }