Beispiel #1
0
        /// <summary>
        /// Adds a child QueryTextInput node</summary>
        /// <param name="parentNode">QueryNode to receive child</param>
        /// <param name="textInput">Null, or instance of QueryTextInput to use as child (for sharing same text input instance between nodes)</param>
        /// <param name="isNumericalText">Whether text input to text box is numeric or not</param>
        /// <returns>Instance of the new (or passed in) QueryTextInput child node</returns>
        public static QueryTextInput AddTextInput(this QueryNode parentNode, QueryTextInput textInput, bool isNumericalText)
        {
            bool           useExistingTextInput = (textInput != null);
            QueryTextInput newTextInput         = parentNode.Add((useExistingTextInput) ? textInput : new QueryTextInput(isNumericalText))
                                                  as QueryTextInput;

            return(newTextInput);
        }
Beispiel #2
0
        /// <summary>
        /// Adds a child QueryTextInput node, registering 'replace text changed' event to root node</summary>
        /// <param name="parentNode">QueryNode to receive child</param>
        /// <param name="textInput">Null, or instance of QueryTextInput to use as child (for sharing same text input instance between nodes)</param>
        /// <param name="isNumericalText">Whether text input to text box is numeric or not</param>
        /// <returns>Instance of the new (or passed in) QueryTextInput child node</returns>
        public static QueryTextInput AddReplaceTextInput(this QueryNode parentNode, QueryTextInput textInput, bool isNumericalText)
        {
            QueryTextInput newTextInput = AddTextInput(parentNode, textInput, isNumericalText);

            if (newTextInput != null && newTextInput != textInput)
            {
                // register 'replace text changed' event to root node
                QueryRoot rootNode = newTextInput.Root as QueryRoot;
                if (rootNode != null)
                {
                    rootNode.RegisterReplaceQueryTextInput(newTextInput);
                }
            }

            return(newTextInput);
        }
Beispiel #3
0
        /// <summary>
        /// Adds a child QueryTextInput node for numerical text input, registering 'search text changed' event to root node</summary>
        /// <param name="parentNode">QueryNode to receive child</param>
        /// <param name="textInput">Null, or instance of QueryTextInput to use as child (for sharing same text input instance between nodes)</param>
        /// <returns>Instance of the new (or passed in) QueryTextInput child node</returns>
        public static QueryTextInput AddNumericalSearchTextInput(this QueryNode parentNode, QueryTextInput textInput)
        {
            QueryTextInput newTextInput = AddTextInput(parentNode, textInput, true);

            if (newTextInput != null && newTextInput != textInput)
            {
                // register 'search text changed' event to root node
                QueryRoot rootNode = newTextInput.Root as QueryRoot;
                if (rootNode != null)
                {
                    rootNode.RegisterSearchQueryTextInput(newTextInput);
                }
            }

            return(newTextInput);
        }
 /// <summary>
 /// Register 'replace text changed' event to node</summary>
 /// <param name="queryTextInput">QueryTextInput that event is registered to</param>
 public void RegisterReplaceQueryTextInput(QueryTextInput queryTextInput)
 {
     queryTextInput.TextEntered += childNode_ReplaceTextEntered;
 }
 /// <summary>
 /// Register 'search text changed' event to node</summary>
 /// <param name="queryTextInput">QueryTextInput that event is registered to</param>
 public void RegisterSearchQueryTextInput(QueryTextInput queryTextInput)
 {
     queryTextInput.TextEntered += childNode_SearchTextEntered;
     queryTextInput.TextChanged += childNode_SearchTextChanged;
 }
Beispiel #6
0
 /// <summary>
 /// Register 'replace text changed' event to node</summary>
 /// <param name="queryTextInput">QueryTextInput that event is registered to</param>
 public void RegisterReplaceQueryTextInput(QueryTextInput queryTextInput)
 {
     queryTextInput.TextEntered += childNode_ReplaceTextEntered;
 }
Beispiel #7
0
 /// <summary>
 /// Register 'search text changed' event to node</summary>
 /// <param name="queryTextInput">QueryTextInput that event is registered to</param>
 public void RegisterSearchQueryTextInput(QueryTextInput queryTextInput)
 {
     queryTextInput.TextEntered += childNode_SearchTextEntered;
     queryTextInput.TextChanged += childNode_SearchTextChanged;
 }
Beispiel #8
0
        /// <summary>
        /// Adds a child QueryTextInput node</summary>
        /// <param name="parentNode">QueryNode to receive child</param>
        /// <param name="textInput">Null, or instance of QueryTextInput to use as child (for sharing same text input instance between nodes)</param>
        /// <param name="isNumericalText">Whether text input to text box is numeric or not</param>
        /// <returns>Instance of the new (or passed in) QueryTextInput child node</returns>
        public static QueryTextInput AddTextInput(this QueryNode parentNode, QueryTextInput textInput, bool isNumericalText)
        {
            bool useExistingTextInput = (textInput != null);
            QueryTextInput newTextInput = parentNode.Add((useExistingTextInput) ? textInput : new QueryTextInput(isNumericalText))
                as QueryTextInput;

            return newTextInput;
        }
Beispiel #9
0
        /// <summary>
        /// Adds a child QueryTextInput node, registering 'replace text changed' event to root node</summary>
        /// <param name="parentNode">QueryNode to receive child</param>
        /// <param name="textInput">Null, or instance of QueryTextInput to use as child (for sharing same text input instance between nodes)</param>
        /// <param name="isNumericalText">Whether text input to text box is numeric or not</param>
        /// <returns>Instance of the new (or passed in) QueryTextInput child node</returns>
        public static QueryTextInput AddReplaceTextInput(this QueryNode parentNode, QueryTextInput textInput, bool isNumericalText)
        {
            QueryTextInput newTextInput = AddTextInput(parentNode, textInput, isNumericalText);
            if (newTextInput != null && newTextInput != textInput)
            {
                // register 'replace text changed' event to root node
                QueryRoot rootNode = newTextInput.Root as QueryRoot;
                if (rootNode != null)
                    rootNode.RegisterReplaceQueryTextInput(newTextInput);
            }

            return newTextInput;
        }
Beispiel #10
0
        /// <summary>
        /// Adds a child QueryTextInput node for numerical text input, registering 'search text changed' event to root node</summary>
        /// <param name="parentNode">QueryNode to receive child</param>
        /// <param name="textInput">Null, or instance of QueryTextInput to use as child (for sharing same text input instance between nodes)</param>
        /// <returns>Instance of the new (or passed in) QueryTextInput child node</returns>
        public static QueryTextInput AddNumericalSearchTextInput(this QueryNode parentNode, QueryTextInput textInput)
        {
            QueryTextInput newTextInput = AddTextInput(parentNode, textInput, true);
            if (newTextInput != null && newTextInput != textInput)
            {
                // register 'search text changed' event to root node
                QueryRoot rootNode = newTextInput.Root as QueryRoot;
                if (rootNode != null)
                    rootNode.RegisterSearchQueryTextInput(newTextInput);
            }

            return newTextInput;
        }