Пример #1
0
        public ConsignmentShop(IDataSource pDataSource, Profits pProfit, NewStoreItems pNewItems)
        {
            InitializeComponent();

            dataSource = pDataSource;
            profit     = pProfit;
            newItems   = pNewItems;
        }
Пример #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // composition root
            //IDataSource dataSource = new DummyData();
            IDataSource   dataSource = new XmlData();
            Profits       profit     = new Profits();
            NewStoreItems newItems   = new NewStoreItems();

            var form = new ConsignmentShop(dataSource, profit, newItems);

            // run your logic
            Application.Run(form);
        }