zoukankan      html  css  js  c++  java
  • Windows8 UI MessageBox In DevExpress

    // custom messagebox 
    using System;
    using System.Drawing;
    using System.Windows.Forms;
    using DevExpress.XtraBars.Docking2010.Views.WindowsUI;
    using DevExpress.XtraBars.Docking2010.Customization;
    
    namespace StatTools
    {
        public static class MessageBoxService
        {
            public static DialogResult ShowMessageBox(Form InOwner, string InCaption, string InMessage, bool bShowCancel = false)
            {
                FlyoutAction action = new FlyoutAction() { Caption = InCaption, Description = InMessage };
                FlyoutCommand command1 = new FlyoutCommand() { Text = "确定", Result = System.Windows.Forms.DialogResult.Yes };
                
                action.Commands.Add(command1);
    
                if( bShowCancel )
                {
                    FlyoutCommand command2 = new FlyoutCommand() { Text = "取消", Result = System.Windows.Forms.DialogResult.No };
                    action.Commands.Add(command2);
                }
                
                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 40);
                properties.Style = FlyoutStyle.MessageBox;
    
                return FlyoutDialog.Show(InOwner, action);
            }
        }
    }

  • 相关阅读:
    问题汇总
    Spring boot开发过程遇到的一些小问题
    Java 7 新特性
    I2C总线协议详解
    画布分割算法
    nordic __noinit__变量使用
    RTOS事件组使用流程
    RTOS软件定时器的使用
    RTOS互斥信号量的使用流程
    RTOS优先级翻转
  • 原文地址:https://www.cnblogs.com/bodong/p/6130425.html
Copyright © 2011-2022 走看看