/// <summary> /// Stops the TreeView updates until EndUpdate is called, then updates according to the provided update flags. /// </summary> public void BeginUpdate(TreeViewUpdateFlags flags) { this.updating = flags; this.beginUpdateCalls += 1; }
/// <summary> /// Updates the TreeView according to the supplied update flags. /// If BeginUpdate was called before, the flags are added to the update queue. /// </summary> public void Update(TreeViewUpdateFlags flags) { this.SetUpdateFlag(flags); if (this.beginUpdateCalls == 0) this.EndUpdate(); }
/// <summary> /// Sets one or more update flags. /// </summary> private void SetUpdateFlag(TreeViewUpdateFlags flag) { this.updating |= flag; }
/// <summary> /// Unsets one or more update flags /// </summary> private void RemoveUpdateFlag(TreeViewUpdateFlags flag) { this.updating &= ~flag; }
/// <summary> /// Tests if one or more update flags are set. /// </summary> private Boolean TestUpdateFlag(TreeViewUpdateFlags flag) { return (this.updating & flag) == flag; }