示例#1
0
        /// <summary>
        /// Converts the negotiation party between the ChatBubble object and the Negotiation client.
        /// </summary>
        /// <param name="value">The value to be displayed.</param>
        /// <param name="targetType">The CLR type of the item to be displayed.</param>
        /// <param name="parameter">Additional information for the dislay.</param>
        /// <param name="culture">The culture for the dispaly.</param>
        /// <returns>The alignment of the chat bubble.</returns>
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            ChatBubble.PartyEnum party = (ChatBubble.PartyEnum)value;

            if (party == ChatBubble.PartyEnum.You)
            {
                return(BalloonDecorator.ChatPartyEnum.You);
            }
            else
            {
                return(BalloonDecorator.ChatPartyEnum.Contra);
            }
        }
示例#2
0
        /// <summary>
        /// Converts a party type to justification instructions in the chat dialog.
        /// </summary>
        /// <param name="value">The value to be displayed.</param>
        /// <param name="targetType">The CLR type of the item to be displayed.</param>
        /// <param name="parameter">Additional information for the dislay.</param>
        /// <param name="culture">The culture for the dispaly.</param>
        /// <returns>The alignment of the chat bubble.</returns>
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            ChatBubble.PartyEnum party = (ChatBubble.PartyEnum)value;

            if (party == ChatBubble.PartyEnum.You)
            {
                return(HorizontalAlignment.Right);
            }
            else
            {
                return(HorizontalAlignment.Left);
            }
        }