界面修改 功能修改
This commit is contained in:
1 parent
3fe394c8da
commit
25cdf642bf
43 files changed
+897
-189
No files matched your search
@@ -11,6 +11,7 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Work.BaseForms;
|
||||
|
||||
namespace _29WxOrderWpf.BaseWindows
|
||||
{
|
||||
@@ -25,10 +26,10 @@ namespace _29WxOrderWpf.BaseWindows
|
||||
this.DataContext = this;
|
||||
}
|
||||
|
||||
private static BaseMsgWindow CreateMsgForm(string msg, string caption, MsgWindowLevel fl)
|
||||
private static BaseMsgWindow CreateMsgForm(string msg, string caption, MsgWindowLevel wl)
|
||||
{
|
||||
BaseMsgWindow msgBox = new BaseMsgWindow { lblTitle = { Content = caption }, lblMsg = { Content = msg } };
|
||||
if (fl.Equals(MsgWindowLevel.LARGE))
|
||||
BaseMsgWindow msgBox = new BaseMsgWindow { lblTitle = { Content = caption }, tbkMsg = { Text = msg } };
|
||||
if (wl.Equals(MsgWindowLevel.LARGE))
|
||||
{
|
||||
msgBox.Width = (int)MsgWindowLevel.LARGE;
|
||||
msgBox.Height = 500;
|
||||
@@ -38,13 +39,35 @@ namespace _29WxOrderWpf.BaseWindows
|
||||
return msgBox;
|
||||
}
|
||||
|
||||
public static BaseMsgWindow ShowInfo(Window window, string msg, string caption = "", MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
|
||||
{
|
||||
string title = string.IsNullOrEmpty(caption) ? "系统提示" : caption;
|
||||
BaseMsgWindow msgBox = CreateMsgForm(msg, title, wl);
|
||||
msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgInfo"] as ImageSource;
|
||||
if (window != null)
|
||||
msgBox.Owner = window;
|
||||
msgBox.ShowDialog();
|
||||
return msgBox;
|
||||
}
|
||||
|
||||
public static BaseMsgWindow ShowError(Window window, string msg, string caption = "", MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
|
||||
{
|
||||
string title = string.IsNullOrEmpty(caption) ? "系统错误" : caption;
|
||||
BaseMsgWindow msgBox = CreateMsgForm(msg, title, wl);
|
||||
msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgErr"] as ImageSource;
|
||||
if (window != null)
|
||||
msgBox.Owner = window;
|
||||
msgBox.ShowDialog();
|
||||
return msgBox;
|
||||
}
|
||||
|
||||
public static BaseMsgWindow ShowConfirm(Window window, string msg, string caption = "", MsgWindowLevel fl = MsgWindowLevel.MEDIUM)
|
||||
{
|
||||
string title = string.IsNullOrEmpty(caption) ? "确认系统提示" : caption;
|
||||
BaseMsgWindow msgBox = new BaseMsgWindow
|
||||
{
|
||||
lblTitle = { Content = title },
|
||||
lblMsg = { Content = msg },
|
||||
tbkMsg = { Text = msg },
|
||||
imgTip = { Source = Application.Current.Resources["imgBaseMsgQue"] as ImageSource },
|
||||
};
|
||||
if (fl.Equals(MsgWindowLevel.LARGE))
|
||||
|
||||
Reference in new issue
Block a user