示例#1
0
        public TipOfTheDayWindow(TipCalculator tipCalculator)
        {
            InitializeComponent();
            Owner            = System.Windows.Application.Current.MainWindow;
            _tipViewModel    = new TipViewModel();
            this.DataContext = _tipViewModel;

            _tipCalculator     = tipCalculator;
            _tipHistoryManager = tipCalculator.TipHistoryManager;
            _tipManager        = tipCalculator.TipManager;

            PopulateDefaultImages();
        }
示例#2
0
        public TipOfTheDayWindow(TipCalculator tipCalculator)
        {
            InitializeComponent();
            Owner            = Application.Current.MainWindow;
            _tipViewModel    = new TipViewModel();
            this.DataContext = _tipViewModel;

            _tipCalculator     = tipCalculator;
            _tipHistoryManager = tipCalculator.TipHistoryManager;
            _tipManager        = tipCalculator.TipManager;

            // Initialize UI
            InitializeUIComponents();
        }