public Auth()
 {
     InitializeComponent();
     _logger = Registry.GetValue <Logger>();
     _clientToBackOfServers = Registry.GetValue <ClientToBack>();
     _clientToPrint         = Registry.GetValue <PrintGoClient>();
 }
        public MainWindow()
        {
            InitializeComponent();
            var builder = new ConfigurationBuilder()
                          // .SetBasePath(Directory.GetCurrentDirectory())
                          .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

            IConfigurationRoot configuration = builder.Build();

            _clientToBackOfServers = new ClientToBack(
                configuration.GetSection("appSettings:serviceDomain").Value
                // configuration.GetSection("appSettings:printControllerHost").Value
                );

            var printClient = new PrintGoClient(
                configuration.GetSection("appSettings:printControllerHost").Value
                );

            var logger = new LoggerConfiguration()
                         .WriteTo.Console(theme: SystemConsoleTheme.Colored)
                         .WriteTo.File("logs.log")
                         .MinimumLevel.Verbose()
                         .CreateLogger();

            Registry.Public(_clientToBackOfServers);
            Registry.Public(logger);
            Registry.Public(printClient);
            Registry <WebBrowser, WebBrowser> .Public(new WebBrowser());

            Registry <Frame, MainWindow> .Public(this);

            this.Content = new Auth();
        }
        public Welcome()
        {
            InitializeComponent();

            var user = Registry <UserInfo, UserInfo> .Get();

            textBlockBalance.Text  = $"{user.Balance.ToString()} ₽";
            _clientToPrint         = Registry.GetValue <PrintGoClient>();
            _clientToBackOfServers = Registry.GetValue <ClientToBack>();
        }