Пример #1
0
        void SetImageSource(CCMessageBoxImage image)
        {
            //string __Source = "pack://application:,,,/BlogsPrajeesh.BlogSpot.WPFControls;component/Images/Default.png";
            //switch (image)
            //{
            //    case MessageBoxImage.Alert:
            //        __Source = "pack://application:,,,/BlogsPrajeesh.BlogSpot.WPFControls;component/Images/Alert.png";
            //        break;
            //    case MessageBoxImage.Error:
            //        __Source = "pack://application:,,,/BlogsPrajeesh.BlogSpot.WPFControls;component/Images/Error.png";
            //        break;
            //    case MessageBoxImage.Information:
            //        __Source = "pack://application:,,,/BlogsPrajeesh.BlogSpot.WPFControls;component/Images/Info.png";
            //        break;
            //    case MessageBoxImage.OK:
            //        __Source = "pack://application:,,,/BlogsPrajeesh.BlogSpot.WPFControls;component/Images/OK.png";
            //        break;
            //    case MessageBoxImage.Question:
            //        __Source = "pack://application:,,,/BlogsPrajeesh.BlogSpot.WPFControls;component/Images/Help.png";
            //        break;
            //    default:
            //        __Source = "pack://application:,,,/BlogsPrajeesh.BlogSpot.WPFControls;component/Images/Default.png";
            //        break;

            //}
            //Uri __ImageUri = new Uri(__Source, UriKind.RelativeOrAbsolute);
            //MessageImageSource = new BitmapImage(__ImageUri);
        }
Пример #2
0
        //public Visibility YesNoVisibility
        //{
        //    get { return ___YesNoVisibility; }
        //    set
        //    {
        //        if (___YesNoVisibility != value)
        //        {
        //            ___YesNoVisibility = value;
        //            NotifyPropertyChange("YesNoVisibility");
        //        }
        //    }
        //}

        //public Visibility CancelVisibility
        //{
        //    get { return ___CancelVisibility; }
        //    set
        //    {
        //        if (___CancelVisibility != value)
        //        {
        //            ___CancelVisibility = value;
        //            NotifyPropertyChange("CancelVisibility");
        //        }
        //    }
        //}

        //public Visibility OkVisibility
        //{
        //    get { return ___OKVisibility; }
        //    set
        //    {
        //        if (___OKVisibility != value)
        //        {
        //            ___OKVisibility = value;
        //            NotifyPropertyChange("OkVisibility");
        //        }
        //    }
        //}

        //public Visibility CloseVisibility
        //{
        //    get { return ___CloseVisibility; }
        //    set
        //    {
        //        if (___CloseVisibility != value)
        //        {
        //            ___CloseVisibility = value;
        //            NotifyPropertyChange("CloseVisibility");
        //        }
        //    }
        //}

        //public Visibility ShowDetails
        //{
        //    get { return ___ShowDetails; }
        //    set
        //    {
        //        if (___ShowDetails != value)
        //        {
        //            ___ShowDetails = value;
        //            NotifyPropertyChange("ShowDetails");
        //        }
        //    }
        //}


        public MessageBoxViewModel(MsgBox view,
                                   string title, string message, string innerMessage,
                                   CCMessageBoxButtons buttonOption, CCMessageBoxImage image)
        {
            Title               = title;
            Message             = message;
            InnerMessageDetails = innerMessage;
            ButtonOption        = buttonOption;
            //SetButtonVisibility(buttonOption);
            //SetImageSource(image);
            Image = image;
        }
Пример #3
0
 public static DialogResult Show(string title, string message, CCMessageBoxButtons buttonOption, CCMessageBoxImage image, bool coverAddCancel)
 {
     coverAddCancelFlag = coverAddCancel;
     return(Show(title, message, string.Empty, buttonOption, image));
 }
Пример #4
0
        public static DialogResult Show(string title, string message, string details, CCMessageBoxButtons buttonOption, CCMessageBoxImage image)
        {
            ___MessageBox = new MsgBox();
            MessageBoxViewModel __ViewModel = new MessageBoxViewModel(___MessageBox, title, message, details, buttonOption, image);

            ___MessageBox.DataContext = __ViewModel;
            ___MessageBox.ShowDialog();
            return(___MessageBox.DialogResult);
        }
Пример #5
0
 public static DialogResult Show(string title, string message, CCMessageBoxButtons buttonOption, CCMessageBoxImage image)
 {
     return(Show(title, message, string.Empty, buttonOption, image));
 }
Пример #6
0
 public static DialogResult Show(string title, string message, string details, CCMessageBoxImage image)
 {
     return(Show(title, message, details, CCMessageBoxButtons.OK, image));
 }