private void HandleVisualControlAction(object sender, VisualControlActionEvent e) { switch (e.RequestData.ActionKind) { case VisualControlActionKind.Activated: UpdateRibbons(e.RequestData.VisualControl); break; default: break; } }
private void HandleVisualControlAction(object sender, VisualControlActionEvent e) { SLogManager.getInstance().Info("HandleVisualControlAction received in DocumentManagerSupport"); switch (e.RequestData.ActionKind) { case VisualControlActionKind.Activated: _activeControl = null; foreach (DevExpress.XtraBars.BarItem item in _saveComponents) { item.Enabled = false; } core.controls.IVisualControl vc = e.RequestData.VisualControl; core.controls.VisualControlInfo vci = vc.VisualControlInfo; if (vci != null) { if (_controlsForSave.Find(x => x.VisualControlInfo == vci) != null) { foreach (DevExpress.XtraBars.BarItem item in _saveComponents) { item.Enabled = true; } } _activeControl = vc; } break; case VisualControlActionKind.Disposed: default: _activeControl = null; foreach (DevExpress.XtraBars.BarItem item in _saveComponents) { item.Enabled = false; } break; } }