Exemplo n.º 1
0
        //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\
        #region --Set-, Get- Methods--
        private void SetImageScale()
        {
            if (ROOT_FRAME.ActualWidth == 0 || ROOT_FRAME.ActualHeight == 0)
            {
                return;
            }

            if (ROOT_FRAME.ActualWidth >= 3000 || ROOT_FRAME.ActualHeight >= 3000)
            {
                if (curImageScale != SplashScreenImageScale.HUGE)
                {
                    background_img.Source = new BitmapImage(new Uri("ms-appx:///Assets/Images/SplashScreen/splash_screen_4000.png", UriKind.Absolute));
                    logo_img.Source       = new BitmapImage(new Uri("ms-appx:///Assets/SplashScreen.scale-400.png", UriKind.Absolute));
                    curImageScale         = SplashScreenImageScale.HUGE;
                }
            }
            else if (ROOT_FRAME.ActualWidth >= 2000 || ROOT_FRAME.ActualHeight >= 2000)
            {
                if (curImageScale != SplashScreenImageScale.LARGE)
                {
                    background_img.Source = new BitmapImage(new Uri("ms-appx:///Assets/Images/SplashScreen/splash_screen_3000.png", UriKind.Absolute));
                    logo_img.Source       = new BitmapImage(new Uri("ms-appx:///Assets/SplashScreen.scale-200.png", UriKind.Absolute));
                    curImageScale         = SplashScreenImageScale.LARGE;
                }
            }
            else if (ROOT_FRAME.ActualWidth >= 1000 || ROOT_FRAME.ActualHeight >= 1000)
            {
                if (curImageScale != SplashScreenImageScale.MEDIUM)
                {
                    background_img.Source = new BitmapImage(new Uri("ms-appx:///Assets/Images/SplashScreen/splash_screen_2000.png", UriKind.Absolute));
                    logo_img.Source       = new BitmapImage(new Uri("ms-appx:///Assets/SplashScreen.scale-150.png", UriKind.Absolute));
                    curImageScale         = SplashScreenImageScale.MEDIUM;
                }
            }
            else if (ROOT_FRAME.ActualWidth >= 800 || ROOT_FRAME.ActualHeight >= 800)
            {
                if (curImageScale != SplashScreenImageScale.SMALL)
                {
                    background_img.Source = new BitmapImage(new Uri("ms-appx:///Assets/Images/SplashScreen/splash_screen_1000.png", UriKind.Absolute));
                    logo_img.Source       = new BitmapImage(new Uri("ms-appx:///Assets/SplashScreen.scale-125.png", UriKind.Absolute));
                    curImageScale         = SplashScreenImageScale.SMALL;
                }
            }
            else
            {
                if (curImageScale != SplashScreenImageScale.TINY)
                {
                    background_img.Source = new BitmapImage(new Uri("ms-appx:///Assets/Images/SplashScreen/splash_screen_800.png", UriKind.Absolute));
                    logo_img.Source       = new BitmapImage(new Uri("ms-appx:///Assets/SplashScreen.scale-100.png", UriKind.Absolute));
                    curImageScale         = SplashScreenImageScale.TINY;
                }
            }
        }
        //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\
        #region --Set-, Get- Methods--
        private void SetImageScale()
        {
            if (ROOT_FRAME.ActualWidth == 0 || ROOT_FRAME.ActualHeight == 0)
            {
                return;
            }

            if (ROOT_FRAME.ActualWidth >= 3000 || ROOT_FRAME.ActualHeight >= 3000)
            {
                if (curImageScale != SplashScreenImageScale.HUGE)
                {
                    curImageScale = SplashScreenImageScale.HUGE;
                }
            }
            else if (ROOT_FRAME.ActualWidth >= 2000 || ROOT_FRAME.ActualHeight >= 2000)
            {
                if (curImageScale != SplashScreenImageScale.LARGE)
                {
                    curImageScale = SplashScreenImageScale.LARGE;
                }
            }
            else if (ROOT_FRAME.ActualWidth >= 1000 || ROOT_FRAME.ActualHeight >= 1000)
            {
                if (curImageScale != SplashScreenImageScale.MEDIUM)
                {
                    curImageScale = SplashScreenImageScale.MEDIUM;
                }
            }
            else if (ROOT_FRAME.ActualWidth >= 800 || ROOT_FRAME.ActualHeight >= 800)
            {
                if (curImageScale != SplashScreenImageScale.SMALL)
                {
                    curImageScale = SplashScreenImageScale.SMALL;
                }
            }
            else if (curImageScale != SplashScreenImageScale.TINY)
            {
                curImageScale = SplashScreenImageScale.TINY;
            }
        }