界面修改 功能修改
This commit is contained in:
1 parent
3fe394c8da
commit
25cdf642bf
43 files changed
+897
-189
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<ProjectGuid>{D7884375-E42F-4B89-AA3A-D8E75508D8C7}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>_29WxOrderWpf</RootNamespace>
|
||||
<AssemblyName>29WxOrderWpf</AssemblyName>
|
||||
<AssemblyName>29WxFindOrder</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
@@ -35,7 +35,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\..\KJD Cef138\Bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -44,7 +44,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\KJD Cef138\Bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -118,10 +118,26 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\BaseButtonStyle.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\BaseComboBoxStyle.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\BaseTextBoxStyle.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\BaseWindowStyle.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\StaticColorBrushDictionary.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\StaticImageBrushDictionary.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -212,5 +228,14 @@
|
||||
<Resource Include="Resources\BaseMsgInfo.png" />
|
||||
<Resource Include="Resources\BaseMsgQue.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\order_weishop_icon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\main_29weixin_icon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\close_gray.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
@@ -9,5 +9,6 @@
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>zh-CN</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -6,10 +6,14 @@
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Styles/StaticImageBrushDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticImageDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/UcImageButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseWindowStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseTextBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseComboBoxStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/UcImageButtonStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticImageDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticColorBrushDictionary.xaml" />
|
||||
<ResourceDictionary Source="Styles/StaticImageBrushDictionary.xaml" />
|
||||
<!-- 可以添加更多资源字典 -->
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace _29WxOrderWpf
|
||||
{
|
||||
@@ -13,5 +14,24 @@ namespace _29WxOrderWpf
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
public static string[] args = new List<string>().ToArray();
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
if (e.Args.Length > 0)
|
||||
{
|
||||
args = e.Args;
|
||||
}
|
||||
|
||||
#region 后台修改logo
|
||||
//// 替换字典程序logo等
|
||||
//Uri imageUri = new Uri("pack://application:,,,/Resources/WindowBoxes/close.hover.png"); // 新的图片路径
|
||||
//BitmapImage newBitmapImage = new BitmapImage(imageUri);
|
||||
//// 获取资源字典
|
||||
//ResourceDictionary dict = Application.Current.Resources;
|
||||
//// 添加或更新资源
|
||||
//dict["main29WeixinIcon"] = newBitmapImage;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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), });
|
||||
|
||||
|
||||
@@ -6,15 +6,61 @@
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.LoginWindows"
|
||||
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
mc:Ignorable="d" Style="{StaticResource BaseNoneBorderWindowStyle}"
|
||||
Title="LoginWindow" Height="300" Width="400" ResizeMode="NoResize" Closing="BaseWindow_Closing">
|
||||
x:Name="loginWindow" Title="登录" Height="300" Width="400" ResizeMode="NoResize" Loaded="loginWindow_Loaded" Closing="BaseWindow_Closing">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="150"></RowDefinition>
|
||||
<RowDefinition Height="120"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="{StaticResource mainForegroundLinearColorBrush}"></Border>
|
||||
<Grid Grid.Row="1" Margin="2,0,2,2" Background="White">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="180"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="20"></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition Height="20"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="1" BorderBrush="{StaticResource mainColorBrush}" BorderThickness="1" CornerRadius="4" Height="26">
|
||||
<Grid>
|
||||
<ComboBox x:Name="cmbUserNameMobile" Margin="3,0" VerticalContentAlignment="Center" Style="{StaticResource BaseComboBoxStyle}"
|
||||
SelectionChanged="cmbUserNameMobile_SelectionChanged">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--<Grid HorizontalAlignment="Stretch" Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ComboBox}, Path=Width}">
|
||||
<TextBlock Text="{Binding}"/>
|
||||
<Button x:Name="btnDeleteItem" HorizontalAlignment="Right" Content="X" Click="btnDeleteItem_Click"/>
|
||||
</Grid>-->
|
||||
<Grid HorizontalAlignment="Stretch" Width="140">
|
||||
<TextBlock x:Name="txtName" Text="{Binding}" Padding="0" VerticalAlignment="Center"/>
|
||||
<userctrls:UcImageButton Width="17" Height="17" ButtonImage="{StaticResource imgCloseGray}" BorderThickness="0" Cursor="Hand"
|
||||
MouseOverButtonImage="{StaticResource imgCloseGray}" MousePressButtonImage="{StaticResource imgCloseGray}" Background="Transparent"
|
||||
x:Name="btnDeleteItem" Tag="{Binding ElementName=txtName, Path=Text}" HorizontalAlignment="Right" Click="btnDeleteItem_Click"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border Grid.Row="2" BorderBrush="{StaticResource mainColorBrush}" BorderThickness="1" CornerRadius="4" Height="26">
|
||||
<PasswordBox x:Name="txtPassword" Margin="6,0" VerticalContentAlignment="Center" Style="{StaticResource BasePasswordBoxStyle}"></PasswordBox>
|
||||
</Border>
|
||||
<Button x:Name="btnLogin" Style="{StaticResource BaseButtonStyle}" Grid.Row="4" Content="安 全 登 录" Height="26" Click="btnLogin_Click"></Button>
|
||||
<CheckBox Content="记住密码" x:Name="chkRemember" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left" Grid.Row="3" VerticalAlignment="Center" Checked="chkRemember_Checked"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Label x:Name="lblAppName" FontSize="28" Margin="0,14,0,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Content="拍单软件"></Label>
|
||||
<Image Source="{StaticResource main29WeixinIcon}" Height="24" Width="24" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="4"></Image>
|
||||
<Label x:Name="lblTitle" Margin="30,2" Foreground="White" Content="{Binding ElementName=loginWindow, Path=Title}"></Label>
|
||||
<userctrls:UcWindowBoxes VerticalAlignment="Top" HorizontalAlignment="Right" Margin="4" MaxBoxVisibility="Collapsed" MinBoxVisibility="Collapsed"/>
|
||||
</Grid>
|
||||
</basewindows:BaseWindow>
|
||||
@@ -1,4 +1,10 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using _29WxOrderWpf.UserControls;
|
||||
using AllBase;
|
||||
using AllBase.DouYinModel.Param.LoginManage;
|
||||
using NaiBa.Util;
|
||||
using NaiBa.Util.Extension;
|
||||
using NaiBa.Util.Helper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -9,10 +15,12 @@ using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Work;
|
||||
using Work.BaseForms;
|
||||
|
||||
namespace _29WxOrderWpf.LoginWindows
|
||||
@@ -22,22 +30,168 @@ namespace _29WxOrderWpf.LoginWindows
|
||||
/// </summary>
|
||||
public partial class LoginWindow : BaseWindow
|
||||
{
|
||||
public LoginWindow()
|
||||
public static ConcurrentList<UserParam> UserParamList { get; set; } = new ConcurrentList<UserParam>();
|
||||
|
||||
bool isLogin = false;
|
||||
|
||||
string[] argsuser;
|
||||
|
||||
public LoginWindow(string[] args)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (!string.IsNullOrEmpty(BaseClass.ProgramName))
|
||||
{
|
||||
lblAppName.Content = BaseClass.ProgramName;
|
||||
}
|
||||
|
||||
this.Title = "用户登录";
|
||||
argsuser = args;
|
||||
}
|
||||
|
||||
private void loginWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GetUserList();
|
||||
foreach (var user in UserParamList)
|
||||
{
|
||||
cmbUserNameMobile.Items.Insert(0, user.UserName);
|
||||
}
|
||||
|
||||
this.Title = "登录";
|
||||
if (BaseClass.Remember)
|
||||
{
|
||||
chkRemember.IsChecked = true;
|
||||
cmbUserNameMobile.Text = BaseClass.UserName;
|
||||
if (!string.IsNullOrEmpty(BaseClass.PassWord))
|
||||
txtPassword.Password = "******";
|
||||
}
|
||||
|
||||
if (argsuser.Length > 1)
|
||||
{
|
||||
cmbUserNameMobile.Text = argsuser[0].Replace(" ", "");
|
||||
txtPassword.Password = "******";
|
||||
BaseClass.PassWord = argsuser[1].Replace(" ", "");
|
||||
btnLogin_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
//if (BaseMsgForm.ShowConfirm("是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个", "请先登录或者注册").DialogResult == System.Windows.Forms.DialogResult.OK)
|
||||
// Process.GetCurrentProcess().Kill();
|
||||
//else
|
||||
// e.Cancel = true;
|
||||
|
||||
if (!isLogin)
|
||||
{
|
||||
if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个。", "请先登录或者注册").DialogResult == true)
|
||||
Process.GetCurrentProcess().Kill();
|
||||
else
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个", "请先登录或者注册").DialogResult == true)
|
||||
Process.GetCurrentProcess().Kill();
|
||||
else
|
||||
e.Cancel = true;
|
||||
private void btnLogin_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
UserLogin ul = new UserLogin();
|
||||
ul.Mobile = cmbUserNameMobile.Text;
|
||||
ul.Password = txtPassword.Password;
|
||||
|
||||
if (cmbUserNameMobile.Text.Length != 11)
|
||||
{
|
||||
BaseMsgWindow.ShowError(this, "手机号不正确", "提示");
|
||||
cmbUserNameMobile.Focus();
|
||||
return;
|
||||
}
|
||||
if (txtPassword.Password.Length < 6)
|
||||
{
|
||||
BaseMsgWindow.ShowError(this, "密码长度不正确", "提示");
|
||||
txtPassword.Password = "";
|
||||
txtPassword.Focus();
|
||||
return;
|
||||
}
|
||||
string message = "";
|
||||
int weakPassword = 0;
|
||||
int lockUserName = 0;
|
||||
string messageInfo = "";
|
||||
bool ok = ul.Get(ref message, out lockUserName, out weakPassword, out messageInfo);
|
||||
if (!ok)
|
||||
{
|
||||
BaseMsgForm.ShowError(message, "登录失败");
|
||||
return;
|
||||
}
|
||||
if (BaseClass.Remember)
|
||||
{
|
||||
Initialization i = new Initialization();
|
||||
i.SaveConfig();
|
||||
|
||||
var eUser = UserParamList.FirstOrDefault(u => u.UserName == BaseClass.UserName);
|
||||
if (eUser != null)
|
||||
UserParamList.Remove(eUser);
|
||||
UserParamList.Add(new UserParam()
|
||||
{
|
||||
UserName = BaseClass.UserName,
|
||||
PasswordMd5 = BaseClass.PassWord
|
||||
});
|
||||
SaveUserList();
|
||||
}
|
||||
this.isLogin = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
public static void SaveUserList()
|
||||
{
|
||||
ConfigHelper.SaveConfig("user_login_config", UserParamList);
|
||||
}
|
||||
public static void GetUserList()
|
||||
{
|
||||
#region 用户账户记忆功能
|
||||
UserParamList = ConfigHelper.LoadConfig<ConcurrentList<UserParam>>("user_login_config");
|
||||
if (UserParamList == null)
|
||||
UserParamList = new ConcurrentList<UserParam>();
|
||||
#endregion
|
||||
}
|
||||
|
||||
private void btnDeleteItem_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var imgButton = sender as UcImageButton;
|
||||
if (imgButton != null)
|
||||
{
|
||||
var userName = imgButton.Tag.ParseToString();
|
||||
if (!string.IsNullOrEmpty(userName))
|
||||
{
|
||||
UserParamList.RemoveAll(u => u.UserName == userName);
|
||||
SaveUserList();
|
||||
foreach (var item in cmbUserNameMobile.Items.Cast<string>().ToList())
|
||||
{
|
||||
if (item.ParseToString() == userName)
|
||||
{
|
||||
cmbUserNameMobile.Items.Remove(item);
|
||||
}
|
||||
|
||||
}
|
||||
//ShowUserDropDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cmbUserNameMobile_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
var userName = cmbUserNameMobile.SelectedItem.ParseToString();
|
||||
var user = UserParamList.FirstOrDefault(u => u.UserName == userName);
|
||||
if (user != null)
|
||||
{
|
||||
BaseClass.UserName = user.UserName;
|
||||
BaseClass.PassWord = user.PasswordMd5;
|
||||
this.cmbUserNameMobile.Text = user.UserName;
|
||||
this.txtPassword.Password = "******";
|
||||
}
|
||||
}
|
||||
|
||||
private void chkRemember_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BaseClass.Remember = chkRemember.IsChecked.ParseToBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf"
|
||||
xmlns:orderctrls="clr-namespace:_29WxOrderWpf.OrderCtrls"
|
||||
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
mc:Ignorable="d" Style="{StaticResource BaseNoneBorderWindowStyle}"
|
||||
Title="MainWindow" Height="450" Width="800" Loaded="Window_Loaded" Closing="BaseWindow_Closing">
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
<Grid x:Name="gridContainer" Grid.Row="1" Background="White" Margin="2,0,2,2">
|
||||
<orderctrls:OrderListWindow x:Name="OrderListWindow" Visibility="Hidden"></orderctrls:OrderListWindow>
|
||||
</Grid>
|
||||
<uc:UcWindowBoxes VerticalAlignment="Top" HorizontalAlignment="Right" Margin="4" MaxBoxVisibility="Visible"/>
|
||||
<userctrls:UcWindowBoxes VerticalAlignment="Top" HorizontalAlignment="Right" Margin="4" MaxBoxVisibility="Visible"/>
|
||||
</Grid>
|
||||
</basewindows:BaseWindow>
|
||||
@@ -21,6 +21,7 @@ using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
@@ -49,17 +50,12 @@ namespace _29WxOrderWpf
|
||||
new Thread(AutoAntiGrabbingMechanism).Start(); // 反抓包
|
||||
|
||||
#region 弹出登录窗口
|
||||
LoginWindows.LoginWindow loginWindow = new LoginWindows.LoginWindow();
|
||||
LoginWindows.LoginWindow loginWindow = new LoginWindows.LoginWindow(App.args);
|
||||
loginWindow.Owner = this;
|
||||
loginWindow.ShowDialog();
|
||||
#endregion
|
||||
}
|
||||
|
||||
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#region 反抓包功能
|
||||
private void AutoAntiGrabbingMechanism()
|
||||
{
|
||||
@@ -171,5 +167,13 @@ namespace _29WxOrderWpf
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?", "退出微信小店订单管理").DialogResult == true)
|
||||
Process.GetCurrentProcess().Kill();
|
||||
else
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,11 @@ using System.Windows;
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("29WxOrderWpf")]
|
||||
[assembly: AssemblyTitle("29供应连-微信小店订单管理")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("29WxOrderWpf")]
|
||||
[assembly: AssemblyProduct("29供应连-微信小店订单管理")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2026")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
+24
-31
@@ -1,68 +1,61 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace _29WxOrderWpf.Properties
|
||||
{
|
||||
namespace _29WxOrderWpf.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("_29WxOrderWpf.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-16
@@ -1,27 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace _29WxOrderWpf.Properties
|
||||
{
|
||||
namespace _29WxOrderWpf.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,101 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!--使用自定义属性模板去除Button高亮显示框-->
|
||||
<!--<Style TargetType="Button">
|
||||
<Setter Property="Cursor" Value="Hand"></Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
<!--<Style TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<Grid Background="Transparent">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
</ContentPresenter>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
<Style x:Key="BaseButtonStyle" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="buttonBorder" Background="{DynamicResource mainColorBrush}" Cursor="Hand"
|
||||
BorderBrush="{DynamicResource mainColorDarkBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
</ContentPresenter>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="BaseButtonLightStyle" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource mainColorBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="buttonBorder" Background="{DynamicResource mainColorLightBrush}" Cursor="Hand"
|
||||
BorderBrush="{DynamicResource mainColorBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
</ContentPresenter>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" TargetName="buttonBorder" Value="{DynamicResource mainColorDarkBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource mainColorLightBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,322 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!--xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"-->
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!--<SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>-->
|
||||
<SolidColorBrush x:Key="TextBox.Static.Background" Color="Transparent"/>
|
||||
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="AllowDrop" Value="true"/>
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="MinHeight" Value="0"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!--<LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#FFF0F0F0" Offset="0.0"/>
|
||||
<GradientStop Color="#FFE5E5E5" Offset="1.0"/>
|
||||
</LinearGradientBrush>-->
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="#FFACACAC"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#FFABADB3"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.MouseOver.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#FFECF4FC" Offset="0.0"/>
|
||||
<GradientStop Color="#FFDCECFC" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF7EB4EA"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="#FFFFFFFF"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#FF7EB4EA"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#FFEBF4FC" Offset="0.0"/>
|
||||
<GradientStop Color="#FFDCECFC" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.Pressed.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#FFDAECFC" Offset="0.0"/>
|
||||
<GradientStop Color="#FFC4E0FC" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#FF569DE5"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#FFFFFFFF"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#FF569DE5"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#FFDAEBFC" Offset="0.0"/>
|
||||
<GradientStop Color="#FFC4E0FC" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
|
||||
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="ClickMode" Value="Press"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="templateRoot" Background="{StaticResource ComboBox.Static.Background}" BorderBrush="{StaticResource ComboBox.Static.Border}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||
<Border x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
|
||||
<Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
|
||||
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
|
||||
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
|
||||
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
|
||||
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
|
||||
</MultiDataTrigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
|
||||
</Trigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
|
||||
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
|
||||
</MultiDataTrigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
|
||||
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
|
||||
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
|
||||
</MultiDataTrigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
|
||||
</Trigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
|
||||
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
|
||||
</MultiDataTrigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
|
||||
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
|
||||
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
|
||||
</MultiDataTrigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
|
||||
</Trigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
|
||||
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
|
||||
</MultiDataTrigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
|
||||
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Border}"/>
|
||||
<Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}"/>
|
||||
</MultiDataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
|
||||
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
|
||||
<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
||||
<Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
|
||||
<ScrollViewer x:Name="DropDownScrollViewer">
|
||||
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
|
||||
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||
</Canvas>
|
||||
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</theme:SystemDropShadowChrome>
|
||||
</Popup>-->
|
||||
<ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
|
||||
<Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
|
||||
<TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocusWithin" Value="true">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</Trigger>
|
||||
<!--<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
|
||||
<Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
|
||||
<Setter Property="Color" TargetName="shadow" Value="#71000000"/>
|
||||
</Trigger>-->
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<!--<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>-->
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsGrouping" Value="true"/>
|
||||
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
||||
</MultiTrigger>
|
||||
<!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
||||
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
||||
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
||||
</Trigger>-->
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
|
||||
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
|
||||
<!--<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
||||
<Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
|
||||
<ScrollViewer x:Name="DropDownScrollViewer">
|
||||
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
|
||||
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||
</Canvas>
|
||||
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</theme:SystemDropShadowChrome>-->
|
||||
</Popup>
|
||||
<ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
|
||||
<ContentPresenter x:Name="contentPresenter" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
|
||||
<!--<Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>-->
|
||||
<!--<Setter Property="Color" TargetName="shadow" Value="#71000000"/>-->
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<!--<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>-->
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsGrouping" Value="true"/>
|
||||
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
||||
</MultiTrigger>
|
||||
<!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
||||
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
||||
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
||||
</Trigger>-->
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<Style x:Key="BaseCrystalComboBoxStyle" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="Padding" Value="6,3,5,3"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEditable" Value="true">
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="BaseComboBoxStyle" TargetType="ComboBox">
|
||||
<Setter Property="IsEditable" Value="True"></Setter>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ControlTemplate x:Key="ComboBoxTemplate1" TargetType="{x:Type ComboBox}">
|
||||
<Border BorderBrush="Black" BorderThickness="1">
|
||||
<ToggleButton x:Name="toggleButton" ClickMode="Press">
|
||||
<!-- 自定义下拉按钮的外观 -->
|
||||
<ToggleButton.Template>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border Background="LightGray" BorderBrush="Gray" BorderThickness="1" Padding="5">
|
||||
<Path Data="M0,0 L8,8 16,0z" Fill="Black" HorizontalAlignment="Right"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ToggleButton.Template>
|
||||
</ToggleButton>
|
||||
<!-- 省略其他部分以保持简洁 -->
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,27 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style x:Key="BaseTextBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="BasePasswordBoxStyle" TargetType="PasswordBox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -2,53 +2,19 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="BaseWindowStyle" TargetType="Window">
|
||||
<Setter Property="Background" Value="#FF98638f"/>
|
||||
<Setter Property="Foreground" Value="#FF666666"/>
|
||||
<Setter Property="Background" Value="{DynamicResource mainColorBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<!-- 其他样式设置 -->
|
||||
|
||||
</Style>
|
||||
<Style x:Key="BaseNoneBorderWindowStyle" TargetType="Window">
|
||||
<Setter Property="Background" Value="#FF98638f"/>
|
||||
<Setter Property="BorderBrush" Value="#6b5393"/>
|
||||
<Setter Property="Background" Value="{DynamicResource mainColorBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource mainColorDarkBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource mainForegroundColorBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Foreground" Value="#FF666666"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="WindowStyle" Value="None"/>
|
||||
<Setter Property="AllowsTransparency" Value="True"/>
|
||||
</Style>
|
||||
<!--使用自定义属性模板去除Button高亮显示框-->
|
||||
<!--<Style TargetType="Button">
|
||||
<Setter Property="Cursor" Value="Hand"></Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
<!--<Style TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<Grid Background="Transparent">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
</ContentPresenter>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,11 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="mainColorBrush" Color="#FF98638f"/>
|
||||
<SolidColorBrush x:Key="mainColorLightBrush" Color="#f5ebff"/>
|
||||
<SolidColorBrush x:Key="mainColorDarkBrush" Color="#FF6b5393"/>
|
||||
<SolidColorBrush x:Key="mainForegroundColorBrush" Color="#FF666666"/>
|
||||
<LinearGradientBrush x:Key="mainForegroundLinearColorBrush" StartPoint="0,0" EndPoint="1,0" >
|
||||
<GradientStop Color="#FF98638f" Offset="0.0"/>
|
||||
<GradientStop Color="#FF6b5393" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
</ResourceDictionary>
|
||||
@@ -1,5 +1,6 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<BitmapImage x:Key="main29WeixinIcon" UriSource="/Resources/main_29weixin_icon.png"/>
|
||||
<BitmapImage x:Key="imgMin" UriSource="/Resources/WindowBoxes/min.png"/>
|
||||
<BitmapImage x:Key="imgMinHover" UriSource="/Resources/WindowBoxes/min.hover.png"/>
|
||||
<BitmapImage x:Key="imgNormal" UriSource="/Resources/WindowBoxes/normal.png"/>
|
||||
@@ -8,6 +9,7 @@
|
||||
<BitmapImage x:Key="imgMaxHover" UriSource="/Resources/WindowBoxes/max.hover.png"/>
|
||||
<BitmapImage x:Key="imgClose" UriSource="/Resources/WindowBoxes/close.png"/>
|
||||
<BitmapImage x:Key="imgCloseHover" UriSource="/Resources/WindowBoxes/close.hover.png"/>
|
||||
<BitmapImage x:Key="imgCloseGray" UriSource="/Resources/close_gray.png"/>
|
||||
<BitmapImage x:Key="imgBaseMsgErr" UriSource="/Resources/BaseMsgErr.png"/>
|
||||
<BitmapImage x:Key="imgBaseMsgInfo" UriSource="/Resources/BaseMsgInfo.png"/>
|
||||
<BitmapImage x:Key="imgBaseMsgQue" UriSource="/Resources/BaseMsgQue.png"/>
|
||||
|
||||
Reference in new issue
Block a user