界面修改 功能修改
This commit is contained in:
1 parent
3fe394c8da
commit
25cdf642bf
43 files changed
+897
-189
No files matched your search
@@ -16,18 +16,18 @@
|
||||
<Border Margin="2,0,2,2" Grid.Row="1" Background="White">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"></ColumnDefinition>
|
||||
<ColumnDefinition Width="100"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image x:Name="imgTip" Source="{StaticResource imgBaseMsgInfo}" Stretch="Uniform" Width="64" Height="64" VerticalAlignment="Top" Margin="0,30" />
|
||||
<Image x:Name="imgTip" Source="{StaticResource imgBaseMsgInfo}" Stretch="Uniform" Width="64" Height="64" VerticalAlignment="Top" Margin="0,25" />
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
<RowDefinition Height="80"></RowDefinition>
|
||||
<RowDefinition Height="70"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Label x:Name="lblMsg" Content="message" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,30,30,30"/>
|
||||
<Button x:Name="btnCancel" Content="取消" HorizontalAlignment="Right" Margin="0,20,30,0" Grid.Row="1" VerticalAlignment="Top" Width="75" Height="26" Click="btnCancel_Click"/>
|
||||
<Button x:Name="btnOk" Content="确定" HorizontalAlignment="Right" Margin="0,20,130,0" Grid.Row="1" VerticalAlignment="Top" Width="75" Height="26" Click="btnOk_Click"/>
|
||||
<TextBlock TextWrapping="Wrap" x:Name="tbkMsg" Text="message" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,30,20,0" Padding="0"/>
|
||||
<Button x:Name="btnCancel" Content="取消" Style="{StaticResource BaseButtonLightStyle}" HorizontalAlignment="Right" Margin="0,20,30,0" Grid.Row="1" VerticalAlignment="Top" Width="75" Height="26" Click="btnCancel_Click"/>
|
||||
<Button x:Name="btnOk" Content="确定" Style="{StaticResource BaseButtonStyle}" HorizontalAlignment="Right" Margin="0,20,130,0" Grid.Row="1" VerticalAlignment="Top" Width="75" Height="26" Click="btnOk_Click"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shell;
|
||||
|
||||
@@ -14,7 +15,8 @@ namespace _29WxOrderWpf.BaseWindows
|
||||
{
|
||||
public BaseWindow()
|
||||
{
|
||||
this.Icon = new BitmapImage(new Uri("pack://application:,,,/Resources/29wx.ico"));
|
||||
//this.Icon = new BitmapImage(new Uri("pack://application:,,,/Resources/29wx.ico"));
|
||||
this.Icon = Application.Current.Resources["main29WeixinIcon"] as ImageSource;
|
||||
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
WindowChrome.SetWindowChrome(this, new WindowChrome() { CaptionHeight = 8, ResizeBorderThickness = new Thickness(4), });
|
||||
|
||||
|
||||
Reference in new issue
Block a user