Exemple #1
0
        public MenuCommand(Codon codon, object caller, bool createCommand, IReadOnlyCollection <ICondition> conditions)
        {
            this.RightToLeft = RightToLeft.Inherit;
            this.caller      = caller;
            this.codon       = codon;
            this.conditions  = conditions;

            if (createCommand)
            {
                this.command = CommandWrapper.CreateCommand(codon, conditions);
            }
            else
            {
                this.command = CommandWrapper.CreateLazyCommand(codon, conditions);
            }

            UpdateText();
        }