更新库文件c4605ac,优化登录请求和等待窗体。

当进入ReadOnly模式时,MainView屏蔽键盘输入,其它视图不在针对ReadOnly模式专门屏蔽键盘输入问题。
This commit is contained in:
SL 2023-09-22 17:50:40 +08:00
parent 433c16aa3a
commit 711c90a0cc
6 changed files with 21 additions and 5 deletions

View File

@ -1126,7 +1126,11 @@
</Grid>
</Border>
</Grid>
<Grid Grid.Row="1" Background="{DynamicResource MainArea_BG}" IsHitTestVisible="{Binding IsReadOnlyMode, Converter={StaticResource BoolReverseConverter}}">
<Grid Grid.Row="1"
x:Name="GdContentContainer"
Background="{DynamicResource MainArea_BG}"
IsHitTestVisible="{Binding IsReadOnlyMode, Converter={StaticResource BoolReverseConverter}}"
PreviewKeyDown="GdContentContainer_OnPreviewKeyDown">
<Border Visibility="{Binding IsEngMode, Converter={StaticResource WatermarkVisibilityConverter}}">
<Border.Background>
<ImageBrush ImageSource="/Resources/Images/interlock_bypass_watermark.png"

View File

@ -33,6 +33,13 @@ namespace SicUI.Client
{
}
private void GdContentContainer_OnPreviewKeyDown(object sender, KeyEventArgs e)
{
// 如果禁用了鼠标输入,同时禁用键盘输入范德萨范德萨
if (!GdContentContainer.IsHitTestVisible)
e.Handled = true;
}
}
public class CollectionLastIndexConverter : IValueConverter

View File

@ -148,7 +148,7 @@ namespace SicUI.Client
BaseApp.Instance.UserMode = UserMode.ReadOnly;
// 通知RecipeEditor视图或PMProcess视图锁定Recipe
_eventAggregator.PublishOnUIThread(CommonAggregatedEvents.EnterReadOnlyMode);
_eventAggregator.PublishOnUIThread(CommonAggregateEvents.EnterReadOnlyMode);
}
}
}
@ -944,11 +944,10 @@ namespace SicUI.Client
if (retDlg == true)
{
AccountClient.Instance.Service.ConfirmLoginRequest(retKeepAlive.RequestingCredential.AccountInfo.LoginName);
Logoff();
IsReadOnlyMode = true;
// 降级为仅查看模式
IsReadOnlyMode = true;
BaseApp.Instance.UserContext.Role = role;
BaseApp.Instance.UserContext.Credential = Credential.ReadOnlyOne;
}

View File

@ -5,13 +5,19 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SicUI"
mc:Ignorable="d"
ResizeMode="NoResize"
ResizeMode="CanResize"
WindowStyle="None"
WindowStartupLocation="CenterScreen"
Title="Sic GE" Height="510" Width="850"
Background="Transparent"
AllowsTransparency="True"
SnapsToDevicePixels="True">
<WindowChrome.WindowChrome>
<WindowChrome ResizeBorderThickness="0" CaptionHeight="0"/>
</WindowChrome.WindowChrome>
<Window.Effect>
<DropShadowEffect Color="Gray" BlurRadius="20" Direction="-90" RenderingBias="Quality" ShadowDepth="10"/>
</Window.Effect>
<Grid >
<Image Source="/Resources/Images/Splash.png" Stretch="Fill" />
<TextBlock