Esempio n. 1
0
            public HResult SetFooterIcon(NiTaskDialogIcon footerIcon)
            {
                try
                {
                    _taskDialog.FooterIcon = TaskDialogUtil.EncodeIcon(footerIcon);

                    return(HResult.OK);
                }
                catch (Exception ex)
                {
                    return(ErrorUtil.GetHResult(ex));
                }
            }
Esempio n. 2
0
            public HResult UpdateFooterIcon(NiTaskDialogIcon icon)
            {
                try
                {
                    _active.UpdateFooterIcon(TaskDialogUtil.EncodeIcon(icon));

                    return(HResult.OK);
                }
                catch (Exception ex)
                {
                    return(ErrorUtil.GetHResult(ex));
                }
            }
Esempio n. 3
0
            public HResult GetFooterIcon(out NiTaskDialogIcon footerIcon)
            {
                footerIcon = 0;

                try
                {
                    footerIcon = TaskDialogUtil.DecodeIcon(_taskDialog.FooterIcon);

                    return(HResult.OK);
                }
                catch (Exception ex)
                {
                    return(ErrorUtil.GetHResult(ex));
                }
            }
Esempio n. 4
0
            public HResult GetMainIcon(out NiTaskDialogIcon mainIcon)
            {
                mainIcon = 0;

                try
                {
                    mainIcon = TaskDialogUtil.DecodeIcon(_taskDialog.MainIcon);

                    return(HResult.OK);
                }
                catch (Exception ex)
                {
                    return(ErrorUtil.GetHResult(ex));
                }
            }
Esempio n. 5
0
            public static TaskDialogIcon EncodeIcon(NiTaskDialogIcon value)
            {
                switch (value)
                {
                case NiTaskDialogIcon.None:
                    return(TaskDialogIcon.None);

                case NiTaskDialogIcon.Warning:
                    return(TaskDialogIcon.Warning);

                case NiTaskDialogIcon.Error:
                    return(TaskDialogIcon.Error);

                case NiTaskDialogIcon.Information:
                    return(TaskDialogIcon.Information);

                case NiTaskDialogIcon.Shield:
                    return(TaskDialogIcon.Shield);

                default:
                    throw new ArgumentOutOfRangeException("value");
                }
            }
Esempio n. 6
0
 public NiTaskDialogBuilder MainIcon(NiTaskDialogIcon mainIcon)
 {
     _mainIcon = mainIcon;
     return this;
 }
Esempio n. 7
0
            public HResult SetMainIcon(NiTaskDialogIcon mainIcon)
            {
                try
                {
                    _taskDialog.MainIcon = TaskDialogUtil.EncodeIcon(mainIcon);

                    return HResult.OK;
                }
                catch (Exception ex)
                {
                    return ErrorUtil.GetHResult(ex);
                }
            }
Esempio n. 8
0
            public HResult SetFooterIcon(NiTaskDialogIcon footerIcon)
            {
                try
                {
                    _taskDialog.FooterIcon = TaskDialogUtil.EncodeIcon(footerIcon);

                    return HResult.OK;
                }
                catch (Exception ex)
                {
                    return ErrorUtil.GetHResult(ex);
                }
            }
Esempio n. 9
0
            public HResult GetMainIcon(out NiTaskDialogIcon mainIcon)
            {
                mainIcon = 0;

                try
                {
                    mainIcon = TaskDialogUtil.DecodeIcon(_taskDialog.MainIcon);

                    return HResult.OK;
                }
                catch (Exception ex)
                {
                    return ErrorUtil.GetHResult(ex);
                }
            }
Esempio n. 10
0
            public HResult GetFooterIcon(out NiTaskDialogIcon footerIcon)
            {
                footerIcon = 0;

                try
                {
                    footerIcon = TaskDialogUtil.DecodeIcon(_taskDialog.FooterIcon);

                    return HResult.OK;
                }
                catch (Exception ex)
                {
                    return ErrorUtil.GetHResult(ex);
                }
            }
Esempio n. 11
0
            public HResult UpdateMainIcon(NiTaskDialogIcon icon)
            {
                try
                {
                    _active.UpdateMainIcon(TaskDialogUtil.EncodeIcon(icon));

                    return HResult.OK;
                }
                catch (Exception ex)
                {
                    return ErrorUtil.GetHResult(ex);
                }
            }
Esempio n. 12
0
 public static TaskDialogIcon EncodeIcon(NiTaskDialogIcon value)
 {
     switch (value)
     {
         case NiTaskDialogIcon.None:
             return TaskDialogIcon.None;
         case NiTaskDialogIcon.Warning:
             return TaskDialogIcon.Warning;
         case NiTaskDialogIcon.Error:
             return TaskDialogIcon.Error;
         case NiTaskDialogIcon.Information:
             return TaskDialogIcon.Information;
         case NiTaskDialogIcon.Shield:
             return TaskDialogIcon.Shield;
         default:
             throw new ArgumentOutOfRangeException("value");
     }
 }
Esempio n. 13
0
 public NiTaskDialogBuilder MainIcon(NiTaskDialogIcon mainIcon)
 {
     _mainIcon = mainIcon;
     return(this);
 }