示例#1
0
        public Collection <IVersionableCommand> GetCommands(Guid itemType)
        {
            var result = new Collection <IVersionableCommand>();

            // Here, we will create four commands to be displayed in the
            // ribbon. Each command has a unique parameter, in this case
            // just a simple string.
            string[] parameters = new[]
            {
                "Param 1",
                "Param 2",
                "Param 3",
                "Param 4"
            };

            int weight = 10000;

            foreach (string param in parameters)
            {
                var command = new SampleCommandWithParameter(param, weight);
                weight++;
                result.Add(command);
            }

            return(result);
        }
        public Collection<IVersionableCommand> GetCommands(Guid itemType)
        {
            var result = new Collection<IVersionableCommand>();

            // Here, we will create four commands to be displayed in the
            // ribbon. Each command has a unique parameter, in this case
            // just a simple string.
            string[] parameters = new[]
            {
                "Param 1",
                "Param 2",
                "Param 3",
                "Param 4"
            };

            int weight = 10000;
            foreach (string param in parameters)
            {
                var command = new SampleCommandWithParameter(param, weight);
                weight++;
                result.Add(command);
            }

            return result;
        }