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); } }
public void ClearModifierGroup(string modifierKind) { ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifierKind); if (block != null && block.Visible) { ClearModifier(block.Text); } }
public void ClearModifierCore(string modifier) { ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier); if (block != null) { block.Clear(); } }
//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); }
public void SetCore(string modifier) { ModifierSelectionBlock block = ModifierBlocks.FindBlockForModifier(modifier); if (block == null || block.IsSet(modifier)) { return; } block.Set(modifier); }
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); } }
protected virtual void RemoveModifierBlock(ModifierSelectionBlock modifierBlock) { ModifierBlocks.Remove(modifierBlock); modifierBlock.Delete(); }
protected virtual void AddModifierBlock(ModifierSelectionBlock modifierBlock) { ModifierBlocks.Add(modifierBlock); this.Add(modifierBlock); }