コード例 #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);
            }
        }
コード例 #2
0
        public void ClearModifierGroup(string modifierKind)
        {
            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifierKind);

            if (block != null && block.Visible)
            {
                ClearModifier(block.Text);
            }
        }
コード例 #3
0
        public void ClearModifierCore(string modifier)
        {
            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier);

            if (block != null)
            {
                block.Clear();
            }
        }
コード例 #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);
        }
コード例 #5
0
        public void SetCore(string modifier)
        {
            ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier);

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

            block.Set(modifier);
        }
コード例 #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);
            }
        }
コード例 #7
0
 protected virtual void RemoveModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Remove(modifierBlock);
     modifierBlock.Delete();
 }
コード例 #8
0
 protected virtual void AddModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Add(modifierBlock);
     this.Add(modifierBlock);
 }
コード例 #9
0
 protected virtual void RemoveModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Remove(modifierBlock);
     modifierBlock.Delete();
 }
コード例 #10
0
 protected virtual void AddModifierBlock(ModifierSelectionBlock modifierBlock)
 {
     ModifierBlocks.Add(modifierBlock);
     this.Add(modifierBlock);
 }