Exemple #1
0
        public override Group CreateGroup(SPRibbon ribbon,
                                          string id,
                                          GroupProperties properties,
                                          string title,
                                          string description,
                                          string command,
                                          Dictionary <string, List <Control> > controls,
                                          Dictionary <string, string> pars)
        {
            DeclarativeTemplateBuildContext bc = new DeclarativeTemplateBuildContext();

            bc.Ribbon     = ribbon;
            bc.Controls   = controls;
            bc.Parameters = pars;

            Group group = ribbon.CreateGroup(id, properties, title, description, command);

            // Loop through the Layouts for this group and create them.
            JSObject[] children = DataNodeWrapper.GetNodeChildren(_data);
            for (int i = 0; i < children.Length; i++)
            {
                Layout layout = CreateLayoutFromData(children[i], group, bc);
                if (!CUIUtility.IsNullOrUndefined(layout))
                {
                    group.AddChild(layout);
                }
            }
            return(group);
        }
        public override Group CreateGroup(SPRibbon ribbon,
                                          string id,
                                          GroupProperties properties,
                                          string title,
                                          string description,
                                          string command,
                                          Dictionary<string, List<Control>> controls,
                                          Dictionary<string, string> pars)
        {
            DeclarativeTemplateBuildContext bc = new DeclarativeTemplateBuildContext();
            bc.Ribbon = ribbon;
            bc.Controls = controls;
            bc.Parameters = pars;

            Group group = ribbon.CreateGroup(id, properties, title, description, command);

            // Loop through the Layouts for this group and create them.
            JSObject[] children = DataNodeWrapper.GetNodeChildren(_data);
            for (int i = 0; i < children.Length; i++)
            {
                Layout layout = CreateLayoutFromData(children[i], group, bc);
                if (!CUIUtility.IsNullOrUndefined(layout))
                    group.AddChild(layout);
            }
            return group;
        }
Exemple #3
0
 /// <summary>
 /// Creates a Group with this kind of template.
 /// </summary>
 /// <param name="ribbon">The Ribbon that this Group will be a part of.</param>
 /// <param name="id">Component id of the created Group</param>
 /// <param name="title">Title of the created Group</param>
 /// <param name="description">description of the created Group</param>
 /// <param name="command">command of the created Group(used for enabling/disabling through polling)</param>
 /// <param name="controls">array of Controls that will be used in the Temaplate(the order matters)</param>
 /// <param name="parameters">additional parameters for this Template</param>
 /// <returns>the created Group</returns>
 public abstract Group CreateGroup(SPRibbon ribbon,
                                   string id,
                                   GroupProperties properties,
                                   string title,
                                   string description,
                                   string command,
                                   Dictionary<string, List<Control>> controls,
                                   Dictionary<string, string> parameters);
Exemple #4
0
 /// <summary>
 /// Creates a Group with this kind of template.
 /// </summary>
 /// <param name="ribbon">The Ribbon that this Group will be a part of.</param>
 /// <param name="id">Component id of the created Group</param>
 /// <param name="title">Title of the created Group</param>
 /// <param name="description">description of the created Group</param>
 /// <param name="command">command of the created Group(used for enabling/disabling through polling)</param>
 /// <param name="controls">array of Controls that will be used in the Temaplate(the order matters)</param>
 /// <param name="parameters">additional parameters for this Template</param>
 /// <returns>the created Group</returns>
 public abstract Group CreateGroup(SPRibbon ribbon,
                                   string id,
                                   GroupProperties properties,
                                   string title,
                                   string description,
                                   string command,
                                   Dictionary <string, List <Control> > controls,
                                   Dictionary <string, string> parameters);
Exemple #5
0
 /// <summary>
 /// Creates a new Group.
 /// </summary>
 /// <param name="ribbon">The Ribbon that this Group is created by and is a part of.</param>
 /// <param name="id">The unique Component id of this Group.</param>
 /// <param name="title">The Title of this Group.</param>
 /// <param name="description">The Description of this Group.</param>
 internal Group(SPRibbon ribbon,
                string id,
                string title,
                string description,
                string command,
                GroupProperties properties)
     : base(ribbon, id, title, description)
 {
     _command = command;
     _properties = properties;
 }
Exemple #6
0
 /// <summary>
 /// Creates a new Group.
 /// </summary>
 /// <param name="ribbon">The Ribbon that this Group is created by and is a part of.</param>
 /// <param name="id">The unique Component id of this Group.</param>
 /// <param name="title">The Title of this Group.</param>
 /// <param name="description">The Description of this Group.</param>
 internal Group(SPRibbon ribbon,
                string id,
                string title,
                string description,
                string command,
                GroupProperties properties)
     : base(ribbon, id, title, description)
 {
     _command    = command;
     _properties = properties;
 }
Exemple #7
0
 /// <summary>
 /// Creates a Group.
 /// </summary>
 /// <param name="id">Component id of the Group.</param>
 /// <param name="title">Title of the Group.</param>
 /// <param name="description">Description of the Group.</param>
 /// <returns>The created Group.</returns>
 internal Group CreateGroup(string id, GroupProperties properties, string title, string description, string command)
 {
     return new Group(this, id, title, description, command, properties);
 }