Exemplo n.º 1
0
        public virtual void Set(string modifier)
        {
            if (string.IsNullOrEmpty(modifier))
            {
                return;
            }
            // Param.CheckNonEmptyString(modifier, "modifier");

            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier);

            if (block == null || block.IsSet(modifier))
            {
                return;
            }

            if (this.Root != null)
            {
                IAction action = new SetModifierAction(this, modifier);
                Root.ActionManager.RecordAction(action);
            }
            else
            {
                SetCore(modifier);
            }
        }
Exemplo n.º 2
0
        public void ClearModifierGroup(string modifierKind)
        {
            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifierKind);

            if (block != null && block.Visible)
            {
                ClearModifier(block.Text);
            }
        }
Exemplo n.º 3
0
        public void ClearModifierCore(string modifier)
        {
            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier);

            if (block != null)
            {
                block.Clear();
            }
        }
Exemplo n.º 4
0
        //public bool IsModifierKindSet(string modifierKind)
        //{
        //    ModifierSelectionBlock block = ModifierBlocks.FindBlockByModifierKind(modifierKind);
        //    if (block != null)
        //    {
        //        return block.Visible;
        //    }
        //    return false;
        //}

        public bool IsModifierGroupSet(string modifier)
        {
            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier);

            if (block != null)
            {
                return(block.Visible);
            }
            return(false);
        }
Exemplo n.º 5
0
        public void SetCore(string modifier)
        {
            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier);

            if (block == null || block.IsSet(modifier))
            {
                return;
            }

            block.Set(modifier);
        }
Exemplo n.º 6
0
        protected override void ExecuteCore()
        {
            ModifierSelectionBlock block = Container.ModifierBlocks.FindBlockForModifier(Modifier);

            if (block == null)
            {
                return;
            }

            if (block.Visible)
            {
                oldModifier = block.Text;
            }

            if (oldModifier != Modifier)
            {
                Container.SetCore(Modifier);
            }
        }
Exemplo n.º 7
0
 protected virtual void RemoveModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Remove(modifierBlock);
     modifierBlock.Delete();
 }
Exemplo n.º 8
0
 protected virtual void AddModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Add(modifierBlock);
     this.Add(modifierBlock);
 }
Exemplo n.º 9
0
 protected virtual void RemoveModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Remove(modifierBlock);
     modifierBlock.Delete();
 }
Exemplo n.º 10
0
 protected virtual void AddModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Add(modifierBlock);
     this.Add(modifierBlock);
 }