diff --git a/29WxOrderWpf/29WxOrderWpf.csproj b/29WxOrderWpf/29WxOrderWpf.csproj
index 2e76ba3..4a92a4e 100644
--- a/29WxOrderWpf/29WxOrderWpf.csproj
+++ b/29WxOrderWpf/29WxOrderWpf.csproj
@@ -14,12 +14,27 @@
4
true
true
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
AnyCPU
true
full
- true
+ false
bin\Debug\
DEBUG;TRACE
prompt
@@ -75,11 +90,9 @@
Icons.xaml
-
- UcImageButton.xaml
-
-
- WindowBoxes.xaml
+
+
+ UcWindowBoxes.xaml
Designer
@@ -109,6 +122,14 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -117,11 +138,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
+
Designer
MSBuild:Compile
@@ -152,7 +169,18 @@
-
+
+
+ False
+ Microsoft .NET Framework 4.6.2 %28x86 和 x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
{6461D807-B1C8-45F0-B388-E0CA1A418DE0}
@@ -179,5 +207,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/29WxOrderWpf.csproj.user b/29WxOrderWpf/29WxOrderWpf.csproj.user
new file mode 100644
index 0000000..95a1d1a
--- /dev/null
+++ b/29WxOrderWpf/29WxOrderWpf.csproj.user
@@ -0,0 +1,13 @@
+
+
+
+ publish\
+
+
+
+
+
+ zh-CN
+ false
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/App.xaml b/29WxOrderWpf/App.xaml
index 38ea195..65ea705 100644
--- a/29WxOrderWpf/App.xaml
+++ b/29WxOrderWpf/App.xaml
@@ -6,6 +6,8 @@
+
+
diff --git a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml
index ae5e115..fcde599 100644
--- a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml
+++ b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml
@@ -5,14 +5,31 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:_29WxOrderWpf.BaseWindows"
mc:Ignorable="d" Style="{StaticResource BaseNoneBorderWindowStyle}"
- Title="BaseMsgWindow" Height="450" Width="800">
+ Title="BaseMsgWindow" Height="250" Width="350">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs
index 2581d26..951373b 100644
--- a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs
+++ b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs
@@ -24,5 +24,55 @@ namespace _29WxOrderWpf.BaseWindows
InitializeComponent();
this.DataContext = this;
}
+
+ private static BaseMsgWindow CreateMsgForm(string msg, string caption, MsgWindowLevel fl)
+ {
+ BaseMsgWindow msgBox = new BaseMsgWindow { lblTitle = { Content = caption }, lblMsg = { Content = msg } };
+ if (fl.Equals(MsgWindowLevel.LARGE))
+ {
+ msgBox.Width = (int)MsgWindowLevel.LARGE;
+ msgBox.Height = 500;
+ }
+ msgBox.btnOk.Margin = new Thickness(msgBox.btnCancel.Margin.Left, msgBox.btnCancel.Margin.Top, msgBox.btnCancel.Margin.Right, msgBox.btnCancel.Margin.Bottom); // 把确认按钮移到取消按钮上面
+ msgBox.btnCancel.Visibility = Visibility.Collapsed;
+ 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 },
+ imgTip = { Source = Application.Current.Resources["imgBaseMsgQue"] as ImageSource },
+ };
+ if (fl.Equals(MsgWindowLevel.LARGE))
+ {
+ msgBox.Width = (int)MsgWindowLevel.LARGE;
+ msgBox.Height = 500;
+ }
+ if (window != null)
+ msgBox.Owner = window;
+ msgBox.ShowDialog();
+ return msgBox;
+ }
+
+ private void btnOk_Click(object sender, RoutedEventArgs e)
+ {
+ DialogResult = true;
+ }
+
+ private void btnCancel_Click(object sender, RoutedEventArgs e)
+ {
+ DialogResult = false;
+ }
+ }
+
+ public enum MsgWindowLevel
+ {
+ SMALL,
+ MEDIUM,
+ LARGE = 500
}
}
diff --git a/29WxOrderWpf/LoginWindows/LoginWindow.xaml b/29WxOrderWpf/LoginWindows/LoginWindow.xaml
index 6f1fa8a..5478425 100644
--- a/29WxOrderWpf/LoginWindows/LoginWindow.xaml
+++ b/29WxOrderWpf/LoginWindows/LoginWindow.xaml
@@ -15,6 +15,6 @@
-
+
diff --git a/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs b/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs
index 5666956..da2e927 100644
--- a/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs
+++ b/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs
@@ -29,8 +29,15 @@ namespace _29WxOrderWpf.LoginWindows
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
- if (BaseMsgForm.ShowConfirm("是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个", "请先登录或者注册").DialogResult == System.Windows.Forms.DialogResult.OK)
+ //if (BaseMsgForm.ShowConfirm("是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个", "请先登录或者注册").DialogResult == System.Windows.Forms.DialogResult.OK)
+ // Process.GetCurrentProcess().Kill();
+ //else
+ // e.Cancel = true;
+
+ if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个", "请先登录或者注册").DialogResult == true)
Process.GetCurrentProcess().Kill();
+ else
+ e.Cancel = true;
}
}
}
diff --git a/29WxOrderWpf/MainWindow.xaml b/29WxOrderWpf/MainWindow.xaml
index 31ad81f..9ff5f0f 100644
--- a/29WxOrderWpf/MainWindow.xaml
+++ b/29WxOrderWpf/MainWindow.xaml
@@ -14,12 +14,9 @@
-
-
-
+
diff --git a/29WxOrderWpf/Resources/BaseMsgErr.png b/29WxOrderWpf/Resources/BaseMsgErr.png
new file mode 100644
index 0000000..1912f06
Binary files /dev/null and b/29WxOrderWpf/Resources/BaseMsgErr.png differ
diff --git a/29WxOrderWpf/Resources/BaseMsgInfo.png b/29WxOrderWpf/Resources/BaseMsgInfo.png
new file mode 100644
index 0000000..f0c961e
Binary files /dev/null and b/29WxOrderWpf/Resources/BaseMsgInfo.png differ
diff --git a/29WxOrderWpf/Resources/BaseMsgQue.png b/29WxOrderWpf/Resources/BaseMsgQue.png
new file mode 100644
index 0000000..59ff5e0
Binary files /dev/null and b/29WxOrderWpf/Resources/BaseMsgQue.png differ
diff --git a/29WxOrderWpf/Styles/BaseWindowStyle.xaml b/29WxOrderWpf/Styles/BaseWindowStyle.xaml
index 544dc20..cf10728 100644
--- a/29WxOrderWpf/Styles/BaseWindowStyle.xaml
+++ b/29WxOrderWpf/Styles/BaseWindowStyle.xaml
@@ -4,14 +4,16 @@
@@ -28,7 +30,6 @@
-->
-
+
+
+
+
+
+
+
+
+
-