private void Reload() { Beginning.Raise(this, EventArgs.Empty); Reloaded.Raise(this, EventArgs.Empty); Ending.Raise(this, EventArgs.Empty); Ended.Raise(this, EventArgs.Empty); }
private void ModifySelected(IEnumerable <object> selection) { Beginning.Raise(this, EventArgs.Empty); foreach (var obj in selection) { var data = obj.As <DataItem>(); if (data == null) { continue; } switch (data.Type) { case DataType.Integer: data.Value = (int)data.Value + s_random.Next(2, 6); break; case DataType.String: data.Value = string.Format("{0}{1}", data.Value, Alphabet[s_random.Next(0, Alphabet.Length)]); break; } ItemChanged.Raise(this, new ItemChangedEventArgs <object>(data)); } Ending.Raise(this, EventArgs.Empty); Ended.Raise(this, EventArgs.Empty); }
private void GenerateFlat(DataItem parent) { Beginning.Raise(this, EventArgs.Empty); var items = s_random.Next(5, 16); for (var i = 0; i < items; i++) { var data = CreateItem(parent); data.ItemChanged += DataItemChanged; if (parent != null) { parent.Children.Add(data); } else { m_data.Add(data); } ItemInserted.Raise(this, new ItemInsertedEventArgs <object>(-1, data, parent)); } if (parent != null) { ItemChanged.Raise(this, new ItemChangedEventArgs <object>(parent)); } Ending.Raise(this, EventArgs.Empty); Ended.Raise(this, EventArgs.Empty); }
/// <summary> /// Ends the current transaction</summary> public virtual void End() { if (InTransaction) { OnEnding(); Ending.Raise(this, EventArgs.Empty); OnEnded(); Ended.Raise(this, EventArgs.Empty); // transaction operations are assumed to be available by the Ended listeners like HistoryContext m_transactionOperations = null; m_transactionName = null; } }
/// <summary> /// End validation /// </summary> public void ValidationEnded() { if (!m_validating) { return; } try { Ending.Raise(this, EventArgs.Empty); Ended.Raise(this, EventArgs.Empty); } finally { m_validating = false; } }
protected void End() { Ended.Raise(); }
public void ValidationEnding() { Ending.Raise(this, EventArgs.Empty); Ended.Raise(this, EventArgs.Empty); }
public void RaiseEnded() { Ended.Raise(this, EventArgs.Empty); }