...
// Command
var printCommand = new ShowCargoLabelPrintWindowCommand(labelService);
var host = Host.CreateDefaultBuilder()
.ConfigureServices(services =>
{
...
services.AddSingleton<ShowCargoLabelPrintWindowCommand>(printCommand);
})
.Build();
<Button Command="{Binding Source={x:Static c:CommonCommands.ShowCargoLabelPrintWindowCommand}}" CommandParameter="{Binding Cargo}" Content="Печать этикетки грузоместа" Margin="5" Padding="0,5" Style="{DynamicResource printCargoLabelButtonStyle}"/>
<Button Command="{Binding Source={x:Static local:ApplicationHost.GetCommand<ShowCargoLabelPrintWindowCommand>()}}" CommandParameter="{Binding Cargo}"/>
[AttributeUsage(AttributeTargets.Method)]
public class ThrowableAttribute : Attribute
{
}
void BtnCreate_Click(object? sender, EventArgs e)
{
/// Получаю интерфейсную ссылку на экземпляр формы. Для этого передаю
/// в метод ссылку на вью-модель (_ctx). Конечно, я мог бы во все вью-
/// модели запихнуть логику получения форм, но это бы грубо нарушило
/// принцип единой ответственности для вью-моделей.
using IDependableForm form = FormsFactory.GetCreateForm(_ctx);
/// Подписываюсь на событие закрытия формы, чтобы определенным
/// образом изменить состояние компонента.
form.OnFormClosing += DependableForm_Closing;
/// Показываю форму модально, чтобы не усложнять приложение попыткой
/// отследить родителя.
form.ShowAsModal();
}
SELECT 23/3;
void InputContainerFormControl_Disposed(object? sender, EventArgs e)
{
if (_ctx != null)
{
_ctx.FormContextChangedByUser -= Ctx_FormContextChangedByUser;
}
}
yum install perl
dnf --enablerepo=ol9_codeready_builder install perl-IPC-Run
yum install postgresql15-contrib
[root@pg-dev pgtap-1.2.0]# yum install postgresql14-devel
Last metadata expiration check: 15:53:08 ago on Thu Apr 27 00:40:38 2023.
Package postgresql14-devel-14.7-1PGDG.rhel9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@pg-dev pgtap-1.2.0]# yum install postgresql15-devel
Last metadata expiration check: 15:53:19 ago on Thu Apr 27 00:40:38 2023.
Error:
Problem: cannot install the best candidate for the job
- nothing provides perl(IPC::Run) needed by postgresql15-devel-15.2-1PGDG.rhel9.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@pg-dev pgtap-1.2.0]#