示例#1
0
        private bool SetAnimationTemplate(MessageViewModel message, MessageAnimation animation, string title)
        {
            Visibility = Visibility.Visible;

            FindName(nameof(ThumbRoot));
            if (ThumbRoot != null)
            {
                ThumbRoot.Visibility = Visibility.Visible;
            }

            TitleLabel.Text   = GetFromLabel(message, title);
            ServiceLabel.Text = Strings.Resources.AttachGif;
            MessageLabel.Text = string.Empty;

            if (animation.Caption != null && !string.IsNullOrWhiteSpace(animation.Caption.Text))
            {
                ServiceLabel.Text += ", ";
                MessageLabel.Text += animation.Caption.Text.Replace("\r\n", "\n").Replace('\n', ' ');
            }

            ThumbRoot.CornerRadius = ThumbEllipse.CornerRadius = default(CornerRadius);

            if (animation.Animation.Thumbnail != null)
            {
                UpdateThumbnail(message, animation.Animation.Thumbnail);
            }

            return(true);
        }
示例#2
0
        private bool SetAnimationTemplate(MessageViewModel message, MessageAnimation animation, string title)
        {
            Visibility = Visibility.Visible;

            ShowThumbnail();

            SetTitle(GetFromLabel(message, title));
            SetService(Strings.Resources.AttachGif);
            SetMessage(string.Empty);

            if (animation.Caption != null && !string.IsNullOrWhiteSpace(animation.Caption.Text))
            {
                AppendService(", ");
                AppendMessage(animation.Caption.Text.Replace("\r\n", "\n").Replace('\n', ' '));
            }

            if (animation.Animation.Thumbnail != null)
            {
                UpdateThumbnail(message, animation.Animation.Thumbnail);
            }

            return(true);
        }
 public static bool UpdateFile(this MessageAnimation animation, File file)
 {
     return(animation.Animation.UpdateFile(file));
 }
 public void OnSubmit(BaseEventData eventData)
 {
     MessageAnimation.PlayOutro(GetComponent <Button>());
     MessageManager.SetCurrentMessage(message.mail);
 }
示例#5
0
 // Awake
 private void Awake()
 {
     Instance = this;
 }
示例#6
0
 public void StartAnimationMessage()
 {
     Application.Current.Dispatcher.Invoke(() => MessageAnimation.Begin());
 }
示例#7
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     MessageAnimation.Begin();
 }
示例#8
0
 private void Awake()
 {
     buttons  = GetComponentsInChildren <Button>(true);
     instance = this;
 }