コード例 #1
0
        private void LoadTaskbarIcon(TrayIconViewModel trayVm, AuthenticationDialog authDialog)
        {
            trayVm.OnExitApplication         += (s, e) => Application.Current.Shutdown();
            trayVm.OnAuthenticationRequested += (s, e) => authDialog.Show();

            _tb.DataContext = trayVm;
            _tb?.BringIntoView();
        }
コード例 #2
0
        protected override void Load(ContainerBuilder builder)
        {
            builder.Register(c => TrayIconViewModel.Create(c.Resolve <MatrixApp>()));

            builder.RegisterType <AuthenticationDialog>().AsSelf().SingleInstance();
            builder.RegisterType <AuthenticationDialogViewModel>().AsSelf().SingleInstance();

            builder.RegisterType <DialogAuthenticator>().As <IMatrixAuthenticator>().SingleInstance();
        }