void PopulateContent(ActiveResourceContainer <LocationAttractionItemProperties> attractionContent)
        {
            var isUnlocked = Data.IsUnlocked(attractionContent.ActivationContext, attractionContent.Resource);

            PanelLink toPush = null;

            var contentItem = attractionContent.Resource.GetItem();

            if (contentItem is ScreenMessage)
            {
                toPush = ScreenMessagePanelLink;
            }
            else if (contentItem is MediaContent)
            {
                toPush = AudioPanelLink;
            }

            var item = AddSelectableItem(AttractionContentItem, (_item) =>
            {
                if (toPush)
                {
                    toPush.Push(contentItem);
                }
            });

            item.Selectable = isUnlocked;

            item.SetText(attractionContent.Resource.Title);
            item.SetText(item.Description, attractionContent.Resource.Description);

            item.Locked.SetActive(!isUnlocked);
            item.Unlocked.SetActive(isUnlocked);
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                imgTimeWarning.ImageUrl = Page.ClientScript.GetWebResourceUrl(typeof(BreadcrumbCodebehind), "PCAxis.Web.Controls.spacer.gif");
                FillDropDownlist();

                lblResultAs.Text = LocalizationManager.GetLocalizedString(SAVE_AS_CAPTION);
                lnkCancelSaveQuery.NavigateUrl = PanelLink.BuildLink("");
                lnkBack.NavigateUrl            = PanelLink.BuildLink("savequery1");
            }
            SetDisplayModeOnPanels();
        }
Exemplo n.º 3
0
        private void SetDisplayModeOnPanels()
        {
            if (!string.IsNullOrEmpty(QuerystringManager.GetQuerystringParameter(PanelLink.DISPLAY_PANEL)))
            {
                if (QuerystringManager.GetQuerystringParameter(PanelLink.DISPLAY_PANEL).Equals("chartsettings"))
                {
                    pnlSettings.Style.Add("display", "inline-block");
                    lnkShowChartSettings.NavigateUrl = PanelLink.BuildLink("");
                    imgSettingsExpander.CssClass     = "px-settings-collapseimage";
                    return;
                }
            }

            pnlSettings.Style.Add("display", "none");
            lnkShowChartSettings.NavigateUrl = PanelLink.BuildLink("chartsettings");
            imgSettingsExpander.CssClass     = "px-settings-expandimage";
        }
Exemplo n.º 4
0
 private void SetSaveQueryLinks()
 {
     if (this.Visible)
     {
         if (!string.IsNullOrEmpty(QuerystringManager.GetQuerystringParameter(PanelLink.DISPLAY_PANEL)))
         {
             if (QuerystringManager.GetQuerystringParameter(PanelLink.DISPLAY_PANEL).Equals("savequery1"))
             {
                 lnkSaveQueryInformation.NavigateUrl = PanelLink.BuildLink("");
                 imgShowSaveQueryExpander.CssClass   = "px-settings-collapseimage";
                 return;
             }
         }
         lnkSaveQueryInformation.NavigateUrl = PanelLink.BuildLink("savequery1");
         imgShowSaveQueryExpander.CssClass   = "px-settings-expandimage";
     }
 }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PCAxis.Web.Core.Management.PaxiomManager.PaxiomModelBuilder = null;

            if (!IsPostBack)
            {
                imgSettingsExpander.ImageUrl = Page.ClientScript.GetWebResourceUrl(typeof(BreadcrumbCodebehind), "PCAxis.Web.Controls.spacer.gif");
                InitializeChart();

                if (PCAxis.Web.Core.Management.PaxiomManager.PaxiomModel != null)
                {
                    InitializeCommandBar();
                }
                //lnkShowChartSettings.NavigateUrl = PanelLink.BuildLink("chartsettings");
                //lnkHideChartSettings.NavigateUrl = PanelLink.BuildLink("");
                SetDisplayModeOnPanels();
            }
            PCAxis.Web.Core.Management.PaxiomManager.RegisterPaxiomModelChanged(PaxoimModelChanged);
            IsLanguageChanged();
            lnkCancelSettings.NavigateUrl = PanelLink.BuildLink("");
        }
