private void CreateTiles()
        {
            this.DeviceTileControl.TileButtons.Clear();
            if (ObjectHolder.CurrentUser == null)
            {
                return;
            }
            TileButton expr_1D = new TileButton();

            expr_1D.Tag     = "ios";
            expr_1D.Content = CyberGhost.Translations.Home.HeadlineManageDevicesIos;
            expr_1D.set_TileDescription(CyberGhost.Translations.Home.ContentManageDevicesIos);
            expr_1D.set_TileImageSource(this._iosLogoUri);
            expr_1D.set_TileBaseColor((Color)base.FindResource("DeviceTileBackgroundColor"));
            expr_1D.set_TileGradientColor((Color)base.FindResource("DeviceTileBackgroundGradient"));
            expr_1D.set_ImageStyle(base.FindResource("DeviceTileImage") as Style);
            TileButton tileButton = expr_1D;

            tileButton.Click += new RoutedEventHandler(this.OsTile_Click);
            this.DeviceTileControl.TileButtons.Add(tileButton);
            TileButton expr_B5 = new TileButton();

            expr_B5.Tag     = "macos";
            expr_B5.Content = CyberGhost.Translations.Home.HeadlineManageDeviceMacOs;
            expr_B5.set_TileDescription(CyberGhost.Translations.Home.ContentManageDeviceMacOs);
            expr_B5.set_TileImageSource(this._macosLogoUri);
            expr_B5.set_TileBaseColor((Color)base.FindResource("DeviceTileBackgroundColor"));
            expr_B5.set_TileGradientColor((Color)base.FindResource("DeviceTileBackgroundGradient"));
            expr_B5.set_ImageStyle(base.FindResource("DeviceTileImage") as Style);
            TileButton tileButton2 = expr_B5;

            tileButton2.Click += new RoutedEventHandler(this.OsTile_Click);
            this.DeviceTileControl.TileButtons.Add(tileButton2);
            TileButton expr_14D = new TileButton();

            expr_14D.Tag     = "windows";
            expr_14D.Content = CyberGhost.Translations.Home.HeadlineManageDeviceWin;
            expr_14D.set_TileDescription(CyberGhost.Translations.Home.ContentManageDeviceWin);
            expr_14D.set_TileImageSource(this._windowsLogoUri);
            expr_14D.set_TileBaseColor((Color)base.FindResource("DeviceTileBackgroundColor"));
            expr_14D.set_TileGradientColor((Color)base.FindResource("DeviceTileBackgroundGradient"));
            expr_14D.set_ImageStyle(base.FindResource("DeviceTileImage") as Style);
            TileButton tileButton3 = expr_14D;

            tileButton3.Click += new RoutedEventHandler(this.OsTile_Click);
            this.DeviceTileControl.TileButtons.Add(tileButton3);
            TileButton expr_1E5 = new TileButton();

            expr_1E5.Tag     = "android";
            expr_1E5.Content = CyberGhost.Translations.Home.HeadlineManageDeviceAndroid;
            expr_1E5.set_TileDescription(CyberGhost.Translations.Home.ContentManageDeviceAndroid);
            expr_1E5.set_TileImageSource(this._androidLogoUri);
            expr_1E5.set_TileBaseColor((Color)base.FindResource("DeviceTileBackgroundColor"));
            expr_1E5.set_TileGradientColor((Color)base.FindResource("DeviceTileBackgroundGradient"));
            expr_1E5.set_ImageStyle(base.FindResource("DeviceTileImage") as Style);
            TileButton tileButton4 = expr_1E5;

            tileButton4.Click += new RoutedEventHandler(this.OsTile_Click);
            this.DeviceTileControl.TileButtons.Add(tileButton4);
            TileButton expr_27D = new TileButton();

            expr_27D.Tag     = "custom";
            expr_27D.Content = CyberGhost.Translations.Home.HeadlineManageDeviceLinux;
            expr_27D.set_TileDescription(CyberGhost.Translations.Home.ContentManageDeviceLinux);
            expr_27D.set_TileImageSource(this._otherLogoUri);
            expr_27D.set_TileBaseColor((Color)base.FindResource("DeviceTileBackgroundColor"));
            expr_27D.set_TileGradientColor((Color)base.FindResource("DeviceTileBackgroundGradient"));
            expr_27D.set_ImageStyle(base.FindResource("DeviceTileImage") as Style);
            TileButton tileButton5 = expr_27D;

            tileButton5.Click += new RoutedEventHandler(this.OsTile_Click);
            this.DeviceTileControl.TileButtons.Add(tileButton5);
        }
