public void BindEventMouseClick(Control sourceControl, MouseButtons sourceButton, string targetCommand) { //**************************************** WinBoundControl Source; //**************************************** if (!_BoundControls.TryGetValue(sourceControl, out Source)) { Source = WinBoundControl.GetControl(this, sourceControl); _BoundControls.Add(sourceControl, Source); } Source.BindEventMouseClick(sourceButton, targetCommand); }
public void BindEventKeyPress(Control sourceControl, Keys sourceKey, string targetCommand) { //**************************************** WinBoundControl Source; //**************************************** if (!_BoundControls.TryGetValue(sourceControl, out Source)) { Source = WinBoundControl.GetControl(this, sourceControl); _BoundControls.Add(sourceControl, Source); } Source.BindEventKeyPress(sourceKey, targetCommand); }
public void Bind(Control sourceControl, string sourcePath, Control targetControl, IGuiConverter converter) { //**************************************** WinBoundControl Source = null, Target; //**************************************** if (sourceControl != null && !_BoundControls.TryGetValue(sourceControl, out Source)) { throw new ArgumentException("Source Control is not bound to anything"); } if (!_BoundControls.TryGetValue(targetControl, out Target)) { Target = WinBoundControl.GetControl(this, targetControl); _BoundControls.Add(targetControl, Target); } Target.Bind(Source as WinBoundListControl, sourcePath, converter); }