Exemplo n.º 1
0
        /// <summary>
        /// Handles ui messages from the client. For things such as button presses
        /// which interact with the world and require server action.
        /// </summary>
        /// <param name="obj">A user interface message from the client.</param>
        private void OnUiReceiveMessage(ServerBoundUserInterfaceMessage obj)
        {
            var msg = (UiActionMessage)obj.Message;

            if (!Anchored)
            {
                return;
            }

            //Check for correct message and ignore maleformed strings
            if (msg.Action == UiAction.Ok && TagRegex.IsMatch(msg.Tag))
            {
                _tag = msg.Tag;
                ClickSound();
            }
        }
        public DisposalRouterWindow()
        {
            RobustXamlLoader.Load(this);

            TagInput.IsValid = tags => TagRegex.IsMatch(tags);
        }