Example #1
0
 private void createMapScreenTabItems()
 {
     foreach (var mapImageData in Constants.ALL_MAP_IMAGE_DATA)
     {
         var mapScreen        = new MapScreen(mapImageData);
         var mapScreenTabItem = new TabItem()
         {
             Content = mapScreen,
             Header  = mapImageData.title(),
         };
         _mapScreens.Add(mapScreen);
         mainTabControl.Items.Add(mapScreenTabItem);
     }
 }
Example #2
0
        private Task <bool> preloadImages()
        {
            var tcs = new TaskCompletionSource <bool>();

            Task.Run(() => {
#if !HIDE_MAP_SCREENS
                LevelImagePanel.preload();
                MapScreen.preload(); //This takes a while
#endif
                InventoryScreen.preload();
                SelectionWindow.preload();
                ItemControl.preload();
                tcs.SetResult(true);
            });
            return(tcs.Task);
        }