Add "Busy" method to IWorkspace interface

Topics: CAB & Smart Client Software Factory
Feb 15, 2006 at 6:28 PM
originally posted by: ringman

This would allow WorkItems to generically tell their Workspace that a SmartPart is busy/not. The particular implementation of IWorkspace could then visually represent the fact that the SmartPart is busy. Useful in async scenarios.

public interface ILSGWorkspace : IWorkspace {
void Busy(Control smartPart, bool busy);
}

A TabWorkspace implementation

public class LSGTabWorkspace : TabWorkspace, ILSGWorkspace {
public void Busy(Control smartPart, bool busy) {
string key = PagessmartPart.Name;
smartPart.Enabled = !busy;
this.ImageList = (busy) ? _util.LargeIcons : null;
TabPageskey.ImageKey = (busy) ? "running" : null;
TabPageskey.Cursor = (busy) ? Cursors.WaitCursor : Cursors.Default;
}
}