Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WpfTileHandler"/> class.
        /// </summary>
        /// <param name="apiHandler">The apiHandler<see cref="IApiHandler"/></param>
        /// <param name="appData">The appData<see cref="AppData"/></param>
        public WpfTileHandler(IApiHandler apiHandler, AppData appData)
        {
            this.apiHandler           = apiHandler;
            this.activeAssetTiles     = new List <IAssetTile>();
            this.activePortfolioTiles = new List <IPortfolioTile>();
            this.unattachedAssetTiles = new List <IAssetTile>();
            this.appData = appData;
            this.random  = new Random();
            this.portfolioTileSettingsWindowActive = false;

            this.OpenLoadedAssetTiles();
            this.OpenLoadedPortfolioTiles();

            apiLoader.OnApiLoaderError += this.ApiLoader_OnApiLoaderError;
            apiHandler.OnApiLoaded     += this.ApiHandler_OnApiLoaded;
            apiHandler.LoadApis();
        }