Exemplo n.º 1
0
        public static void ShowMessage(IWin32Window owner, Enum MessageType)
        {
            MessageResourceManager manager = ResManager.GetMessageResourceManager(MessageType);
            MessageBoxInfo         info    = manager.GetMessageBoxInfo(MessageType);

            if (owner == null)
            {
                MessageBox.Show(info.Message, Caption, info.Button, info.Icon);
            }
            else
            {
                MessageBox.Show(owner, info.Message, Caption, info.Button, info.Icon);
            }
        }
Exemplo n.º 2
0
        public static DialogResult ShowMessage(IWin32Window owner, Enum MessageType, MessageBoxDefaultButton defaultButton, params string[] args)
        {
            MessageResourceManager manager = ResManager.GetMessageResourceManager(MessageType);
            MessageBoxInfo         info    = manager.GetMessageBoxInfo(MessageType, false, defaultButton, args);

            if (owner == null)
            {
                return(MessageBox.Show(info.Message, Caption, info.Button, info.Icon, info.DefaultButton));
            }
            else
            {
                return(MessageBox.Show(owner, info.Message, Caption, info.Button, info.Icon, info.DefaultButton));
            }
        }