Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        public void BindSelection(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))
            {
                throw new ArgumentException("Target Control is not bound to anything");
            }

            ((WinBoundListControl)Target).BindSelection(Source as WinBoundListControl, sourcePath, converter);
        }
Example #4
0
        public void BindVisible(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.BindVisible(Source as WinBoundListControl, sourcePath, converter);
        }