public ModuleUI(ParticleSystemUI owner, SerializedObject o, string name, string displayName, VisibilityState initialVisibilityState) : base(o, name) { this.m_ToolTip = string.Empty; this.m_ModuleCurves = new List<SerializedProperty>(); this.m_CurvesRemovedWhenFolded = new List<SerializedProperty>(); this.Setup(owner, o, name, displayName, initialVisibilityState); }
protected virtual void SetVisibilityState(VisibilityState newState) { if (newState != this.m_VisibilityState) { if (newState == VisibilityState.VisibleAndFolded) { ParticleSystemCurveEditor particleSystemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor(); foreach (SerializedProperty property in this.m_ModuleCurves) { if (particleSystemCurveEditor.IsAdded(property)) { this.m_CurvesRemovedWhenFolded.Add(property); particleSystemCurveEditor.SetVisible(property, false); } } particleSystemCurveEditor.Refresh(); } else if (newState == VisibilityState.VisibleAndFoldedOut) { ParticleSystemCurveEditor editor2 = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor(); foreach (SerializedProperty property2 in this.m_CurvesRemovedWhenFolded) { editor2.SetVisible(property2, true); } this.m_CurvesRemovedWhenFolded.Clear(); editor2.Refresh(); } this.m_VisibilityState = newState; SessionState.SetInt(base.GetUniqueModuleName(), (int)this.m_VisibilityState); if (newState == VisibilityState.VisibleAndFoldedOut) { this.Init(); } } }
protected override void OnStateChanged(VisibilityState from, VisibilityState to) { // Check if this menu is going from hidden to visible if ((from == VisibilityState.Hidden) && (to == VisibilityState.Visible)) { // Set the Default UI to the default button CurrentDefaultUi = null; } // Call base method base.OnStateChanged(from, to); if (PauseOnShow == true) { if (to == VisibilityState.Visible) { // Stop time Singleton.Get <TimeManager>().IsManuallyPaused = true; } else if (to == VisibilityState.Hidden) { // Resume the time Singleton.Get <TimeManager>().IsManuallyPaused = false; } } }
// public void Hide(float fadeTime) { _fFadeTime = fadeTime; _fFadeCounter = _fFadeTime; _visibilityState = VisibilityState.HIDE_IN_PROGRESS; }
protected override void OnStateChanged(VisibilityState from, VisibilityState to) { // Call base method base.OnStateChanged(from, to); // Check if we're hiding if (to != VisibilityState.Visible) { // Reset all variables selectDefaultAfterSeconds = -1f; lastDisplayedSeconds = 0; // Unbind to event, if any OnDestroy(); } else if (selectDefaultAfterSeconds > 0) { // Unbind to event, if any OnDestroy(); // Grab the time in which this dialog became visible timeDialogShown = Time.realtimeSinceStartup; // Bind to update autoSelectAction = new System.Action <float>(UpdateLabelWithTime); Singleton.Instance.OnRealTimeUpdate += autoSelectAction; } }
protected void UpdateBackgroundVisibility(MenuManager manager) { // Attempt to grab the latest menu VisibilityState currentState = VisibilityState.Hidden; IMenu menu = manager.PeekFromManagedStack(); if (menu != null) { // Setup the next state of the background nextState.BackgroundState = menu.Background; nextState.TitleTranslationKey = menu.TitleTranslationKey; nextState.TitleTranslationArgs = menu.TitleTranslationArgs; // Indicate whether we want to show the background if (nextState.IsVisible == true) { currentState = VisibilityState.Visible; } } // Before changing the state, check if this background is already visible if ((CurrentVisibility == VisibilityState.Visible) && (currentState == VisibilityState.Visible)) { // If so, force the animator to update UpdateAnimator(currentState); } // Set the current state CurrentVisibility = currentState; }
static bool IsChangeInVisibilityValid(IMenu menu, VisibilityState from, VisibilityState to) { // By default, return false bool returnFlag = false; // Check argument "from" value switch (from) { case VisibilityState.Hidden: case VisibilityState.StandBy: // The only valid state from hidden or standby is Visible returnFlag = (to == VisibilityState.Visible); break; case VisibilityState.Visible: // By default, visible can transition to all states. returnFlag = true; if (to == VisibilityState.StandBy) { // Unmanaged menus cannot be set to standby returnFlag = (menu.MenuType != Type.UnmanagedMenu); } break; } return(returnFlag); }
public void AddAffordance(Material material, VRControl control, Renderer renderer, AffordanceTooltip[] tooltips, AffordanceVisibilityDefinition definition) { var key = (int)control; if (m_AffordanceVisibilityStates.ContainsKey(key)) { Debug.LogWarning("Multiple affordaces added to " + this + " for " + control); } m_AffordanceVisibilityStates[key] = new VisibilityState(renderer, tooltips, definition, material); switch (definition.visibilityType) { case VisibilityControlType.AlphaProperty: m_OriginalColor = material.GetFloat(definition.alphaProperty) * Color.white; break; case VisibilityControlType.ColorProperty: m_OriginalColor = material.GetColor(definition.colorProperty); break; } m_StartColor = m_OriginalColor; m_CurrentColor = m_StartColor; }
private IEnumerator AnimateShow() { if (m_VisibilityCoroutine != null) { yield break; } m_VisibilityState = VisibilityState.TransitioningIn; foreach (var face in m_MenuFaces) { face.Show(); } StartCoroutine(AnimateFrameReveal(m_VisibilityState)); const float kTargetScale = 1f; float scale = 0f; float smoothVelocity = 0f; while (!Mathf.Approximately(scale, kTargetScale)) { menuOrigin.localScale = Vector3.one * scale; alternateMenuOrigin.localScale = m_AlternateMenuOriginOriginalLocalScale * scale; scale = Mathf.SmoothDamp(scale, kTargetScale, ref smoothVelocity, 0.125f, Mathf.Infinity, Time.unscaledDeltaTime); yield return(null); } m_VisibilityState = VisibilityState.Visible; menuOrigin.localScale = Vector3.one; alternateMenuOrigin.localScale = m_AlternateMenuOriginOriginalLocalScale; m_VisibilityCoroutine = null; }
/// <summary> /// Handles the menu's visiblility changing. /// Called after <code>CurrentVisibility</code> has already changed. /// </summary> /// <param name="from">The last state.</param> /// <param name="to">The new state the menu is changing to.</param> /// <seealso cref="CurrentVisibility"/> protected virtual void OnStateChanged(VisibilityState from, VisibilityState to) { // Update the animator Animator.SetInteger(stateField, (int)to); // Check to see if we're visible if (to == VisibilityState.Visible) { // Run setup when made visible OnVisibilityChangedToVisible(from, true); } // Check if this is managed if (MenuType != Type.UnmanagedMenu) { // Update the menu manager UpdateMenuManager(this, from, to); } // Stop listening to managed events if this menu is made to be hidden onStateChangedWhileManaged?.Invoke(this, from, to); if ((to == VisibilityState.Hidden) && (onStateChangedWhileManaged != null)) { onStateChangedWhileManaged = null; } }
private void Setup(ParticleSystemUI owner, SerializedObject o, string displayName, VisibilityState defaultVisibilityState) { m_ParticleSystemUI = owner; m_DisplayName = displayName; if (this is RendererModuleUI) { m_Enabled = GetProperty0("m_Enabled"); } else { m_Enabled = GetProperty("enabled"); } m_VisibilityState = VisibilityState.NotVisible; foreach (Object obj in o.targetObjects) { VisibilityState state = (VisibilityState)SessionState.GetInt(GetUniqueModuleName(obj), (int)defaultVisibilityState); m_VisibilityState = (VisibilityState)Mathf.Max((int)state, (int)m_VisibilityState); // use most visible state } CheckVisibilityState(); if (foldout) { Init(); } }
IEnumerator AnimateFrameReveal(VisibilityState visibilityState) { m_MenuFrameRenderer.SetBlendShapeWeight(1, 100f); const float zeroStartBlendShapePadding = 20f; // start the blendShape at a point slightly above the full hidden value for better visibility const float kLerpEmphasisWeight = 0.25f; var smoothTime = visibilityState == VisibilityState.TransitioningIn ? 0.1875f : 0.09375f; // slower if transitioning in var currentBlendShapeWeight = m_MenuFrameRenderer.GetBlendShapeWeight(1); var targetWeight = visibilityState == VisibilityState.TransitioningIn ? 0f : 100f; var smoothVelocity = 0f; currentBlendShapeWeight = currentBlendShapeWeight > 0 ? currentBlendShapeWeight : zeroStartBlendShapePadding; var currentDuration = 0f; while (m_VisibilityState != VisibilityState.Hidden && currentDuration < smoothTime) { currentBlendShapeWeight = MathUtilsExt.SmoothDamp(currentBlendShapeWeight, targetWeight, ref smoothVelocity, smoothTime, Mathf.Infinity, Time.deltaTime); currentDuration += Time.deltaTime; m_MenuFrameRenderer.SetBlendShapeWeight(1, currentBlendShapeWeight * currentBlendShapeWeight); m_MenuFacesMaterial.color = Color.Lerp(m_MenuFacesColor, k_MenuFacesHiddenColor, currentBlendShapeWeight * kLerpEmphasisWeight); yield return(null); } if (m_VisibilityState == visibilityState) { m_MenuFrameRenderer.SetBlendShapeWeight(1, targetWeight); m_MenuFacesMaterial.color = targetWeight > 0 ? m_MenuFacesColor : k_MenuFacesHiddenColor; } if (m_VisibilityState == VisibilityState.Hidden) { m_MenuFrameRenderer.SetBlendShapeWeight(0, 0); } }
public void SetVisibleArea(Rect visibleArea) { if (!IsValid) { throw new ObjectDisposedException(nameof(WpfTextViewLine)); } this.visibleArea = visibleArea; visibilityState = CalculateVisibilityState(); }
IEnumerator AnimateHide() { if (m_VisibilityCoroutine != null) { yield break; } m_VisibilityState = VisibilityState.TransitioningOut; foreach (var face in m_MenuFaces) { face.Hide(); } foreach (var submenus in m_FaceSubmenus) { foreach (var submenu in submenus.Value) { ObjectUtils.Destroy(submenu); } } m_FaceSubmenus.Clear(); if (m_FrameRevealCoroutine != null) { StopCoroutine(m_FrameRevealCoroutine); } m_FrameRevealCoroutine = StartCoroutine(AnimateFrameReveal(m_VisibilityState)); const float kTargetScale = 0f; const float kSmoothTime = 0.06875f; var scale = transform.localScale.x; var smoothVelocity = 0f; var currentDuration = 0f; while (currentDuration < kSmoothTime) { scale = MathUtilsExt.SmoothDamp(scale, kTargetScale, ref smoothVelocity, kSmoothTime, Mathf.Infinity, Time.deltaTime); currentDuration += Time.deltaTime; transform.localScale = Vector3.one * scale; m_AlternateMenu.localScale = m_AlternateMenuOriginOriginalLocalScale * scale; yield return(null); } gameObject.SetActive(false); m_VisibilityState = VisibilityState.Hidden; var snapRotation = GetRotationForFaceIndex(GetClosestFaceIndexForRotation(currentRotation)); m_MenuFaceRotationOrigin.localRotation = Quaternion.Euler(new Vector3(0, snapRotation, 0)); // set intended target rotation m_RotationState = RotationState.AtRest; m_VisibilityCoroutine = null; }
public void Initialize(int PortalId) { _PortalID = PortalId; //_TabID = -1; //_ModuleID = -1; _ModuleDefID = Null.NullInteger; _ModuleOrder = Null.NullInteger; _PaneName = Null.NullString; _ModuleTitle = Null.NullString; _CacheTime = 0; _CacheMethod = Null.NullString; _Alignment = Null.NullString; _Color = Null.NullString; _Border = Null.NullString; _IconFile = Null.NullString; _AllTabs = Null.NullBoolean; _Visibility = VisibilityState.Maximized; _IsDeleted = Null.NullBoolean; _Header = Null.NullString; _Footer = Null.NullString; _StartDate = Null.NullDate; _EndDate = Null.NullDate; _DisplayTitle = true; _DisplayPrint = true; _DisplaySyndicate = Null.NullBoolean; _IsWebSlice = Null.NullBoolean; _WebSliceTitle = ""; _WebSliceExpiryDate = Null.NullDate; _WebSliceTTL = 0; _InheritViewPermissions = Null.NullBoolean; _ContainerSrc = Null.NullString; _DesktopModuleID = Null.NullInteger; _ModuleControlId = Null.NullInteger; _ContainerPath = Null.NullString; _PaneModuleIndex = 0; _PaneModuleCount = 0; _IsDefaultModule = Null.NullBoolean; _AllModules = Null.NullBoolean; if (PortalSettings.Current.DefaultModuleId > Null.NullInteger && PortalSettings.Current.DefaultTabId > Null.NullInteger) { ModuleController objModules = new ModuleController(); ModuleInfo objModule = objModules.GetModule(PortalSettings.Current.DefaultModuleId, PortalSettings.Current.DefaultTabId, true); if (objModule != null) { _Alignment = objModule.Alignment; _Color = objModule.Color; _Border = objModule.Border; _IconFile = objModule.IconFile; _Visibility = objModule.Visibility; _ContainerSrc = objModule.ContainerSrc; _DisplayTitle = objModule.DisplayTitle; _DisplayPrint = objModule.DisplayPrint; _DisplaySyndicate = objModule.DisplaySyndicate; } } }
protected override void OnStateChanged(VisibilityState from, VisibilityState to) { base.OnStateChanged(from, to); // Check if the menu is now visible if (to == VisibilityState.Visible) { SetupRecordsVisibility(); } }
void OnDisable() { allDimensionObjects.Remove(this); isBeingDestroyed = true; visibilityState = VisibilityState.visible; OnStateChangeImmediate?.Invoke(this); OnStateChange?.Invoke(this); OnStateChangeSimple?.Invoke(); SetChannelValuesInMaterials(false); }
protected virtual void HandlePlayerMoveAroundPillar(int dimension, Angle angle) { VisibilityState nextState = DetermineState(dimension, angle); if (nextState != visibilityState) { // If in one fixedUpdate frame we move through both onAngle and offAngle, ignore the state change rules bool ignoreVisibilityStateChangeRules = IgnoreVisibilityStateChangeRules(DimensionPillar.activePillar.cameraAngleRelativeToPillar, angle); SwitchVisibilityState(nextState, ignoreVisibilityStateChangeRules); } }
public DailyPosition() { //Empty constructor t_state = VisibilityState.UpSome; //t_utcdate = null; //t_rise = null; //t_set = null; t_moonfree = 0; t_moonphase = 0; return; }
protected static CheckedState GetCheckedState(VisibilityState visibilityState) { switch (visibilityState) { case VisibilityState.Visible: return CheckedState.Checked; case VisibilityState.Invisible: return CheckedState.Unchecked; default: throw new ArgumentOutOfRangeException("visibilityState"); } }
// public void Show(float fadeTime) { gameObject.SetActive(true); // set alpha to 0, beacasue SetActive(true) sets it to 1 instantly and that couse one frame blink SetRelativeAlpha(0.0f); _fFadeTime = fadeTime; _fFadeCounter = 0.0f; _visibilityState = VisibilityState.SHOW_IN_PROGRESS; }
void OnVisibilityChangedToVisible(VisibilityState from, bool forceCenter) { // Check if we've been setup if (CurrentSetupState == SetupState.NotSetup) { // If not, start setting up Setup(); } // Check if there's a default UI ScrollToDefaultUi(from, forceCenter); }
public void ToggleVisibility() { switch (VisibilityState) { case VisibilityState.Visible: VisibilityState = VisibilityState.Invisible; break; case VisibilityState.Invisible: VisibilityState = VisibilityState.Visible; break; default: throw new ArgumentOutOfRangeException(); } }
protected override void SetVisibilityState(VisibilityState newState) { base.SetVisibilityState(newState); // Show tools again when module is not visible if (newState != VisibilityState.VisibleAndFoldedOut) { s_SelectedTransform = null; editingPlanes = false; } else { SyncVisualization(); } }
protected override void OnStateChanged(VisibilityState from, VisibilityState to) { // Check if this menu is going from hidden to visible if (to == VisibilityState.Visible) { // Use the last stored name nameField.text = Settings.LastEnteredName; } else if (to == VisibilityState.Hidden) { RecordNewHighScore(); } // Call base method base.OnStateChanged(from, to); }
protected override void OnStateChanged(VisibilityState from, VisibilityState to) { // Call base method base.OnStateChanged(from, to); // Check if we're making this menu visible and unlocked a new level if ((from == VisibilityState.Hidden) && (to == VisibilityState.Visible) && (SceneChanger.UnlockNextLevel() == true)) { // Update the level select menu as well LevelSelectMenu levelMenu = Manager.GetMenu <LevelSelectMenu>(); if (levelMenu != null) { levelMenu.SetButtonsEnabled(true); } } }
private void VisibilityChangedHandler(VisibilityState state) { switch (state) { case VisibilityState.Visible: Console.WriteLine("SampleFormPresenter.VisibilityChangedHandler(visible)"); break; case VisibilityState.Invisible: Console.WriteLine("SampleFormPresenter.VisibilityChangedHandler(invisible)"); CleanUp(); break; default: throw new ArgumentOutOfRangeException("state"); } }
protected override void OnStateChanged(VisibilityState from, VisibilityState to) { // Call base method base.OnStateChanged(from, to); // Unbind to Singleton's update function StopListeningToUpdate(); if (to == VisibilityState.Visible) { OnShow(); } else if (to == VisibilityState.Hidden) { OnHide(); } }
internal override void Initialize() { //Start by calling the base initialize method, which will determine a destination and enable movement. base.Initialize(); //Set the fish to the moving state. currentFishState = FishState.Moving; //The fish will start in the visible state. Determine the time, and set the state. visibilityStateStartTime = Time.time; visibilityStateWaitTime = Random.Range(minimumVisibleTime, maximumVisibleTime); currentVisualState = VisibilityState.Visible; //We also want to reduce the initial fish visibility time to some random lower amount, so they don't all disappear at the same time. //To do this, we'll reduce this initial visibility state wait time by a random amount from 0 to the wait time. visibilityStateWaitTime -= Random.Range(0f, visibilityStateWaitTime); }
void UpdateAnimator(VisibilityState state) { // Update the animator if (state == VisibilityState.Visible) { // Update the background visibility Animator.SetInteger(backgroundTypeField, (int)nextState.BackgroundState); // Check whether to show the title AnimateTitleVisibility(); } else { Animator.SetInteger(backgroundTypeField, (int)BackgroundType.Hidden); Animator.SetBool(titleVisibilityField, false); } }
void Materialize() { VisibilityState desiredState = (VisibilityState)(((int)corporealCubeDimensionObj.visibilityState + 2) % 4); int desiredDimension = corporealCubeDimensionObj.GetDimensionWhereThisObjectWouldBeInVisibilityState(v => v == desiredState); if (desiredDimension == -1) { Debug.LogError($"Could not find a dimension where {corporealCubeDimensionObj.visibilityState} becomes {desiredState}"); } else { corporealCubeDimensionObj.Dimension = desiredDimension; } ResetMaterialsOtherDimensions(); state = State.Materializing; }
// void Update() { if (_canvasGroup == null && _canvasRenderer == null) { return; } switch (_visibilityState) { case VisibilityState.SHOW_IN_PROGRESS: _fFadeCounter += Time.unscaledDeltaTime; if (_fFadeCounter >= _fFadeTime) { _fFadeCounter = _fFadeTime; _visibilityState = VisibilityState.SHOW; OnShowComplete(); } // fade progress is always [0 - 1] float fShowProgress = _fFadeCounter / _fFadeTime; SetRelativeAlpha(fShowProgress); break; case VisibilityState.HIDE_IN_PROGRESS: _fFadeCounter -= Time.unscaledDeltaTime; if (_fFadeCounter <= 0.0f) { _fFadeCounter = _fFadeTime; _visibilityState = VisibilityState.HIDE; OnHideComplete(); } // fade progress is always [0 - 1] float fHideProgress = _fFadeCounter / _fFadeTime; SetRelativeAlpha(fHideProgress); // deactivate unvisible object if (_visibilityState == VisibilityState.HIDE) { gameObject.SetActive(false); } break; } }
public void SetVisible(VisibilityState state) { switch (state) { case VisibilityState.NORMAL: { r.material = normal; } break; case VisibilityState.VISIBLE: { r.material = visible; } break; } }
private IEnumerator AnimateShow() { if (m_VisibilityCoroutine != null) { yield break; } m_VisibilityState = VisibilityState.TransitioningIn; foreach (var face in m_MenuFaces) { face.Show(); } if (m_FrameRevealCoroutine != null) { StopCoroutine(m_FrameRevealCoroutine); } m_FrameRevealCoroutine = StartCoroutine(AnimateFrameReveal(m_VisibilityState)); for (int i = 0; i < m_MenuFaceContainers.Length; ++i) { StartCoroutine(AnimateFaceReveal(i)); } const float kTargetScale = 1f; const float kSmoothTime = 0.125f; var scale = 0f; var smoothVelocity = 0f; var currentDuration = 0f; while (currentDuration < kSmoothTime) { scale = MathUtilsExt.SmoothDamp(scale, kTargetScale, ref smoothVelocity, kSmoothTime, Mathf.Infinity, Time.unscaledDeltaTime); currentDuration += Time.unscaledDeltaTime; transform.localScale = Vector3.one * scale; m_AlternateMenu.localScale = m_AlternateMenuOriginOriginalLocalScale * scale; yield return(null); } m_VisibilityState = VisibilityState.Visible; m_VisibilityCoroutine = null; }
public void SetVisibleArea(Rect visibleArea) { if (!IsValid) throw new ObjectDisposedException(nameof(WpfTextViewLine)); this.visibleArea = visibleArea; visibilityState = CalculateVisibilityState(); }
private void Setup(ParticleSystemUI owner, SerializedObject o, string name, string displayName, VisibilityState defaultVisibilityState) { this.m_ParticleSystemUI = owner; this.m_DisplayName = displayName; if (this is RendererModuleUI) { this.m_Enabled = base.GetProperty0("m_Enabled"); } else { this.m_Enabled = base.GetProperty("enabled"); } this.m_VisibilityState = (VisibilityState) SessionState.GetInt(base.GetUniqueModuleName(), (int) defaultVisibilityState); this.CheckVisibilityState(); if (this.foldout) { this.Init(); } }
public ONDisplaySetItem(string name) { Path = name; InData = true; Visibility = VisibilityState.Visible; }
protected virtual void SetVisibilityState(VisibilityState newState) { if (newState != this.m_VisibilityState) { if (newState == VisibilityState.VisibleAndFolded) { ParticleSystemCurveEditor particleSystemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor(); foreach (SerializedProperty property in this.m_ModuleCurves) { if (particleSystemCurveEditor.IsAdded(property)) { this.m_CurvesRemovedWhenFolded.Add(property); particleSystemCurveEditor.SetVisible(property, false); } } particleSystemCurveEditor.Refresh(); } else if (newState == VisibilityState.VisibleAndFoldedOut) { ParticleSystemCurveEditor editor2 = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor(); foreach (SerializedProperty property2 in this.m_CurvesRemovedWhenFolded) { editor2.SetVisible(property2, true); } this.m_CurvesRemovedWhenFolded.Clear(); editor2.Refresh(); } this.m_VisibilityState = newState; SessionState.SetInt(base.GetUniqueModuleName(), (int) this.m_VisibilityState); if (newState == VisibilityState.VisibleAndFoldedOut) { this.Init(); } } }
protected void SetButtonCheckedState(VisibilityState visibilityState) { var checkedState = GetCheckedState(visibilityState); _buttonView.SetCheckedState(checkedState); }
private void ManageFormSubsystem(VisibilityState visibilityState) { switch (visibilityState) { case VisibilityState.Visible: ConstructSystem(); break; case VisibilityState.Invisible: DestroySystem(); break; default: throw new ArgumentOutOfRangeException("visibilityState"); } }
public void SetVisible() { if (visibilityState == VisibilityState.Visible)//Ignore if not changing return; visibilityState = VisibilityState.Visible; //Re-render tile on visibility overlay texture chunk.visibilityOverlay.UpdateTileVisibility(this); for (int i = 0; i < neighbors.Count; i++)//Update neighbors neighbors[i].OnNeighborVisibilityChanged(this); }
public void RaiseEvent(VisibilityState visibilityState) { if (Blah != null) Blah(visibilityState); }
public void Initialize(int PortalId) { _PortalID = PortalId; _TabID = -1; _ModuleID = -1; _ModuleDefID = -1; _ModuleOrder = -1; _PaneName = ""; _ModuleTitle = ""; _AuthorizedEditRoles = ""; _CacheTime = -1; _AuthorizedViewRoles = ""; _Alignment = ""; _Color = ""; _Border = ""; _IconFile = ""; _AllTabs = false; _Visibility = VisibilityState.Maximized; _IsDeleted = false; _Header = ""; _Footer = ""; _StartDate = Null.NullDate; _EndDate = Null.NullDate; _DisplayTitle = true; _DisplayPrint = true; _DisplaySyndicate = false; _InheritViewPermissions = false; _ContainerSrc = ""; _DesktopModuleID = -1; _FriendlyName = ""; _Description = ""; _Version = ""; _IsPremium = false; _IsAdmin = false; _SupportedFeatures = 0; _BusinessControllerClass = ""; _ModuleControlId = -1; _ControlSrc = ""; _ControlType = SecurityAccessLevel.Anonymous; _ControlTitle = ""; _HelpUrl = ""; _ContainerPath = ""; _PaneModuleIndex = 0; _PaneModuleCount = 0; _IsDefaultModule = false; _AllModules = false; // get default module settings Hashtable settings = PortalSettings.GetSiteSettings(PortalId); if (Convert.ToString(settings["defaultmoduleid"]) != "" && Convert.ToString(settings["defaulttabid"]) != "") { ModuleController objModules = new ModuleController(); ModuleInfo objModule = objModules.GetModule(int.Parse(Convert.ToString(settings["defaultmoduleid"])), int.Parse(Convert.ToString(settings["defaulttabid"])), true); if (objModule != null) { _CacheTime = objModule.CacheTime; _Alignment = objModule.Alignment; _Color = objModule.Color; _Border = objModule.Border; _IconFile = objModule.IconFile; _Visibility = objModule.Visibility; _ContainerSrc = objModule.ContainerSrc; _DisplayTitle = objModule.DisplayTitle; _DisplayPrint = objModule.DisplayPrint; _DisplaySyndicate = objModule.DisplaySyndicate; } } }