// PopUpの初期化 protected void SetPopupItem(PanelItem popInfo) { PopPanel.PopUpMode = true; PopPanel.SetBorderStyleFromSettings(); UpdatePopupPosition(popInfo); Popup.Width = Math.Max(popInfo.Width, PopWidth) + PopPanel.WidthMarginRight; if (popInfo.TopPos < scroll.ContentVerticalOffset) { Popup.MinHeight = Math.Max(0, popInfo.BottomPos - scroll.ContentVerticalOffset); } else { Popup.MinHeight = Math.Max(0, Math.Min(scroll.ContentVerticalOffset + scroll.ViewportHeight - popInfo.TopPos - PopPanel.HeightMarginBottom, popInfo.Height)); } PopPanel.Item = Activator.CreateInstance(popInfo.GetType(), popInfo.Data) as PanelItem; PopPanel.Item.Width = Popup.Width - PopPanel.WidthMarginRight; PopPanel.Item.Height = Math.Max(PopPanel.GetMaxRenderHeight(9999), Popup.MinHeight); Popup.Height = PopPanel.Item.Height + PopPanel.HeightMarginBottom; SetPopupItemEx(popInfo); UpdatePopupReDraw(); }
protected virtual void UpdatePopupReDraw() { if (PopPanel.Item == null) { return; } PopPanel.Item.LeftPos = Canvas.GetLeft(Popup); PopPanel.Item.TopPos = Canvas.GetTop(Popup); PopPanel.InvalidateVisual(); }
protected virtual void SetPopPanel(PanelItem popInfo) { PopPanel.PopUpMode = true; PopPanel.SetBorderStyleFromSettings(); PopPanel.Item = Activator.CreateInstance(popInfo.GetType(), popInfo.Data) as PanelItem; PopPanel.Item.Width = PopWidth - PopPanel.WidthMarginRight; PopPanel.Item.Height = Math.Max(PopPanel.GetMaxRenderHeight(9999), Popup.MinHeight); Popup.Height = PopPanel.Item.Height + PopPanel.HeightMarginBottom; UpdatePopupReDraw(); }
protected void lnk_click(object sender, EventArgs e) { LinkButton rd = (LinkButton)sender; GridViewRow r = (GridViewRow)rd.Parent.NamingContainer; LinkButton lnkenroll = (LinkButton)gvSA.Rows[r.RowIndex].FindControl("lnk"); DataTable dt = sa.getstudentDetails(lnkenroll.Text.Trim()); if (dt.Rows.Count > 0) { PopPanel.Show(); } }
// Update is called once per frame void Update() { if (!listenMouse) { return; } if (Input.GetMouseButtonDown(1)) { PopPanel popPanel = GetComponent <PopPanel>(); Vector3 mousepos = Input.mousePosition; popPanel.transform.position = mousepos; } }
public static void ShowPopPanel(PopPanel popPanel, params int[] args) { bool hasAddTask = false; foreach (var task in allPopTaskOrderList) { if (task.panelType == popPanel) { task.taskQueue.Enqueue(args); hasAddTask = true; break; } } if (!hasAddTask) { Debug.LogError("没有配置面板的优先级,面板类型:" + popPanel); return; } if (_popAnimationCor is null) { _popAnimationCor = TaskEngine.StartCoroutine(ExcutePopPanelShowTask()); } }
public static IUIBase GetUI(PopPanel popPanel) { return(GetUI((int)popPanel)); }