예제 #1
0
파일: Core.cs 프로젝트: Mvoron7/LogHelper
        internal Core(WPF adapter, DataContainer dataContainer, ReaderFactory factory)
        {
            Logger.Log("Core start");
            _adapter       = adapter;
            _dataContainer = dataContainer;
            _factory       = factory;

            ReaderDescription[] descriptions = _factory.GetDescriptions();
            _adapter.SetAvailableReaders(descriptions);

            Logger.Log("Core done");
        }
예제 #2
0
        private void Window_Loaded(object sender, EventArgs e)
        {
            try
            {
                // Зависимости
                IConfiguration configuration = Conficurated();
                WorkWindow     workWindow    = new WorkWindow();
                WPF            adapter       = new WPF(workWindow);
                DataContainer  dataContainer = new DataContainer();
                ReaderFactory  factory       = new ReaderFactory(configuration.GetSection("Readers"));
                Core           core          = new Core(adapter, dataContainer, factory);
                workWindow.BindCallBack(core);

                Hide();
                workWindow.Show();
            }
            catch (Exception ex)
            {
                Logger.Log(ex, "");
            }
            Close();
        }