Exemplo n.º 1
0
        protected void extenderTemplate_GetDataSource(string sPrefix, int iCount, object context, ref IEnumerable result)
        {
            OguCommandHelper.RegisterAllCommands();

            DataTable dtTrans = new DataTable();

            dtTrans.Columns.Add("ID", typeof(string));
            dtTrans.Columns.Add("Text", typeof(string));
            dtTrans.Columns.Add("Value", typeof(string));

            int i = 0;

            foreach (ICommand command in FilterCommands(sPrefix))
            {
                DataRow row = dtTrans.NewRow();

                row["ID"]    = string.Empty;
                row["Text"]  = command.HelperString;
                row["Value"] = command.Name;

                dtTrans.Rows.Add(row);

                i++;
            }

            result = (IEnumerable)dtTrans.DefaultView;
        }
Exemplo n.º 2
0
 static CommandService()
 {
     OguCommandHelper.RegisterAllCommands();
 }