Exemplo n.º 1
0
        public override void Go()
        {
            ExtMasterPage masterPage = _Page.Master as ExtMasterPage;
            List <string> statements = new List <string>();
            string        statement  = string.Empty;

            if (_Controls.Count > 0)
            {
                statement = string.Empty;
                _Controls.ForEach(c =>
                                  statement += string.Format("{0}:{1}",
                                                             statement.Length == 0 ? c.ID : "," + c.ID, c.ClientID));
                statement = string.Format("{0}.os={{{1}}};", ObjectHandle, statement);
            }

            if (!string.IsNullOrEmpty(statement))
            {
                statements.Add(statement);
            }
            if (!string.IsNullOrEmpty(
                    _StartupStatement))
            {
                statements.Add(_StartupStatement);
            }

            if (statements.Count > 0)
            {
                statement = string.Empty;
                statements.ForEach(s => statement += s);
                masterPage.ExtManager.Listeners.DocumentReady.Handler = statement;
            }
        }
Exemplo n.º 2
0
 public ExtPageDecorator Configure(Action <ResourceManager> handle)
 {
     if (_ExtManager == null)
     {
         ExtMasterPage masterPage = _Page.Master as ExtMasterPage;
         _ExtManager = masterPage.ExtManager;
     }
     handle(_ExtManager);
     return(this);
 }