// -------------------------------------------------------------------------------------------------------------------------------- private void designDropdown_SelectedIndexChanged(object sender, EventArgs e) { DesignEnum chosenDesign = PAPIApplication.GetDesign(); switch (design_dropdown.SelectedIndex) { case 0: chosenDesign = DesignEnum.PAPYRUS; break; case 1: chosenDesign = DesignEnum.DIGITAL; break; case 2: chosenDesign = DesignEnum.NOVEL; break; default: break; } if (chosenDesign != PAPIApplication.GetDesign()) { PAPIApplication.SetDesign(chosenDesign); WfLogger.Log(this, LogLevel.DEBUG, "Set design to " + PAPIApplication.GetDesign() + " in dropdown"); SetDesign(); SetButtonDesign(); } }
public AppSettings(DesignEnum _activeDesign, LanguageEnum _activeLanguage, bool _isSessionRunning, Player _player) { this._activeDesign = _activeDesign; this._activeLanguage = _activeLanguage; this._isSessionRunning = _isSessionRunning; this._player = (_player == null) ? new Player() : _player; WfLogger.Log(this, LogLevel.DETAILED, "Created new AppSettings (" + this._activeDesign + ", " + this._activeLanguage + ")"); }
// -------------------------------------------------------------------------------------------------------------------------------- /// <summary> /// Sets the currenty active design to the given one, but does not change the actual appearance /// </summary> /// <param name="design">the design enum to which the game is set</param> public void SetActiveDesign(DesignEnum design) { _activeDesign = design; WfLogger.Log("GameSettings.SetActiveDesign(DesignEnum)", LogLevel.DEBUG, "Set active design to " + design); }
// -------------------------------------------------------------------------------------------------------------------------------- public static void SetDesign(DesignEnum design) { _settings.SetActiveDesign(design); WfLogger.Log("PAPIApplication.SetDesign", LogLevel.DEBUG, "Set Design to " + design); }
// -------------------------------------------------------------------------------------------------------------------------------- /// <param name="design"></param> /// <returns>The path of the file which includes all images for the given design</returns> public static string GetFilePath_Images(DesignEnum design) { return(GetFilePath_Game() + "\\PAPIClasses\\Resources\\Images\\" + design.ToString().ToLower()); }