Esempio n. 1
0
        public void SetMvvmFxBindings(Control masterControl)
        {
            _bindingManager.Bindings.Clear();

            if ((masterControl as Form)?.Menu != null)
            {
                ParseComponents((masterControl as Form).Menu);
            }

            foreach (Control control in masterControl.Controls)
            {
                if (control is MenuBar)
                {
                    ParseComponents(control as MenuBar);
                }
                else if (control is ToolBar)
                {
                    ParseComponents(control as ToolBar);
                }
                else if (control is StatusBar)
                {
                    ParseComponents(control as StatusBar);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Creates an instance of <see cref="ActionMessage" />.
        /// </summary>
        /// <param name="associatedObject">The associated <see cref="Control"/> object.</param>
        /// <param name="eventName">Name of the event on the view that triggers the ActionMessage.</param>
        /// <param name="methodName">Name of the method to be invoked on the presentation model class.</param>
        /// <param name="parameters">The parameters to pass as part of the method invocation.</param>
        public ActionMessage(Control associatedObject, string eventName, string methodName,
                             IEnumerable <Parameter> parameters)
        {
            if (parameters != null)
            {
                foreach (var parameter in parameters)
                {
                    parameter.MakeAwareOf(this);
                    Parameters.Add(parameter);
                }
            }

            EventName        = eventName;
            MethodName       = methodName;
            AssociatedObject = associatedObject;
        }
Esempio n. 3
0
        public static void SetBindings(this Control masterControl)
        {
            if ((masterControl as Form)?.Menu != null)
            {
                ParseComponents((masterControl as Form).Menu);
            }

            foreach (Control control in masterControl.Controls)
            {
                if (control is MenuBar)
                {
                    ParseComponents(control as MenuBar);
                }
                else if (control is ToolBar)
                {
                    ParseComponents(control as ToolBar);
                }
                else if (control is StatusBar)
                {
                    ParseComponents(control as StatusBar);
                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Creates an instance of <see cref="ActionMessage"/>.
 /// </summary>
 /// <param name="associatedObject">The associated <see cref="Control"/> object.</param>
 /// <param name="eventName">Name of the event on the view that triggers the ActionMessage.</param>
 /// <param name="methodName">Name of the method to be invoked on the presentation model class.</param>
 public ActionMessage(Control associatedObject, string eventName, string methodName)
 {
     EventName        = eventName;
     MethodName       = methodName;
     AssociatedObject = associatedObject;
 }