Esempio n. 1
0
        /// <summary>
        /// 获取布局信息
        /// </summary>
        /// <param name="template">布局信息</param>
        public void GetLayout(ref IndicatorLayout layout)
        {
            TextBoxA       txtLayoutName  = GetTextBox("txtLayoutName");
            LayoutScaleDiv layoutScaleDiv = FindControl("divLayoutScale") as LayoutScaleDiv;

            if (m_layout.m_layoutID != null && m_layout.m_layoutID.Length > 0)
            {
                layout.m_layoutID = m_layout.m_layoutID;
            }
            layout.m_name   = txtLayoutName.Text;
            layout.m_text   = layoutScaleDiv.LayoutStr;
            layout.m_userID = DataCenter.UserID;
        }
Esempio n. 2
0
        /// <summary>
        /// 加载布局
        /// </summary>
        /// <param name="layout">布局信息</param>
        private void LoadLayout(IndicatorLayout layout)
        {
            TextBoxA       txtLayoutName  = GetTextBox("txtLayoutName");
            LayoutScaleDiv layoutScaleDiv = FindControl("divLayoutScale") as LayoutScaleDiv;
            ButtonA        btnDelete      = GetButton("btnDelete");
            ButtonA        btnApply       = GetButton("btnApply");
            ButtonA        btnCreate      = GetButton("btnCreate");
            ButtonA        btnSave        = GetButton("btnSave");

            txtLayoutName.Text       = layout.m_name;
            layoutScaleDiv.LayoutStr = layout.m_text;
            bool btnEnabled = (layout.m_layoutID != null && layout.m_layoutID.Length > 0);

            btnDelete.Enabled = btnEnabled;
            btnApply.Enabled  = btnEnabled;
            btnSave.Enabled   = btnEnabled;
        }