Esempio n. 1
0
        /// <summary> 输出消息和操作按钮 </summary>
        public static void ShowSnackMessage(string message, object actionContent, Action actionHandler)
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                IWindowBase window = Application.Current.MainWindow as IWindowBase;

                if (window != null)
                {
                    window.AddSnackMessage(message, actionContent, actionHandler);
                }
            });
        }
Esempio n. 2
0
        public static void ShowSnackMessage(string message)
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                IWindowBase window = Application.Current.MainWindow as IWindowBase;

                if (window != null)
                {
                    window.AddSnackMessage(message);
                }
            });
        }
Esempio n. 3
0
        public static void ShowSnackMessageWithNotice(string message)
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                IWindowBase window = Application.Current.MainWindow as IWindowBase;

                if (window != null)
                {
                    window.AddSnackMessage($"友情提示:[" + DateTime.Now.ToString("HH:mm:ss]  " + message));
                }
            });
        }
Esempio n. 4
0
        public static void ShowSnackMessageWithNotice(string message)
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                IWindowBase window = Application.Current.MainWindow as IWindowBase;

                if (window != null)
                {
                    string info = $"{LanguageService.Instance.GetConfigByKey("Notice")}:[" + DateTime.Now.ToString("HH:mm:ss]  " + message);

                    window.AddSnackMessage(info);
                }
            });
        }