private void HandleNotifyViewActionMessage(NotifyViewActionMessage nam)
 {
     this.NotifyVisibility = Visibility.Visible;
     this.Action           = nam.Action;
     this.Origin           = nam.Origin;
     this.SetButtonMode(nam);
     this.SetText(nam);
 }
 private void SetText(NotifyViewActionMessage nam)
 {
     this.Message = nam.Message;
     if (nam.IsError)
     {
         this.TextColor = Colors.Red;
     }
     else
     {
         this.TextColor = Colors.SaddleBrown;
     }
 }
        public static void Notify(string action, NotifyButtonEnum b, List <NotifyButtonLabelEnum> bl, string message, bool isError = false, string origin = null)
        {
            var am = new NotifyViewActionMessage
            {
                Origin       = origin,
                Action       = action,
                ButtonMode   = b,
                ButtonLabels = bl,
                IsError      = isError,
                Message      = message
            };

            Messenger.Default.Send <NotifyViewActionMessage>(am);
        }
        private void SetButtonMode(NotifyViewActionMessage nam)
        {
            switch (nam.ButtonMode)
            {
            case NotifyButtonEnum.OneButton:
                this.ThreeButtonVisibility = Visibility.Hidden;
                this.TwoButtonVisibility   = Visibility.Hidden;
                this.OneButtonVisibility   = Visibility.Visible;

                if (nam.ButtonLabels.Count.Equals(1))
                {
                    this.OneButtonLabel = nam.ButtonLabels[0].ToString();
                }
                break;

            case NotifyButtonEnum.TwoButton:
                this.TwoButtonVisibility   = Visibility.Visible;
                this.OneButtonVisibility   = Visibility.Hidden;
                this.ThreeButtonVisibility = Visibility.Hidden;

                if (nam.ButtonLabels.Count.Equals(2))
                {
                    this.YesButtonLabel = nam.ButtonLabels[0].ToString();
                    this.NoButtonLabel  = nam.ButtonLabels[1].ToString();
                }
                break;

            case NotifyButtonEnum.ThreeButton:
                this.ThreeButtonVisibility = Visibility.Visible;
                this.TwoButtonVisibility   = Visibility.Hidden;
                this.OneButtonVisibility   = Visibility.Hidden;

                if (nam.ButtonLabels.Count.Equals(3))
                {
                    this.YesButtonLabel     = nam.ButtonLabels[0].ToString();
                    this.NoButtonLabel      = nam.ButtonLabels[1].ToString();
                    this.Cancel3ButtonLabel = nam.ButtonLabels[2].ToString();
                }
                break;
            }
        }