private void CleanUpWakeLock() { if (null != m_TurnOn) { try { m_TurnOn.Dispose(); } catch { } m_TurnOn = null; } if (null != m_TurnOff) { try { m_TurnOff.Dispose(); } catch { } m_TurnOff = null; } }
/// <summary> /// 注册游戏动作 /// </summary> /// <param name="">注册动作</param> private void Registered(IExecuteAction executeAction) { if (this.executeActionDict.TryAdd(executeAction.ID, executeAction) == false) { throw new ArgumentException($"插入的动作ID:{executeAction.ID}已存在"); } }
static void Main(string[] args) { Sweet[] sweets = new Sweet[] { new RedSweet(10), new BlueSweet(10) }; foreach (IExecuteAction sweet in sweets) { sweet.Action(); } BlueSweet bs = new BlueSweet(10); BigBlueSweet bbs = new BigBlueSweet(10); IExecuteAction i1 = bbs; i1.Action(); ActionItemList list = new ActionItemList(); }
public TurnOnOffScreenViewModel(IExecuteAction turnOff, IExecuteAction turnOn) { m_TurnOff = turnOff; m_TurnOn = turnOn; }
public BulbItem(string text, IExecuteAction action) { _text = text; this.action = action; }
public ActionNode(string i_Title, IExecuteAction i_ActionToPerform) { Title = i_Title; m_ActionToPerform = i_ActionToPerform; }