Beispiel #1
0
        /// <summary>
        /// Binds data contexts ASAP to prevent flickering.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            UpdateSettings();                                            // migrate settings over from older Priceall version
            Task.Run(async() => { await FlagsHelper.CheckAllFlags(); }); // update flag values in settings

            DataContext = _styleBinding;
            AppraisalInfo.DataContext     = _infoBinding;
            AppraisalControls.DataContext = _controlsBinding;

            // subscribe settings events
            Instance.AutoRefreshToggled += ToggleAutoRefresh;
            Instance.PriceColorChanged  += RefreshPriceColor;
            Instance.QueryHotkeyUpdated += UpdateQueryHotkey;
            Instance.SettingsReset      += ResetSettings;
        }