コード例 #1
0
        public static void Show(string message, string caption, CustomMessageBoxType type, bool topMost = true)
        {
            _instance         = new TopmostMessageBox();
            _instance.Closed += InstanceClosed;

            _instance.BaseShow(message, caption, type, topMost);
        }
コード例 #2
0
        public static void Show(string message, CustomMessageBoxType type)
        {
            _instance         = new TopmostMessageBox();
            _instance.Closed += InstanceClosed;

            _instance.BaseShow(message, string.Empty, type, true);
        }
コード例 #3
0
        public static void Show(string message, bool topMost = true)
        {
            _instance         = new TopmostMessageBox();
            _instance.Closed += InstanceClosed;

            _instance.BaseShow(message, string.Empty, CustomMessageBoxType.OK, topMost);
        }
コード例 #4
0
        public static CustomMessageBoxResult ShowDialog(string message, string caption, CustomMessageBoxType type, bool topMost = true)
        {
            if (_instance == null)
            {
                _instance         = new TopmostMessageBox();
                _instance.Closed += InstanceClosed;
            }

            return(_instance.BaseShowDialog(message, caption, type, topMost));
        }
コード例 #5
0
        public static CustomMessageBoxResult ShowDialog(string message, CustomMessageBoxType type)
        {
            if (_instance == null)
            {
                _instance         = new TopmostMessageBox();
                _instance.Closed += InstanceClosed;
            }

            return(_instance.BaseShowDialog(message, string.Empty, type, true));
        }
コード例 #6
0
 private static void InstanceClosed(object sender, EventArgs e)
 {
     _instance = null;
 }