Example #2
0
        private void CreateTiles()
        {
            this.TileLayoutCtrl.TileButtons.Clear();
            this._mWifiTile = null;
            if (ObjectHolder.CurrentUser == null)
            {
                return;
            }
            TileButton expr_24 = new TileButton();

            expr_24.Tag     = "AnonBrows";
            expr_24.Content = ((Theming.CurrentTheme == Theming.Theme.Pro) ? CyberGhost.Translations.Home.GhostBrowsing : CyberGhost.Translations.Home.HeadlinePrivateBrowsing);
            expr_24.set_TileDescription(CyberGhost.Translations.Home.ContentPrivateBrowsing);
            expr_24.set_TileImageSource(ObjectHolder.CurrentUser.HasUserAccessToFeature(13) ? this._freeImageAnonSurf : this._premiumImageAnonSurf);
            expr_24.set_TileBaseColor((Color)base.FindResource("BaseColorYellow"));
            expr_24.set_TileGradientColor((Color)base.FindResource("BaseColorYellowGradient"));
            TileButton tileButton = expr_24;
            TileButton expr_A8    = new TileButton();

            expr_A8.Tag     = "AnonDown";
            expr_A8.Content = ((Theming.CurrentTheme == Theming.Theme.Pro) ? CyberGhost.Translations.Home.GhostDownloads : CyberGhost.Translations.Home.HeaderAnonDownloading);
            expr_A8.set_TileDescription(CyberGhost.Translations.Home.ContentAnonDownloading);
            expr_A8.set_TileImageSource(ObjectHolder.CurrentUser.HasUserAccessToFeature(18) ? this._freeImageAnonDownload : this._premiumImageAnonDownload);
            expr_A8.set_TileBaseColor((Color)base.FindResource("BaseColorPurple"));
            expr_A8.set_TileGradientColor((Color)base.FindResource("BaseColorPurpleGradient"));
            TileButton tileButton2 = expr_A8;
            TileButton expr_12C    = new TileButton();

            expr_12C.Tag     = "Unblock";
            expr_12C.Content = ((Theming.CurrentTheme == Theming.Theme.Pro) ? CyberGhost.Translations.Home.GhostStreaming : CyberGhost.Translations.Home.HeaderUnblock);
            expr_12C.set_TileDescription(CyberGhost.Translations.Home.ContentUnblock);
            expr_12C.set_TileImageSource(ObjectHolder.CurrentUser.HasUserAccessToFeature(12) ? this._freeImageUnblock : this._premiumImageUnblock);
            expr_12C.set_TileBaseColor((Color)base.FindResource("BaseColorRed"));
            expr_12C.set_TileGradientColor((Color)base.FindResource("BaseColorRedGradient"));
            TileButton tileButton3 = expr_12C;
            TileButton expr_1B0    = new TileButton();

            expr_1B0.Tag     = "Anti";
            expr_1B0.Content = ((Theming.CurrentTheme == Theming.Theme.Pro) ? CyberGhost.Translations.Home.GhostAntiCensor : CyberGhost.Translations.Home.HeaderAnti);
            expr_1B0.set_TileDescription(CyberGhost.Translations.Home.ContentAnti);
            expr_1B0.set_TileImageSource(ObjectHolder.CurrentUser.HasUserAccessToFeature(14) ? this._freeImageAntiCensor : this._premiumImageAntiCensor);
            expr_1B0.set_TileBaseColor((Color)base.FindResource("BaseColorDarkBlue"));
            expr_1B0.set_TileGradientColor((Color)base.FindResource("BaseColorDarkBlueGradient"));
            TileButton tileButton4 = expr_1B0;
            TileButton expr_234    = new TileButton();

            expr_234.Tag     = "NetworkTile";
            expr_234.Content = ((Theming.CurrentTheme == Theming.Theme.Pro) ? CyberGhost.Translations.Home.GhostNetwork : CyberGhost.Translations.Home.HeaderProtection);
            expr_234.set_TileDescription(CyberGhost.Translations.Home.ContentProtection);
            expr_234.set_TileImageSource(ObjectHolder.CurrentUser.HasUserAccessToFeature(11) ? this._freeImageNetwork : this._premiumImageNetwork);
            expr_234.set_TileBaseColor((Color)base.FindResource("BaseColorBlue"));
            expr_234.set_TileGradientColor((Color)base.FindResource("BaseColorBlueGradient"));
            TileButton tileButton5 = expr_234;
            TileButton expr_2B9    = new TileButton();

            expr_2B9.Tag     = "Custom";
            expr_2B9.Content = ((Theming.CurrentTheme == Theming.Theme.Pro) ? CyberGhost.Translations.Home.GhostPro : CyberGhost.Translations.Home.HeaderCustom);
            expr_2B9.set_TileDescription(CyberGhost.Translations.Home.CustomText);
            expr_2B9.set_TileImageSource(ObjectHolder.CurrentUser.HasUserAccessToFeature(16) ? this._freeImageCustom : this._premiumImageCustom);
            expr_2B9.set_TileBaseColor((Color)base.FindResource("BaseColorMagenta"));
            expr_2B9.set_TileGradientColor((Color)base.FindResource("BaseColorMagentaGradient"));
            TileButton tileButton6 = expr_2B9;

            tileButton.Click  += new RoutedEventHandler(this.Tile_Click);
            tileButton2.Click += new RoutedEventHandler(this.Tile_Click);
            tileButton3.Click += new RoutedEventHandler(this.Tile_Click);
            tileButton4.Click += new RoutedEventHandler(this.Tile_Click);
            tileButton5.Click += new RoutedEventHandler(this.Tile_Click);
            tileButton6.Click += new RoutedEventHandler(this.Tile_Click);
            this.TileLayoutCtrl.TileButtons.Add(tileButton);
            this.TileLayoutCtrl.TileButtons.Add(tileButton3);
            this.TileLayoutCtrl.TileButtons.Add(tileButton5);
            this.TileLayoutCtrl.TileButtons.Add(tileButton2);
            this.TileLayoutCtrl.TileButtons.Add(tileButton4);
            this.TileLayoutCtrl.TileButtons.Add(tileButton6);
            this._mWifiTile = tileButton5;
        }