Commit bcbf2b66 authored by 潘栩锋's avatar 潘栩锋 🚴

Merge remote-tracking branch 'remotes/origin/dev7.0' into dev7.0-filmCasting

parents 00b4f2b1 5ef03bf2
......@@ -62,7 +62,7 @@
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
<DataGrid AlternationCount ="2" AlternatingRowBackground="LightYellow" AutoGenerateColumns="False" Margin="{StaticResource ControlMargin}"
<DataGrid AlternationCount ="2" AlternatingRowBackground="LightGray" AutoGenerateColumns="False" Margin="{StaticResource ControlMargin}"
ItemsSource="{Binding UiLvs}" >
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
......
......@@ -15,9 +15,9 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid TextBlock.FontSize="24" TextBlock.FontStyle="Normal" >
<StackPanel Margin="5,20">
<Grid TextBlock.FontSize="24" TextBlock.FontStyle="Normal" >
<StackPanel Margin="5,20">
<TextBlock x:Name="tbMsg" Margin="5,5,5,30" TextWrapping="Wrap" Text="我是提示信息,平时被隐藏!!!" MaxWidth="450" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
......@@ -30,7 +30,7 @@
<StackPanel Margin="{StaticResource ControlMargin}" Grid.Column="1">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="请输入密码" />
<StackPanel Orientation="Horizontal">
<PasswordBox x:Name="passwordbox" Margin="{StaticResource ControlMargin}"
<PasswordBox x:Name="passwordbox" Margin="{StaticResource ControlMargin}"
Controls:TextBoxHelper.Watermark="请输入密码"
Style="{StaticResource MahApps.Styles.PasswordBox.Win8}" MinWidth="300"/>
<Button Style="{StaticResource Styles.Button.Icon}" Click="ButtonOSK_Click" >
......@@ -40,12 +40,8 @@
</StackPanel>
</Grid>
<Button Style="{StaticResource ButtonStyle2}" Content="确定" Width="Auto" Margin="{StaticResource ControlMargin}" Click="button_apply_Click" />
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</flyctrllib:WindowBigClose>
......@@ -28,11 +28,13 @@ namespace FLY.Thick.Base.UI
{
InitializeComponent();
}
public void Init(PasswordAuthorize passwordAuthorize, int level)
public void Init(PasswordAuthorize passwordAuthorize, int level, string msg=null)
{
this.passwordAuthorize = passwordAuthorize;
this.Level = level;
this.Msg = msg;
}
string Msg = null;
/// <summary>
/// 密码级别
/// </summary>
......@@ -52,13 +54,24 @@ namespace FLY.Thick.Base.UI
return Authorize(uiName, out int pwLv);
}
/// <summary>
///
/// </summary>
/// <param name="uiName"></param>
/// <returns></returns>
public static bool Authorize(string uiName, string msg)
{
return Authorize(uiName, out int pwLv, msg);
}
/// <summary>
///
/// </summary>
/// <param name="uiName">界面</param>
/// <param name="pwLv">当密码正确时,密码的级别</param>
/// <returns></returns>
public static bool Authorize(string uiName, out int pwLv)
public static bool Authorize(string uiName, out int pwLv, string msg=null)
{
pwLv = 0;
//从容器获取
......@@ -72,7 +85,7 @@ namespace FLY.Thick.Base.UI
return true;
WdPassword w = new WdPassword();
w.Init(passwordAuthorize, level);
w.Init(passwordAuthorize, level, msg);
w.Owner = Application.Current.MainWindow;
bool ret = (bool)w.ShowDialog();
pwLv = w.PwLv;
......@@ -160,6 +173,15 @@ namespace FLY.Thick.Base.UI
//从容器获取
//this.DataContext = this;
togglebutton_keep5min.DataContext = mPwKeep;
if (string.IsNullOrEmpty(Msg))
{
tbMsg.Visibility = Visibility.Collapsed;
}
else {
tbMsg.Text = Msg;
}
if (mPwKeep.GetPSK(out string psk))
{
passwordbox.Password = psk;
......
......@@ -331,9 +331,7 @@ namespace SQLite
return;//no datas
DateTime curr_month = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
int curr_total_month = curr_month.Year * 12 + curr_month.Month;
int limit_total_month = curr_total_month - month;
DateTime limit_month = new DateTime( limit_total_month/12, limit_total_month % 12, 1);
DateTime limit_month = curr_month.AddMonths(-month);
DateTime start_month = firstTimes.Min();
start_month = new DateTime(start_month.Year, start_month.Month, 1);
if (start_month < limit_month)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment