示例#1
0
        private void AnActionButton_Click(object sender, System.EventArgs e)
        {
            Button     actionButton = sender as Button;
            OpenAction openAction   = actionButton.GetTag(DefaultActionIdentificator) as OpenAction;

            if (openAction.ActionRepresentDirectReply())
            {
                notificationActions.Visibility         = ViewStates.Invisible;
                inlineNotificationContainer.Visibility = ViewStates.Visible;
                inlineresponse.Hint = openAction.GetPlaceholderTextForInlineResponse();
                sendinlineresponse.SetTag(DefaultActionIdentificator, openAction);
                sendinlineresponse.Click += Sendinlineresponse_Click;

                SendInlineResponseAvailabityChanged?.Invoke(null, true); //Is currently showing.
            }
            else
            {
                openAction.ClickAction();
                SendInlineResponseAvailabityChanged?.Invoke(null, false); //Here I assume the send inline textbox is not present, because the action simply does not represent a direct reply.
            }
        }
示例#2
0
        protected virtual void ActionButton_Click(object sender, EventArgs e)
        {
            Button     actionButton = sender as Button;
            OpenAction openAction   = actionButton.GetTag(DefaultActionIdentificator) as OpenAction;

            if (openAction.ActionRepresentDirectReply())
            {
                if (new ConfigurationManager(AppPreferences.Default).RetrieveAValue(ConfigurationParameters.EnableQuickReply))
                {
                    NotificationActions.Visibility = ViewStates.Invisible;
                    InlineResponseNotificationContainer.Visibility = ViewStates.Visible;
                    InlineResponse.Hint = openAction.GetPlaceholderTextForInlineResponse();
                    SendInlineResponse.SetTag(DefaultActionIdentificator, openAction);
                    SendInlineResponse.Click += SendInlineResponse_Click;
                    SendInlineResponseAvailabityChanged?.Invoke(null, true);
                }
            }
            else
            {
                openAction.ClickAction();
            }
        }