예제 #1
0
        public WriteableBitmap getWideBmp()
        {
            Settings appSettings = new Settings();
            string   type        = appSettings.getSettingsString(appSettings.TileType);

            if (type == "Defualt")
            {
                var customTile = new BatteryLarge();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (type == "Vertical")
            {
                var customTile = new VerticalWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (type == "Traditional")
            {
                var customTile = new TraditionalWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (type == "Domo")
            {
                var customTile = new DomoWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (type == "Simple")
            {
                var customTile = new SimpleWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            return(new WriteableBitmap(697, 365));
        }
예제 #2
0
        public WriteableBitmap getWideBmp()
        {
            IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;

            if (!settings.Contains("active"))
            {
                settings.Add("active", "Stars");
            }

            if (settings["active"].ToString() == "Glow")
            {
                var customTile = new GlowWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Modern")
            {
                var customTile = new ModernWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Modern 2")
            {
                var customTile = new Modern2Wide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Idea")
            {
                var customTile = new IdeaWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Simple")
            {
                var customTile = new SimpleWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Analog")
            {
                var customTile = new AnalogWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Domo")
            {
                var customTile = new DomoWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Decimal")
            {
                var customTile = new DecimalWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Sunshine")
            {
                var customTile = new SunshineWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Zaag")
            {
                var customTile = new ZaagWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "CMD")
            {
                var customTile = new CmdWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Poki")
            {
                var customTile = new PokiWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Fade")
            {
                var customTile = new FadeWide();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);
                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else if (settings["active"].ToString() == "Digital")
            {
                var customTile = new DigitalWide();

                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));


                var bmp = new WriteableBitmap(691, 365);

                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
            else
            {
                var customTile = new NoTile();
                customTile.Measure(new Size(691, 336));
                customTile.Arrange(new Rect(0, 0, 691, 336));

                var bmp = new WriteableBitmap(691, 365);

                bmp.Render(customTile, null);
                bmp.Invalidate();
                return(bmp);
            }
        }