/// <summary> /// Constructs an authorize url. /// </summary> public static string BuildAuthorizeUrl( string clientId, string redirectUrl, IEnumerable<string> scopes, ResponseType responseType, DisplayType display, ThemeType theme, string locale, string state) { Debug.Assert(!string.IsNullOrEmpty(clientId)); Debug.Assert(!string.IsNullOrEmpty(redirectUrl)); Debug.Assert(!string.IsNullOrEmpty(locale)); IDictionary<string, string> options = new Dictionary<string, string>(); options[AuthConstants.ClientId] = clientId; options[AuthConstants.Callback] = redirectUrl; options[AuthConstants.Scope] = BuildScopeString(scopes); options[AuthConstants.ResponseType] = responseType.ToString().ToLowerInvariant(); options[AuthConstants.Display] = display.ToString().ToLowerInvariant(); options[AuthConstants.Locale] = locale; options[AuthConstants.ClientState] = EncodeAppRequestState(state); if (theme != ThemeType.None) { options[AuthConstants.Theme] = theme.ToString().ToLowerInvariant(); } return BuildAuthUrl(AuthEndpointsInfo.AuthorizePath, options); }
public static void ApplyTheme(this ContentControl control, ThemeType theme) { ResourceDictionary dictionary = ThemeManager.GetThemeResourceDictionary(theme); if (dictionary != null) { control.Resources.MergedDictionaries.Clear(); control.Resources.MergedDictionaries.Add(dictionary); } }
public static void ApplyTheme(this Application app, ThemeType theme) { ResourceDictionary dictionary = ThemeManager.GetThemeResourceDictionary(theme); if (dictionary != null) { app.Resources.MergedDictionaries.Clear(); app.Resources.MergedDictionaries.Add(dictionary); } }
/// <summary> /// Update chart theme. /// |切换内置主题。 /// </summary> /// <param name="theme">theme</param> public bool UpdateTheme(ThemeType theme) { if (theme == ThemeType.Custom) { Debug.LogError("UpdateTheme: not support switch to Custom theme."); return(false); } if (m_Theme.sharedTheme == null) { m_Theme.sharedTheme = XCThemeMgr.GetTheme(ThemeType.Default); } m_Theme.sharedTheme.CopyTheme(theme); return(true); }
public static void Apply(ResourceDictionary appResource, ThemeType themeType) { string themeUri; switch (themeType) { default: case ThemeType.FlatTheme: themeUri = FlatTheme; break; } ApplyCustom(appResource, themeUri); }
//Update the chosenThemes dictionary with the preferred theme void SetPreferredTheme(ThemeType themeType, ThemeConfig config) { if (!chosenThemes.ContainsKey(themeType)) { chosenThemes.Add(themeType, config); } else { chosenThemes[themeType] = config; } //Save preference to player prefs: SavePlayerPrefs(config); }
public void ApplyTheme(ThemeType themeType, ActionLogForm form) { switch (themeType) { case ThemeType.Dark: form.BackColor = Color.FromArgb(60, 60, 60); form.menuStrip1.BackColor = Color.FromArgb(60, 60, 60); ApplyDarkMenuItemTheme(form.menuStrip1.Items); form.logText.BackColor = Color.FromArgb(60, 60, 60); form.logText.ForeColor = Color.FromArgb(190, 190, 190); break; } }
public bool CopyTheme(ThemeType theme) { switch (theme) { case ThemeType.Dark: ResetToDarkTheme(this); return(true); case ThemeType.Default: ResetToDefaultTheme(this); return(true); } return(false); }
public void Default() { ThemeType = ThemeType.Black; // Apply Classic Theme to Custom Properties CustomTopPanelBackground = Colors.LightBlue; CustomTopPanelForeground = Colors.Black; CustomTreePanelBackground = Colors.LightGreen; CustomTreePanelForeground = Colors.Black; CustomTreePanelHighlight = Colors.Red; CustomScriptPanelBackground = Colors.LightYellow; CustomScriptPanelForeground = Colors.Black; CustomStatusBarBackground = Colors.LightGray; CustomStatusBarForeground = Colors.Black; }
public static void ChangeTheme(this Excel.Workbook book, ThemeType themeType) { if (book == null) { return; } var normalStyle = book.Styles[StyleName.Normal]; normalStyle.SetDefaultStyle(themeType); book.CreateStyle(StyleName.Number).SetNumberStyle(themeType); book.CreateStyle(StyleName.String).SetStringStyle(themeType); }
/// <summary> /// Invoked when a theme type <see cref="MenuItem"/> is clicked. /// </summary> /// <param name="sender">The <see cref="MenuItem"/> where the event handler is attached.</param> /// <param name="e">The event data.</param> private void ThemeTypeMenuItemClick(object sender, RoutedEventArgs e) { MenuItem clickedMenuItem = (MenuItem)sender; ThemeType type = (ThemeType)clickedMenuItem.Tag; if (type == ThemeType.BuiltInDark) { this.timerWindow.Options.Theme = this.timerWindow.Options.Theme.DarkVariant; } else { this.timerWindow.Options.Theme = this.timerWindow.Options.Theme.LightVariant; } }
public void ApplyTheme(ThemeType themeType, PreferencesForm form) { switch (themeType) { case ThemeType.Dark: form.BackColor = Color.FromArgb(60, 60, 60); form.menuStrip1.BackColor = Color.FromArgb(60, 60, 60); ApplyDarkMenuItemTheme(form.menuStrip1.Items); form.statusStrip1.BackColor = Color.FromArgb(0, 122, 204); form.label1.ForeColor = Color.FromArgb(190, 190, 190); form.toolStripStatusLabel1.ForeColor = Color.FromArgb(255, 255, 255); break; } }
public static string GetName(this ThemeType type) { switch (type) { case ThemeType.Light: return("LightTheme"); case ThemeType.Dark: return("DarkTheme"); case ThemeType.ColourfulLight: return("ColourfulLightTheme"); case ThemeType.ColourfulDark: return("ColourfulDarkTheme"); default: return(null); } }
public static void SetTheme(ThemeType type) { switch (type) { case ThemeType.Light: updateTheme(lightTheme); CurrentTheme = ThemeType.Light; break; case ThemeType.Dark: updateTheme(darkTheme); CurrentTheme = ThemeType.Dark; break; } }
public static void LoadThemeType(ThemeType type) { ThemeType = type; switch (type) { case ThemeType.Light: LoadLightTheme(); break; case ThemeType.Dark: LoadDarkTheme(); break; } }
public static void LoadThemeType(ThemeType type) { ThemeType = type; switch (type) { case ThemeType.Light: InitializeLightTheme(Colors.DarkOrange); break; case ThemeType.Dark: InitializeDarkTheme(Colors.Violet); break; } }
void RandomPlatform() { int index = Random.Range(0, Vars.PlatformTheme.Count); SelectedSprite = Vars.PlatformTheme[index]; GameCOntroller.Instance.curTheme = SelectedSprite; if (index == 2) { TypeTheme = ThemeType.Winter; } else { TypeTheme = ThemeType.Grass; } }
public static string ConvertToString(IUDICO.Common.Models.Shared.ThemeType themeType) { ThemeType enumThemeType = ConvertToThemeType(themeType); switch (enumThemeType) { case ThemeType.Test: return(Localization.getMessage("ThemeType.Test")); case ThemeType.Theory: return(Localization.getMessage("ThemeType.Theory")); case ThemeType.TestWithoutCourse: return(Localization.getMessage("ThemeType.TestWithoutCourse")); default: throw new ArgumentOutOfRangeException(); } }
private void SetThemeButton_Click(object sender, RoutedEventArgs e) { try { //Application.Current.Resources = Invert911.Themes.ThemeManager.GetThemeResourceDictionary(ThemesComboBox.Text); ThemeType t = ThemeType.Royale; Enum.TryParse <ThemeType>(ThemesComboBox.Text, out t); Invert911.Themes.ThemeManager.ApplyTheme(Application.Current, t); } catch (Exception ex) { MessageBox.Show("Error" + ex.Message); } }
/// <summary> /// 按照[皮肤]进行一些处理 (设置图片和文字等) /// </summary> /// <param name="_dlc">皮肤</param> public void Handle(DlcType _dlc) { //赋值 DlcType = _dlc; //处理 switch (_dlc) { //如果没有任何的DLC case DlcType.None: //[设置界面] AppManager.Uis.SettingsUi.UiControl.CnThemeGrid.Visibility = Visibility.Visible; AppManager.Uis.SettingsUi.UiControl.CnThemeBearGrid.Visibility = Visibility.Collapsed; AppManager.Uis.SettingsUi.UiControl.CnThemeCatGrid.Visibility = Visibility.Collapsed; AppManager.Uis.SettingsUi.UiControl.EnThemeGrid.Visibility = Visibility.Visible; AppManager.Uis.SettingsUi.UiControl.EnThemeBearGrid.Visibility = Visibility.Collapsed; AppManager.Uis.SettingsUi.UiControl.EnThemeCatGrid.Visibility = Visibility.Collapsed; break; //如果是[CatTheme]DLC case DlcType.CatTheme: //[设置界面] AppManager.Uis.SettingsUi.UiControl.CnThemeGrid.Visibility = Visibility.Collapsed; AppManager.Uis.SettingsUi.UiControl.CnThemeBearGrid.Visibility = Visibility.Visible; AppManager.Uis.SettingsUi.UiControl.CnThemeCatGrid.Visibility = Visibility.Visible; AppManager.Uis.SettingsUi.UiControl.EnThemeGrid.Visibility = Visibility.Collapsed; AppManager.Uis.SettingsUi.UiControl.EnThemeBearGrid.Visibility = Visibility.Visible; AppManager.Uis.SettingsUi.UiControl.EnThemeCatGrid.Visibility = Visibility.Visible; break; } //设置皮肤 switch (_dlc) { //如果没有任何的DLC case DlcType.None: //取到皮肤 ThemeType _themeType = AppManager.Systems.ThemeSystem.Theme; //如果是猫咪皮肤,就把皮肤设置为默认皮肤 if (_themeType == ThemeType.Cat_White || _themeType == ThemeType.Cat_Dark) { AppManager.Systems.ThemeSystem.Theme = ThemeType.White; } break; } }
/// <summary> /// Generates a consent URL that includes a set of provided parameters. /// </summary> /// <param name="scopes">A list of scope values that the user will need to authorize.</param> /// <param name="options">A table of optional authorization parameters to be encoded into the URL.</param> /// <returns>The generated login URL value.</returns> public string GetLoginUrl(IEnumerable <string> scopes, IDictionary <string, string> options) { LiveUtility.ValidateNotEmptyStringEnumeratorArguement(scopes, "scopes"); string locale = null; string state = null; DisplayType display = DisplayType.WinDesktop; ThemeType theme = ThemeType.Win7; string redirectUrl = LiveAuthUtility.BuildDesktopRedirectUrl(); if (options != null) { if (options.ContainsKey(AuthConstants.Locale)) { locale = options[AuthConstants.Locale]; } if (options.ContainsKey(AuthConstants.ClientState)) { state = options[AuthConstants.ClientState]; } if (options.ContainsKey(AuthConstants.Display)) { string displayStr = options[AuthConstants.Display]; if (!Enum.TryParse <DisplayType>(displayStr, true, out display)) { throw new ArgumentException(ErrorText.ParameterInvalidDisplayValue, "display"); } } if (options.ContainsKey(AuthConstants.Theme)) { string themeStr = options[AuthConstants.Theme]; if (!Enum.TryParse <ThemeType>(themeStr, true, out theme)) { throw new ArgumentException(ErrorText.ParameterInvalidDisplayValue, "theme"); } } } if (locale == null) { locale = CultureInfo.CurrentUICulture.ToString(); } return(this.authClient.GetLoginUrl(scopes, redirectUrl, display, theme, locale, state)); }
internal static void LoadCurrentTheme() { if (first) { first = false; } else if (loadedtheme == Manager.GameSettings.CurrentTheme) { return; } if (UIContent != null) { UIContent.Unload(); UIContent.Dispose(); GC.Collect(); } UIContent = new SmartContentManager(Manager.RandomAccessContentManager.ServiceProvider); UIContent.RootDirectory = Manager.RandomAccessContentManager.RootDirectory; string d = GetCurrentThemeDirectory(); TextureFiles = new Dictionary <PrimaryTexture, string>(); foreach (PrimaryTexture t in PrimaryTexture.GetValues(typeof(PrimaryTexture))) { TextureFiles.Add(t, "Textures\\" + d + "\\" + t.ToString()); } LoadTextures(); SoundFiles.Clear(); foreach (SoundType s in SoundType.GetValues(typeof(SoundType))) { SoundFiles.Add(s, "Sounds\\" + d + "\\" + s.ToString()); } LoadSounds(); FontFiles.Clear(); foreach (FontType f in FontType.GetValues(typeof(FontType))) { FontFiles.Add(f, "Fonts\\" + d + "\\" + f.ToString()); } LoadFonts(); loadedtheme = Manager.GameSettings.CurrentTheme; SoundManager.StopAllLoops(); //SoundManager.PlaySound(DataHandler.Sounds[SoundType.Background], SoundCategory.Music, true); Manager.SaveUserDataLocal(); GC.Collect(); }
internal Theme(psai.ProtoBuf_Theme pbTheme) : this() { this.id = pbTheme.id; this.intensityAfterRest = pbTheme.intensityAfterRest; this.musicDurationAfterRest = pbTheme.musicPhaseSecondsAfterRest; this.musicDurationGeneral = pbTheme.musicPhaseSecondsGeneral; this.Name = pbTheme.name; this.priority = pbTheme.priority; this.restSecondsMin = pbTheme.restSecondsMin; this.restSecondsMax = pbTheme.restSecondsMax; this.themeType = (ThemeType)(pbTheme.themeType); this.weightings.intensityVsVariety = pbTheme.weightingIntensityVsVariety; this.weightings.lowPlaycountVsRandom = pbTheme.weightingPlaycountVsRandom; this.weightings.switchGroups = pbTheme.weightingSwitchGroups; }
public static Excel.Style SetStringStyle(this Excel.Style style, ThemeType themeType) { style = style.SetDefaultStyle(themeType); style.NumberFormat = "@"; switch (themeType) { case ThemeType.White: break; case ThemeType.Dark: break; } return(style); }
protected void InitColors(Scintilla textbox, ThemeType themeType) { switch (themeType) { case ThemeType.Dark: textbox.CaretForeColor = Color.White; break; case ThemeType.Light: textbox.CaretForeColor = Color.FromArgb(51, 51, 51); break; } textbox.CaretLineVisible = false; textbox.SetSelectionBackColor(true, Color.DarkGray); }
public BaseAxisTheme(ThemeType theme) : base(theme) { m_FontSize = XCSettings.fontSizeLv4; m_LineType = XCSettings.axisLineType; m_LineWidth = XCSettings.axisLineWidth; m_LineLength = 0; m_SplitLineType = XCSettings.axisSplitLineType; m_SplitLineWidth = XCSettings.axisSplitLineWidth; m_SplitLineLength = 0; m_TickWidth = XCSettings.axisTickWidth; m_TickLength = XCSettings.axisTickLength; switch (theme) { case ThemeType.Default: m_LineColor = ColorUtil.GetColor("#514D4D"); m_TickColor = ColorUtil.GetColor("#514D4D"); m_SplitLineColor = ColorUtil.GetColor("#51515120"); m_SplitAreaColors = new List <Color32> { new Color32(250, 250, 250, 77), new Color32(200, 200, 200, 77) }; break; case ThemeType.Light: m_LineColor = ColorUtil.GetColor("#514D4D"); m_TickColor = ColorUtil.GetColor("#514D4D"); m_SplitLineColor = ColorUtil.GetColor("#51515120"); m_SplitAreaColors = new List <Color32> { new Color32(250, 250, 250, 77), new Color32(200, 200, 200, 77) }; break; case ThemeType.Dark: m_LineColor = ColorUtil.GetColor("#B9B8CE"); m_TickColor = ColorUtil.GetColor("#B9B8CE"); m_SplitLineColor = ColorUtil.GetColor("#484753"); m_SplitAreaColors = new List <Color32> { new Color32(255, 255, 255, (byte)(0.02f * 255)), new Color32(255, 255, 255, (byte)(0.05f * 255)) }; break; } }
public void ApplyTheme(ThemeType theme) { RunOnUiThread(delegate { switch (theme) { default: case ThemeType.Light: ThemeResourceDictionary.Source = new Uri("/myManga;component/Themes/LightTheme.xaml", UriKind.RelativeOrAbsolute); break; case ThemeType.Dark: ThemeResourceDictionary.Source = new Uri("/myManga;component/Themes/DarkTheme.xaml", UriKind.RelativeOrAbsolute); break; } }); }
public TitleTheme(ThemeType theme) : base(theme) { m_FontSize = XCSettings.fontSizeLv1; switch (theme) { case ThemeType.Default: m_TextColor = ColorUtil.GetColor("#514D4D"); break; case ThemeType.Light: break; case ThemeType.Dark: m_TextColor = ColorUtil.GetColor("#EEF1FA"); break; } }
public static void SetTheme(ThemeType theme) { string themeName = theme.GetName(); CurrentTheme = theme; try { if (!string.IsNullOrEmpty(themeName)) { ChangeTheme(new Uri($"Themes/{themeName}.xaml", UriKind.Relative)); } } catch { // Log? } }
public static Excel.Style SetNumberStyle(this Excel.Style style, ThemeType themeType) { style = style.SetDefaultStyle(themeType); style.Font.Name = "Consolas"; switch (themeType) { case ThemeType.White: break; case ThemeType.Dark: style.Font.Color = Color.FromArgb(181, 206, 168); break; } return(style); }
static Task SetPlatformTheme(ThemeType theme) { var pref = ContextWrapper.GetSharedPreferences("com.openExtensions.android.Theme", FileCreationMode.Private).Edit(); if (theme == ThemeType.Dark) { ContextWrapper.SetTheme(DarkTheme); pref.PutInt("Theme", (int)ThemeType.Dark); } else { ContextWrapper.SetTheme(LightTheme); pref.PutInt("Theme", (int)ThemeType.Light); } pref.Apply(); return(Task.CompletedTask); }
public void UpdateTheme(ThemeType input) { switch (input) { case ThemeType.LIGHT: metroSMSettings.Theme = MetroFramework.MetroThemeStyle.Light; break; case ThemeType.DARK: metroSMSettings.Theme = MetroFramework.MetroThemeStyle.Dark; break; default: metroSMSettings.Theme = MetroFramework.MetroThemeStyle.Light; break; } }
protected virtual void CheckTheme() { if (m_Theme.sharedTheme == null) { m_Theme.sharedTheme = XCThemeMgr.GetTheme(ThemeType.Default); } if (m_Theme.sharedTheme != null && m_CheckTheme != m_Theme.themeType) { m_CheckTheme = m_Theme.themeType; m_Theme.sharedTheme.CopyTheme(m_CheckTheme); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif SetAllComponentDirty(); OnThemeChanged(); } }
private static ResourceDictionary GetThemeResourceDictionary(ThemeType? theme) { ResourceDictionary dictionary = null; if (theme != null) { switch (theme) { case ThemeType.Royale: dictionary = new ResourceDictionary(); string s = "/PresentationFramework.Royale, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/Royale.normalcolor.xaml"; dictionary.Source = new Uri(s, UriKind.Relative); //Application.Current.Resources.MergedDictionaries.Clear(); //Application.Current.Resources.MergedDictionaries.Add(dictionary); break; default: Assembly assembly = Assembly.GetExecutingAssembly(); string packUri = String.Format(@"/Invert911.InvertCommon;component/Themes/{0}/Theme.xaml", theme); dictionary = Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary; break; } } return dictionary; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_Active = reader.ReadBool(); m_Theme = (ThemeType)reader.ReadInt(); m_TotalSpins = reader.ReadULong(); m_TotalCollected = reader.ReadULong(); m_TotalWon = reader.ReadULong(); m_ErrorCode = reader.ReadInt(); m_OrigHue = reader.ReadInt(); m_Throttle = reader.ReadBool(); m_ThrottleSeconds = reader.ReadDouble(); m_CardClubOnly = reader.ReadBool(); m_MembershipCard = reader.ReadBool(); m_LastWonBy = reader.ReadMobile(); m_LastWonByDate = reader.ReadDateTime(); m_LastWonAmount = reader.ReadInt(); m_SecurityCamMobile = reader.ReadMobile(); m_SecurityChatter = (VerboseType)reader.ReadInt(); m_TotalPlayers = reader.ReadInt(); InvalidateProperties(); if (m_TotalPlayers > 0) { for (int i = 0; i < m_TotalPlayers; i++) { PlayerInfo player = new PlayerInfo(); player.mobile = reader.ReadMobile(); player.LastPlayed = reader.ReadDateTime(); player.OnCredit = reader.ReadInt(); player.Cost = reader.ReadInt(); PlayerList.Add(player); } } for (int i = 0; i < m_HitStats.Length; i++) m_HitStats[i] = reader.ReadULong(); if (m_OrigHue != -1 && m_Active) { Hue = m_OrigHue; m_OrigHue = -1; } SetupTheme(m_Theme); ActivateIdleTimer(TimeSpan.FromMinutes(5)); m_GameSpeed = Utility.RandomList(5, 6, 7, 8, 9, 10, 11, 12); }
/* Returns what will happen if sourceThemeType is playing while the targetThemeType is triggered. */ public static ThemeInterruptionBehavior GetThemeInterruptionBehavior(ThemeType sourceThemeType, ThemeType targetThemeType) { switch (sourceThemeType) { case ThemeType.basicMood: { switch (targetThemeType) { case ThemeType.basicMood: return ThemeInterruptionBehavior.at_end_of_current_snippet; case ThemeType.basicMoodAlt: return ThemeInterruptionBehavior.at_end_of_current_snippet; case ThemeType.dramaticEvent: return ThemeInterruptionBehavior.immediately; case ThemeType.action: return ThemeInterruptionBehavior.immediately; case ThemeType.shock: return ThemeInterruptionBehavior.immediately; case ThemeType.highlightLayer: return ThemeInterruptionBehavior.layer; } break; } //break; case ThemeType.basicMoodAlt: { switch (targetThemeType) { case ThemeType.basicMood: return ThemeInterruptionBehavior.never; case ThemeType.basicMoodAlt: return ThemeInterruptionBehavior.at_end_of_current_snippet; case ThemeType.dramaticEvent: return ThemeInterruptionBehavior.immediately; case ThemeType.action: //case ThemeType.contAction: return ThemeInterruptionBehavior.immediately; case ThemeType.shock: return ThemeInterruptionBehavior.immediately; case ThemeType.highlightLayer: return ThemeInterruptionBehavior.layer; } break; } //break; case ThemeType.dramaticEvent: { switch (targetThemeType) { case ThemeType.basicMood: return ThemeInterruptionBehavior.never; case ThemeType.basicMoodAlt: return ThemeInterruptionBehavior.never; case ThemeType.dramaticEvent: return ThemeInterruptionBehavior.at_end_of_current_snippet; case ThemeType.action: return ThemeInterruptionBehavior.immediately; case ThemeType.shock: return ThemeInterruptionBehavior.immediately; case ThemeType.highlightLayer: return ThemeInterruptionBehavior.layer; } break; } //break; case ThemeType.action: { switch (targetThemeType) { case ThemeType.basicMood: return ThemeInterruptionBehavior.never; case ThemeType.basicMoodAlt: return ThemeInterruptionBehavior.never; case ThemeType.dramaticEvent: return ThemeInterruptionBehavior.never; case ThemeType.action: return ThemeInterruptionBehavior.at_end_of_current_snippet; case ThemeType.shock: return ThemeInterruptionBehavior.immediately; case ThemeType.highlightLayer: return ThemeInterruptionBehavior.layer; } break; } //break; case ThemeType.shock: { switch (targetThemeType) { case ThemeType.basicMood: return ThemeInterruptionBehavior.never; case ThemeType.basicMoodAlt: return ThemeInterruptionBehavior.never; case ThemeType.dramaticEvent: return ThemeInterruptionBehavior.never; case ThemeType.action: return ThemeInterruptionBehavior.never; case ThemeType.shock: return ThemeInterruptionBehavior.immediately; case ThemeType.highlightLayer: return ThemeInterruptionBehavior.layer; } break; } //break; case ThemeType.highlightLayer: { return ThemeInterruptionBehavior.never; } //break; } return ThemeInterruptionBehavior.undefined; }
public static string ThemeTypeToString(ThemeType themeType) { switch (themeType) { case ThemeType.basicMood: return "Basic Mood"; case ThemeType.basicMoodAlt: return "Mood Alteration"; case ThemeType.dramaticEvent: return "Dramatic Event"; case ThemeType.action: return "Action"; case ThemeType.shock: return "Shock"; case ThemeType.highlightLayer: return "Highlight Layer"; } return ""; }
/*internal psai.ProtoBuf_Theme CreateProtoBufTheme() { psai.ProtoBuf_Theme pbTheme = new psai.ProtoBuf_Theme(); pbTheme.id = id; pbTheme.name = Name; pbTheme.themeType = (int)(this.themeType); pbTheme.intensityAfterRest = this.intensityAfterRest; pbTheme.musicPhaseSecondsGeneral = this.musicDurationGeneral; pbTheme.musicPhaseSecondsAfterRest = this.musicDurationAfterRest; pbTheme.restSecondsMin = this.restSecondsMin; pbTheme.restSecondsMax = this.restSecondsMax; return pbTheme; }*/ #endregion Other #if (PSAI_BUILT_BY_VS || PSAI_STANDALONE || PSAI_EDITOR_STANDALONE) internal Theme(psai.ProtoBuf_Theme pbTheme) : this() { this.id = pbTheme.id; this.intensityAfterRest = pbTheme.intensityAfterRest; this.musicDurationAfterRest = pbTheme.musicPhaseSecondsAfterRest; this.musicDurationGeneral = pbTheme.musicPhaseSecondsGeneral; this.Name = pbTheme.name; this.priority = pbTheme.priority; this.restSecondsMin = pbTheme.restSecondsMin; this.restSecondsMax = pbTheme.restSecondsMax; this.themeType = (ThemeType)(pbTheme.themeType); this.weightings.intensityVsVariety = pbTheme.weightingIntensityVsVariety; this.weightings.lowPlaycountVsRandom = pbTheme.weightingPlaycountVsRandom; this.weightings.switchGroups = pbTheme.weightingSwitchGroups; }
public Theme() { m_segments = new List<Segment>(); weightings = new Weighting(); this.id = -1; this.restSecondsMax = 0; this.restSecondsMin = 0; this.priority = 0; this.themeType = ThemeType.none; this.Name = ""; }
public void ApplyTheme(ThemeType theme) { switch (theme) { default: case ThemeType.Light: ThemeResourceDictionary.Source = new Uri("/myManga;component/Themes/LightTheme.xaml", UriKind.RelativeOrAbsolute); break; case ThemeType.Dark: ThemeResourceDictionary.Source = new Uri("/myManga;component/Themes/DarkTheme.xaml", UriKind.RelativeOrAbsolute); break; } }
public Theme CreateTheme(string p_IndicatorNId, string p_UnitNId, string p_SubgroupValNId, ThemeType p_ThemeType, ChartType chartType, ChartSeriesType chartGroupBy, int p_Position) { //*** Create New Theme. Theme RetVal = null; string sSubgroupValNId = string.Empty; string sRowFilter = string.Empty; string DefaultIndicatorNId = string.Empty; string DefaultUnitNId = string.Empty; foreach (Theme _TempTheme in m_Themes) { if (_TempTheme.ID == p_IndicatorNId + "_" + p_UnitNId + "_" + p_SubgroupValNId + "_" + ((int)p_ThemeType).ToString()) { //If theme already exists exception will be thrown throw new ApplicationException("3"); //TODO return null or some other approach } } Theme _Theme = new Theme(); DataView _ThemeData; //-- If indicatorNID and UnitNId are -1 ,then Get default indicatorNId , UnitNIds from PresentationData's first row. //-- It is required because, for creating any theme (Chart or color) first time, we need some indicator, unit NIDs. if (p_IndicatorNId == "-1") { DefaultIndicatorNId = this.MRDData[0][Indicator.IndicatorNId].ToString(); sRowFilter += Indicator.IndicatorNId + " IN (" + DefaultIndicatorNId + ")"; } else { sRowFilter += Indicator.IndicatorNId + " IN (" + p_IndicatorNId + ")"; DefaultIndicatorNId = p_IndicatorNId; } if (p_UnitNId == "-1") { DefaultUnitNId = this.MRDData[0][Unit.UnitNId].ToString(); sRowFilter += " AND " + Unit.UnitNId + " IN (" + DefaultUnitNId + ")"; } else { sRowFilter += " AND " + Unit.UnitNId + " IN (" + p_UnitNId + ")"; DefaultUnitNId = p_UnitNId; } //DataTable SubGroupDataTable = DIConnection.ExecuteDataTable(DIQueries.IUS.GetSubgroupValByIU(Convert.ToInt32(DefaultIndicatorNId), Convert.ToInt32(DefaultUnitNId))); if (p_ThemeType == ThemeType.Chart) { string sSql = string.Empty; //foreach (DataRow dr in SubGroupDataTable.Rows) foreach (DataRow dr in this.GetSubgroupsNIDsBy_IndicatorUnit(DefaultIndicatorNId, DefaultUnitNId).Rows) { if (sSubgroupValNId.Length > 0) { sSubgroupValNId += ","; } sSubgroupValNId += dr[SubgroupVals.SubgroupValNId].ToString(); } if (!string.IsNullOrEmpty(sSubgroupValNId)) { //Get all records for Selected Indicator, Subgroups and Unit sRowFilter = Indicator.IndicatorNId + " IN (" + DefaultIndicatorNId + ") AND " + Unit.UnitNId + " IN (" + DefaultUnitNId + ") AND " + SubgroupVals.SubgroupValNId + " IN (" + sSubgroupValNId + ")"; } else { sRowFilter = Indicator.IndicatorNId + " IN (" + DefaultIndicatorNId + ") AND " + Unit.UnitNId + " IN (" + DefaultUnitNId + ")"; } //////-- If Pie chart, then TimeSeries shud be OFF. Use MRD data ////if (chartType == ChartType.Pie) ////{ //// this.MRDData.RowFilter = sRowFilter; //// _ThemeData = new DataView(this.MRDData.ToTable()); //// this.MRDData.RowFilter = ""; ////} ////else ////{ //// this.PresentationData.RowFilter = sRowFilter; //// _ThemeData = new DataView(this.PresentationData.ToTable()); //// this.PresentationData.RowFilter = ""; ////} this.PresentationData.RowFilter = sRowFilter; _ThemeData = new DataView(this.PresentationData.ToTable()); this.PresentationData.RowFilter = ""; } else { //_ThemeData = m_QueryBase.Map_GetData(int.Parse(p_IndicatorNId), int.Parse(p_UnitNId), int.Parse(p_Subgroup_NId), 0, -1); //_ThemeData = this.MRDData; if (p_SubgroupValNId == "-1") { //-- Set Subgroup filter only for new theme case. //-- In case of Subgroup = Select all case discard subgroup filter if (p_IndicatorNId == "-1" && p_UnitNId == "-1" && p_SubgroupValNId == "-1") { sRowFilter += " AND " + SubgroupVals.SubgroupValNId + " IN (" + MRDData[0][SubgroupVals.SubgroupValNId] + ")"; } else { //-- SubgroupNid = -1 and IndicatorNid <> -1 , indicates that Subgroup = "Select ALL" case. //-- then set bool variable of Theme.SubgroupSelectAll = true _Theme.SubgroupSelectAll = true; } } else { sRowFilter += " AND " + SubgroupVals.SubgroupValNId + " IN (" + p_SubgroupValNId + ")"; } this.MRDData.RowFilter = sRowFilter; _ThemeData = new DataView(this.MRDData.ToTable()); this.MRDData.RowFilter = ""; } //--Ckeck if Theme Data Has some record. Exit function if NO record Found. if (_ThemeData.Count > 0) { //*** Add Metadata Columns int i; if (_ThemeData.Count == 0) { throw new ApplicationException("5"); } //*** Update Metadata Column values if metadata column exists //UpdateMetadataInfo(ref _ThemeData); //GenerateLayerInformation(_Theme, _ThemeData) foreach (Layer _Layer in m_Layers) { { if (!_Theme.LayerVisibility.ContainsKey(_Layer.ID)) { switch (_Layer.LayerType) { case ShapeType.Point: case ShapeType.Polygon: case ShapeType.PolyLine: _Theme.LayerVisibility.Add(_Layer.ID, true); break; case ShapeType.PointFeature: case ShapeType.PolygonFeature: case ShapeType.PolyLineFeature: _Theme.LayerVisibility.Add(_Layer.ID, false); break; } } } } // _Layer = null; //object[] oMDKeys = new object[MDKeys.Keys.Count]; //MDKeys.Keys.CopyTo(oMDKeys, 0); object[] oMDKeys = this.MDColumns; _Theme.MetaDataKeys = oMDKeys; _Theme.Type = p_ThemeType; //_Theme.LegendTitle = _ThemeData[0][Unit.UnitName].ToString();; _Theme.SetLegendTitle(_ThemeData[0][Indicator.IndicatorName].ToString(), _ThemeData[0][Unit.UnitName].ToString(), _ThemeData[0][SubgroupVals.SubgroupVal].ToString()); //*** Bugfix 26 Apr 2006 For the second map theme, the legend doesn’t automatically append a title… _Theme.StartColor = m_FirstColor; _Theme.EndColor = m_FourthColor; if ((m_Layers.RecordCounts() == 0) || m_Layers.RecordCounts() == 0) { _Theme.ShapeCount = m_Layers.RecordCounts(m_SpatialMapFolder); } else { _Theme.ShapeCount = m_Layers.RecordCounts(); } _Theme.MissingColor = this._MissingColor; switch (_Theme.Type) { case ThemeType.Color: _Theme.SetRange(_ThemeData); _Theme.Legends[0].Color = FirstColor; _Theme.Legends[1].Color = SecondColor; _Theme.Legends[2].Color = ThirdColor; _Theme.Legends[3].Color = FourthColor; _Theme.Legends[_Theme.Legends.Count - 1].Caption = m_MissingValue; _Theme.BreakType = BreakType.Continuous; //$$$ By Default create the theme on the basis of equal count and set it as continuous break; case ThemeType.Hatch: _Theme.SetRange(_ThemeData); _Theme.Legends[0].Color = Color.LightGray; _Theme.Legends[1].Color = Color.LightGray; _Theme.Legends[2].Color = Color.LightGray; _Theme.Legends[3].Color = Color.LightGray; _Theme.Legends[_Theme.Legends.Count - 1].Caption = m_MissingValue; _Theme.BreakType = BreakType.Continuous; //$$$ By Default create the theme on the basis of equal count and set it as continuous break; case ThemeType.Symbol: _Theme.SetRange(_ThemeData); for (i = 0; i <= _Theme.Legends.Count - 1; i++) { _Theme.Legends[i].MarkerType = MarkerStyle.Custom; _Theme.Legends[i].MarkerChar = Strings.Chr(110); //-- (65 + i) - previous used if (i <= 3) { //-- Default color is red for all with 50% transparency _Theme.Legends[i].Color = Color.FromArgb(128, 255, 0, 0); _Theme.Legends[i].MarkerFont = new Font("Webdings", 10 + i * 5); _Theme.Legends[i].MarkerSize = 10 + i * 5; } else { //-- Missing legend info _Theme.Legends[i].Color = Color.FromArgb(128, _Theme.MissingColor); _Theme.Legends[i].MarkerFont = new Font("Webdings", 10); _Theme.Legends[i].MarkerSize = 10; } } _Theme.Legends[_Theme.Legends.Count - 1].Caption = m_MissingValue; _Theme.BreakType = BreakType.Continuous; //$$$ By Default create the theme on the basis of equal count and set it as continuous break; case ThemeType.Label: _Theme.SetRange(_ThemeData); Font fnt = new Font("Arial", 8); for (i = 0; i <= _Theme.Legends.Count - 1; i++) { switch (i) { case 0: _Theme.Legends[i].Color = Color.FromArgb(255 - FirstColor.R, 255 - FirstColor.G, 255 - FirstColor.B); break; case 1: _Theme.Legends[i].Color = Color.FromArgb(255 - SecondColor.R, 255 - SecondColor.G, 255 - SecondColor.B); break; case 2: _Theme.Legends[i].Color = Color.FromArgb(255 - ThirdColor.R, 255 - ThirdColor.G, 255 - ThirdColor.B); break; case 3: _Theme.Legends[i].Color = Color.FromArgb(255 - FourthColor.R, 255 - FourthColor.G, 255 - FourthColor.B); break; default: //Missing Data _Theme.Legends[i].Color = Color.LightYellow; break; } _Theme.Legends[i].MarkerFont = fnt; } _Theme.Legends[_Theme.Legends.Count - 1].Caption = m_MissingValue; _Theme.BreakType = BreakType.Continuous; //$$$ By Default create the theme on the basis of equal count and set it as continuous break; case ThemeType.DotDensity: _Theme.DotSize = 3; _Theme.SetThemeId(ref _ThemeData); CalcDotDensity(_ThemeData, ref _Theme); break; case ThemeType.Chart: //-- Chart dataValue are plotted against multiple SubgroupVal OR Sources. _Theme.ChartSeriestype = chartGroupBy; _Theme.ChartType = chartType; //-- Get SubgroupValNIDs which are available in ThemeData sSubgroupValNId = string.Empty; // foreach (DataRow drow in SubGroupDataTable.Rows) foreach (DataRow drow in _ThemeData.ToTable(true, SubgroupVals.SubgroupValNId).Rows) { if (sSubgroupValNId.Length == 0) { sSubgroupValNId = drow[SubgroupVals.SubgroupValNId].ToString(); } else { sSubgroupValNId += "," + drow[SubgroupVals.SubgroupValNId].ToString(); } } string[] _Inds = Strings.Split(DefaultIndicatorNId, ",", -1, CompareMethod.Text); string[] _SPs = Strings.Split(sSubgroupValNId, ",", -1, CompareMethod.Text); //*** Bugfix 15 June 2006 Improper Max data value for Chart theme type //float MinVal = 0; //float MaxVal = 0; //GetMinMaxDataValue(ref _ThemeData, ref MinVal, ref MaxVal); //_Theme.Minimum = MinVal; //_Theme.Maximum = MaxVal; _ThemeData.Sort = DataExpressionColumns.DataType + " ASC," + DataExpressionColumns.NumericData + " ASC"; _Theme.Minimum = (decimal)_ThemeData[0][DataExpressionColumns.NumericData]; _Theme.Maximum = (decimal)_ThemeData[_ThemeData.Count - 1][DataExpressionColumns.NumericData]; if (chartGroupBy == ChartSeriesType.Subgroup) { //-- ChartGroupBy will be Subgroup by default. MakeChartTheme(_Inds, _SPs, _ThemeData, _Theme); } if (_Theme.ChartType != ChartType.Line) { _Theme.DisplayChartMRD = true; //-- default } //color array string[] _IndColor = new string[_Inds.Length]; VBMath.Randomize(); for (i = 0; i <= _Inds.Length - 1; i++) { //Initially it was VBMath.rnd() function using for getting random no. _IndColor[i] = Color.FromArgb((int)(_random.NextDouble() * 255), (int)(_random.NextDouble() * 255), (int)(_random.NextDouble() * 255)).Name; } string _INDName = ""; string _INDNid = ""; string _SPName = ""; string _SPNId = ""; string sSql = DIQueries.IUS.GetIUSNIdByI_U_S(DefaultIndicatorNId, "", ""); System.Data.IDataReader dr = DIConnection.ExecuteReader(sSql); string sIUSNIds = string.Empty; while (dr.Read()) { if (sIUSNIds.Length > 0) sIUSNIds += ","; sIUSNIds += dr[Indicator_Unit_Subgroup.IUSNId].ToString(); } dr.Close(); dr.Dispose(); sSql = DIQueries.IUS.GetIUS(FilterFieldType.NId, sIUSNIds, FieldSelection.Light); DataView _Dv = DIConnection.ExecuteDataTable(sSql).DefaultView; //DataView _Dv = m_QueryBase.Indicator_GetIUSSelections(p_IndicatorNId, sSubgroup_NId, -1); //Default p_UnitNId = -1 is passed as defined in function signaure. string[] SubGroupArr; SubGroupArr = sSubgroupValNId.Split(','); for (i = 0; i <= SubGroupArr.Length - 1; i++) { _Dv.RowFilter = "Subgroup_Val_NId = " + SubGroupArr[i]; if (_INDNid.IndexOf("{~}" + _Dv[0]["Indicator_NId"].ToString() + "@") == -1) { if (_INDName.Length > 0) _INDName += "{~}"; _INDNid += "{~}"; _INDName += _Dv[0]["Indicator_Name"].ToString(); _INDNid += _Dv[0]["Indicator_NId"].ToString() + "@"; _Theme.UnitName = _Dv[0]["Unit_Name"].ToString(); } if (_SPNId.IndexOf("{~}" + _Dv[0]["Subgroup_Val_NId"].ToString() + "@") == -1) { if (_SPName.Length > 0) _SPName += "{~}"; _SPNId += "{~}"; _SPName += _Dv[0]["Subgroup_Val"].ToString(); _SPNId += _Dv[0]["Subgroup_Val_NId"].ToString() + "@"; } } _INDNid = _INDNid.Replace("@", ""); _SPNId = _SPNId.Replace("@", ""); _Theme.IndicatorName = Strings.Split(_INDName, "{~}", -1, CompareMethod.Text); _Theme.IndicatorNId = Strings.Split(_INDNid, "{~}", -1, CompareMethod.Text); _Theme.SubgroupName = Strings.Split(_SPName, "{~}", -1, CompareMethod.Text); _Theme.SubgroupNId = Strings.Split(_SPNId, "{~}", -1, CompareMethod.Text); _Theme.UnitNId = int.Parse(DefaultUnitNId); //p_unitNid _Theme.IndicatorColor = _IndColor; p_IndicatorNId = DefaultIndicatorNId; p_UnitNId = DefaultUnitNId; string[] _SPFill = new string[_Theme.SubgroupName.Length]; string[] _SPVisible = new string[_Theme.SubgroupName.Length]; for (i = 0; i <= _Theme.SubgroupName.Length - 1; i++) { //Initiallly it was VBMath.rnd() function using for getting random no. //-- Default transparency is 60% i.e 153 value. _SPFill[i] = Color.FromArgb(153, (int)(_random.NextDouble() * 255), (int)(_random.NextDouble() * 255), (int)(_random.NextDouble() * 255)).ToArgb().ToString(); _SPVisible[i] = "1"; } _Theme.SubgroupFillStyle = _SPFill; _Theme.SubgroupVisible = _SPVisible; //--If ChartGroupBy = source, then update Chart accordingly if (chartGroupBy == ChartSeriesType.Source) { //-- Take default subgroupNId string SubgroupNIdForSource = p_SubgroupValNId; if (SubgroupNIdForSource == "-1") { //-- Take first subgroup in collection SubgroupNIdForSource = _Theme.SubgroupNId[0]; } this.UpdateChartForMultipleSource(SubgroupNIdForSource, ref _Theme); } break; } if (p_IndicatorNId == "-1" & p_UnitNId == "-1" & p_SubgroupValNId == "-1") { } else { if (p_UnitNId == "-1") { _Theme.UnitNId = -1; } if (p_SubgroupValNId == "-1" && _Theme.SubgroupNId.Length > 0 && _Theme.SubgroupNId[0] == "-1") { string[] SNID = new string[1]; SNID[0] = "-1"; _Theme.SubgroupNId = SNID; } _Theme.ID = p_IndicatorNId + "_" + p_UnitNId + "_" + p_SubgroupValNId + "_" + (int)p_ThemeType; //$$$ Convention for Theme Id -> I_U_S_ThemeType } //-- Save GIDs of Indicator, Unit, Subgroups used in theme creation. _Theme.I_U_S_GIDs = this.GetI_U_S_GIDsByNids(this.DIDataView.MainDataTable.DefaultView, DefaultIndicatorNId, DefaultUnitNId, _Theme.SubgroupNId[0]); if (p_Position == -1) { m_Themes.Add(_Theme); } else { m_Themes.Insert(p_Position, _Theme); } } //- Apply Default setting of Map.TemplateStyle if (this.TemplateStyle != null) { _Theme.LegendFont = new Font(this.TemplateStyle.LegendTitle.FontTemplate.FontName, this.TemplateStyle.LegendTitle.FontTemplate.FontSize, this.TemplateStyle.LegendTitle.FontTemplate.FontStyle); _Theme.LegendColor = this.TemplateStyle.LegendTitle.FontTemplate.ForeColor; _Theme.LegendBodyFont = new Font(this.TemplateStyle.Legends.FontTemplate.FontName, this.TemplateStyle.Legends.FontTemplate.FontSize, this.TemplateStyle.Legends.FontTemplate.FontStyle); _Theme.LegendBodyColor = this.TemplateStyle.Legends.FontTemplate.ForeColor; } RetVal = _Theme; return RetVal; }
public Theme CreateTheme(string p_IndicatorNId, string p_UnitNId, string p_SubgroupValNId, ThemeType p_ThemeType, int p_Position) { //-- by default, create Bar chart with multiple Subgroups return this.CreateTheme(p_IndicatorNId, p_UnitNId, p_SubgroupValNId, p_ThemeType, ChartType.Column, ChartSeriesType.Subgroup, p_Position); }
public Theme CreateTheme(string p_IndicatorNId, string p_UnitNId, string p_Subgroup_NId, ThemeType p_ThemeType) { int p_Position = -1; return CreateTheme(p_IndicatorNId, p_UnitNId, p_Subgroup_NId, p_ThemeType, p_Position); }
/// <summary> /// Initializes a new instance of the <see cref="Theme"/> class. /// </summary> /// <param name="type">The type of this theme.</param> /// <param name="identifier">A unique identifier for this theme.</param> /// <param name="name">The friendly name for this theme, or <c>null</c> if no friendly name is specified.</param> /// <param name="backgroundColor">The background color of the window.</param> /// <param name="progressBarColor">The color of the progress bar.</param> /// <param name="progressBackgroundColor">The background color of the progress bar.</param> /// <param name="expirationFlashColor">The color that is flashed on expiration.</param> /// <param name="primaryTextColor">The color of the primary text.</param> /// <param name="primaryHintColor">The color of the watermark in the primary text box.</param> /// <param name="secondaryTextColor">The color of any secondary text.</param> /// <param name="secondaryHintColor">The color of the watermark in any secondary text box.</param> /// <param name="buttonColor">The color of the button text.</param> /// <param name="buttonHoverColor">The color of the button text when the user hovers over the button.</param> public Theme( ThemeType type, string identifier, string name, Color backgroundColor, Color progressBarColor, Color progressBackgroundColor, Color expirationFlashColor, Color primaryTextColor, Color primaryHintColor, Color secondaryTextColor, Color secondaryHintColor, Color buttonColor, Color buttonHoverColor) { this.type = type; this.identifier = identifier; this.name = name; this.backgroundColor = backgroundColor; this.progressBarColor = progressBarColor; this.progressBackgroundColor = progressBackgroundColor; this.expirationFlashColor = expirationFlashColor; this.primaryTextColor = primaryTextColor; this.primaryHintColor = primaryHintColor; this.secondaryTextColor = secondaryTextColor; this.secondaryHintColor = secondaryHintColor; this.buttonColor = buttonColor; this.buttonHoverColor = buttonHoverColor; }
/// <summary> /// Initializes a new instance of the <see cref="Theme"/> class. /// </summary> /// <param name="type">The type of this theme.</param> /// <param name="identifier">A unique identifier for this theme.</param> /// <param name="name">The friendly name for this theme, or <c>null</c> if no friendly name is specified.</param> /// <param name="backgroundColor">The background color of the window.</param> /// <param name="progressBarColor">The color of the progress bar.</param> /// <param name="progressBackgroundColor">The background color of the progress bar.</param> /// <param name="expirationFlashColor">The color that is flashed on expiration.</param> /// <param name="primaryTextColor">The color of the primary text.</param> /// <param name="primaryHintColor">The color of the watermark in the primary text box.</param> /// <param name="secondaryTextColor">The color of any secondary text.</param> /// <param name="secondaryHintColor">The color of the watermark in any secondary text box.</param> /// <param name="buttonColor">The color of the button text.</param> /// <param name="buttonHoverColor">The color of the button text when the user hovers over the button.</param> public Theme( ThemeType type, string identifier, string name, string backgroundColor, string progressBarColor, string progressBackgroundColor, string expirationFlashColor, string primaryTextColor, string primaryHintColor, string secondaryTextColor, string secondaryHintColor, string buttonColor, string buttonHoverColor) : this(type, identifier, name, ColorExtensions.FromString(backgroundColor), ColorExtensions.FromString(progressBarColor), ColorExtensions.FromString(progressBackgroundColor), ColorExtensions.FromString(expirationFlashColor), ColorExtensions.FromString(primaryTextColor), ColorExtensions.FromString(primaryHintColor), ColorExtensions.FromString(secondaryTextColor), ColorExtensions.FromString(secondaryHintColor), ColorExtensions.FromString(buttonColor), ColorExtensions.FromString(buttonHoverColor)) { }
/// <summary> /// Generates a consent URL that includes a set of provided parameters. /// </summary> public string GetLoginUrl(IEnumerable<string> scopes, string redirectUrl, DisplayType display, ThemeType theme, string locale, string state) { return LiveAuthUtility.BuildAuthorizeUrl(this.clientId, redirectUrl, scopes, ResponseType.Code, display, theme, locale, state); }
public void Init() { playbackControlType = PlaybackControlType.None; immediately = false; fadeOutSeconds = 3.0f; // TODO: magic number dontExecuteIfOtherTriggersAreFiring = false; restrictBlockToThisThemeType = ThemeType.none; overrideDefaultRestTime = false; overrideRestSecondsMin = 10; overrideRestSecondsMax = 30; }
private void SetupTheme(ThemeType theme) { switch (theme) { case ThemeType.GoldCoast: Name = "Gold Coast Keno"; if (m_Active) Hue = 2213; else m_OrigHue = 2213; break; case ThemeType.Luxor: Name = "Luxor Keno"; if (m_Active) Hue = 907; else m_OrigHue = 907; break; case ThemeType.Stratosphere: Name = "Stratosphere Keno"; if (m_Active) Hue = 1160; else m_OrigHue = 1160; break; case ThemeType.TreasureIsland: Name = "Treasure Island Keno"; if (m_Active) Hue = 643; else m_OrigHue = 643; break; case ThemeType.WhiteDiamond: Name = "White Diamond Keno"; if (m_Active) Hue = 1150; else m_OrigHue = 1150; //Hue = 1150; break; } m_Theme = theme; }
public void Init() { controlType = PlaybackControlType.None; immediately = false; fadeOutSeconds = 0; dontExecuteIfOtherTriggersAreFiring = false; restrictBlockToThisThemeType = ThemeType.none; }
/// <summary> /// Returns a <see cref="Theme"/> that is a copy of another <see cref="Theme"/>. /// </summary> /// <param name="type">The type of this theme.</param> /// <param name="identifier">A unique identifier for this theme.</param> /// <param name="name">The friendly name for this theme, or <c>null</c> if no friendly name is specified.</param> /// <param name="theme">A theme from which to copy colors.</param> /// <returns>A <see cref="Theme"/> that is a copy of another <see cref="Theme"/>.</returns> public static Theme FromTheme(ThemeType type, string identifier, string name, Theme theme) { return new Theme(type, identifier, name, theme); }
/// <summary> /// Initializes a new instance of the <see cref="Theme"/> class. /// </summary> /// <param name="type">The type of this theme.</param> /// <param name="identifier">A unique identifier for this theme.</param> /// <param name="name">The friendly name for this theme, or <c>null</c> if no friendly name is specified.</param> /// <param name="theme">A theme from which to copy colors.</param> public Theme(ThemeType type, string identifier, string name, Theme theme) : this(type, identifier, name, theme.backgroundColor, theme.progressBarColor, theme.progressBackgroundColor, theme.expirationFlashColor, theme.primaryTextColor, theme.primaryHintColor, theme.secondaryTextColor, theme.secondaryHintColor, theme.buttonColor, theme.buttonHoverColor) { }