コード例 #1
0
        /// <summary>
        /// Called when a selection of the station has changed.
        /// </summary>
        private void onStationChanged(object sender, EventArgs e)
        {
            // Builds a new preview bitmap and set it to the picture box
            PreviewDrawer drawer;

            drawer = new PreviewDrawer(stationPicture.ClientSize, selectedStation.size);
            drawer.drawCenter(selectedStation.sprites);

            if (stationPreviewBitmap != null)
            {
                stationPreviewBitmap.Dispose();
            }
            stationPicture.Image = stationPreviewBitmap = drawer.createBitmap();

            drawer.Dispose();

            updateAlphaSprites();
        }