private static void UpdateThemeSet()
 {
     Theming.ThemeSet currentThemeSet = Theming._currentThemeSet;
     if (currentThemeSet == Theming.ThemeSet.Error)
     {
         Theming.SetErrorTheme();
         return;
     }
     if (currentThemeSet != Theming.ThemeSet.Connected)
     {
         Theming.SetRegularTheme();
         return;
     }
     Theming.SetProfileTheme();
 }
 public void InitTrayIcons()
 {
     IconHelpers.DisabledIcon           = new Icon(Theming.GetThemedImage("Icons\\Default\\Disabled.ico"));
     IconHelpers.RegularIcon            = new Icon(Theming.GetThemedImage("Icons\\Default\\Regular.ico"));
     IconHelpers.CensorConnectingIcon   = new Icon(Theming.GetThemedImage("Icons\\Default\\CensorConnecting.ico"));
     IconHelpers.CensorConnectedIcon    = new Icon(Theming.GetThemedImage("Icons\\Default\\CensorOn.ico"));
     IconHelpers.CustomConnectingIcon   = new Icon(Theming.GetThemedImage("Icons\\Default\\CustomConnecting.ico"));
     IconHelpers.CustomConnectedIcon    = new Icon(Theming.GetThemedImage("Icons\\Default\\CustomOn.ico"));
     IconHelpers.DownloadConnectingIcon = new Icon(Theming.GetThemedImage("Icons\\Default\\DownloadConnecting.ico"));
     IconHelpers.DownloadConnectedIcon  = new Icon(Theming.GetThemedImage("Icons\\Default\\DownloadOn.ico"));
     IconHelpers.SurfConnectingIcon     = new Icon(Theming.GetThemedImage("Icons\\Default\\SurfConnecting.ico"));
     IconHelpers.SurfConnectedIcon      = new Icon(Theming.GetThemedImage("Icons\\Default\\SurfOn.ico"));
     IconHelpers.UnblockConnectingIcon  = new Icon(Theming.GetThemedImage("Icons\\Default\\UnblockConnecting.ico"));
     IconHelpers.UnblockConnectedIcon   = new Icon(Theming.GetThemedImage("Icons\\Default\\UnblockOn.ico"));
     IconHelpers.WifiConnectingIcon     = new Icon(Theming.GetThemedImage("Icons\\Default\\WifiConnecting.ico"));
     IconHelpers.WifiConnectedIcon      = new Icon(Theming.GetThemedImage("Icons\\Default\\WifiOn.ico"));
 }
        private static void SetProfileTheme()
        {
            string text = string.Empty;
            string connectedProfileName = SettingsHolder.get_Settings().get_ConnectedProfileName();
            uint   num = < PrivateImplementationDetails >.ComputeStringHash(connectedProfileName);

            if (num <= 1377339077u)
            {
                if (num != 120087624u)
                {
                    if (num != 542584942u)
                    {
                        if (num == 1377339077u)
                        {
                            if (connectedProfileName == "network")
                            {
                                text = "Network";
                            }
                        }
                    }
                    else if (connectedProfileName == "custom")
                    {
                        text = "Custom";
                    }
                }
                else if (connectedProfileName == "wifi")
                {
                    text = "Wifi";
                }
            }
            else if (num <= 1879243226u)
            {
                if (num != 1741922751u)
                {
                    if (num == 1879243226u)
                    {
                        if (connectedProfileName == "anonymousDownloading")
                        {
                            text = "AnonymousDownloading";
                        }
                    }
                }
                else if (connectedProfileName == "unblock")
                {
                    text = "Unblock";
                }
            }
            else if (num != 2687971255u)
            {
                if (num == 2889374611u)
                {
                    if (connectedProfileName == "antiCensor")
                    {
                        text = "Uncensoring";
                    }
                }
            }
            else if (connectedProfileName == "anonymousBrowsing")
            {
                text = "AnonymousBrowsing";
            }
            if (!string.IsNullOrEmpty(text))
            {
                AppearanceManager.get_Current().set_ThemeSource(new Uri(string.Format("{0}ModernUI.CyberGhost.Connected.{1}.xaml", Theming.GetThemeFolder(), text), UriKind.Relative));
                return;
            }
            AppearanceManager.get_Current().set_ThemeSource(new Uri(string.Format("{0}ModernUI.CyberGhost.xaml", Theming.GetThemeFolder()), UriKind.Relative));
        }
 private static void SetRegularTheme()
 {
     AppearanceManager.get_Current().set_ThemeSource(new Uri(string.Format("{0}ModernUI.CyberGhost.xaml", Theming.GetThemeFolder()), UriKind.Relative));
 }