Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        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);
        }