public virtual void DisplayCurrentSortStates() { GridViewColumnCollection columns = GridViewDataControl.Columns; ISet <GridViewBoundColumnBase> unmatchedColumns = new IdentityHashSet <GridViewBoundColumnBase>(); foreach (GridViewBoundColumnBase column in columns) { unmatchedColumns.Add(column); } foreach (AmbethSortDescriptor sortDescriptor in SortDescriptorList) { foreach (GridViewBoundColumnBase column in columns) { if (column.GetDataMemberName() == sortDescriptor.Member) { column.SortingState = SortDescriptorConverter.GetTelerikSortingState(sortDescriptor); unmatchedColumns.Remove(column); break; } } } foreach (GridViewBoundColumnBase unmatchedColumn in unmatchedColumns) { unmatchedColumn.SortingState = SortingState.None; } }
public void Unregister(V listener) { ParamChecker.AssertParamNotNull(listener, message); Lock writeLock = this.writeLock; writeLock.Lock(); try { ParamChecker.AssertTrue(set.Remove(listener), message); } finally { writeLock.Unlock(); } }
public void Finished(IBusyToken busyToken) { bool changed; lock (pendingTokens) { if (!pendingTokens.Remove(busyToken)) { throw new ArgumentException("Token not known"); } changed = (pendingTokens.Count == 0); } GuiThreadHelper.InvokeInGui(delegate() { PropertyChanged(this, busyCountPCE); // Busy flag might evaluate to false if (changed) { PropertyChanged(this, isBusyPCE); } }); }