Exemplo n.º 6
0
        //添加窗体
        private void AddPanel(IHSUIComponent panel)
        {
            var canvasGroup = panel.gameObject.GetComponent <CanvasGroup>();

            if (canvasGroup == null)
            {
                canvasGroup = panel.gameObject.AddComponent <CanvasGroup>();
            }
            _panelMap.Add(panel, canvasGroup);

            var link = new PanelLink();

            link.prev = _current;//双向link
            if (_current != null)
            {
                _current.next = link;//双向link
            }

            link.node = panel;
            _current  = link;
            RefreshMonopolizedInfo(panel);
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PCAxis.Web.Core.Management.PaxiomManager.PaxiomModelBuilder = null;

            if (!IsPostBack)
            {
                imgSettingsExpander.ImageUrl = Page.ClientScript.GetWebResourceUrl(typeof(BreadcrumbCodebehind), "PCAxis.Web.Controls.spacer.gif");
                imgTableCropped.ImageUrl     = Page.ClientScript.GetWebResourceUrl(typeof(BreadcrumbCodebehind), "PCAxis.Web.Controls.spacer.gif");
                if (PCAxis.Web.Core.Management.PaxiomManager.PaxiomModel != null)
                {
                    InitializeCommandBar();
                    InitializeTableInformation();
                    InitializeTable();
                }
                //lnkShowTblSettings.NavigateUrl = PanelLink.BuildLink("tablesettings");
                //lnkHideTblSettings.NavigateUrl = PanelLink.BuildLink("");
            }
            SetDisplayModeOnPanels();
            Table1.PxTableCroppedEvent += new EventHandler(HandlePxTableCroppedEvent);

            lblTableCropped.Visible       = false;
            imgTableCropped.Visible       = false;
            lnkCancelSettings.NavigateUrl = PanelLink.BuildLink("");
        }
Exemplo n.º 8
0
        public bool DestroyPanel(IHSUIComponent panel)
        {
            if (!_panelMap.ContainsKey(panel))
            {
                return(false);
            }

            _panelMap.Remove(panel);

            DespawnPanel(panel);

            //如果销毁的是最上层的panel,则重新设置隐藏属性
            if (panel == _current.node)
            {
                while (true)
                {
                    var link = _current.prev;
                    if (link == null)
                    {
                        _current = null;
                        break;
                    }
                    else if (_panelMap.ContainsKey(link.node)) //找到了上一个存在的panel
                    {
                        _current = link;
                        RefreshMonopolizedInfo(link.node);
                        break;
                    }
                    else if (link.node == panel)
                    {
                        LogError("没有按照堆栈顺序关闭面板,引发了未知错误,请程序员查代码!!Name=" + panel.gameObject.name);
                        break;
                    }
                    else if (link.node == null || link.node.ToString() == "null")
                    {
                        LogError("关闭面板内部错误,HSUI内部逻辑错误,请通知HSUI维护者!!Name=" + panel.gameObject.name);
                        break;
                    }
                }
            }
            else //否则连接其两端(将它前后的panel连接起来)
            {
                var p = _current;
                while (p.node != panel && p != null)
                {
                    p = p.prev;
                }

                if (p == null)
                {
                    LogError("关闭面板内部错误2,HSUI内部逻辑错误,请通知HSUI维护者!!Name=" + panel.gameObject.name);
                }
                else //将这个面板的两端相连
                {
                    var prevLink = p.prev;
                    var nextLink = p.next;
                    if (nextLink != null)
                    {
                        nextLink.prev = prevLink;
                    }
                    if (prevLink != null)
                    {
                        prevLink.next = nextLink;
                    }
                }
            }

            return(true);
        }