private ScenarioWidgetState matchCommand(string cmd) { Type type; ScenarioCommandTypes commandkey = (ScenarioCommandTypes)Enum.Parse(typeof(ScenarioCommandTypes), cmd); type = _commandDic[commandkey]; ScenarioWidgetState state = new ScenarioWidgetState(); state.FoldOut = true; state.type = type; state.CommandType = commandkey; state.Entitys.Add((BaseCommandModel)Activator.CreateInstance(type)); return(state); }
public ScenarioCommandAttribute(ScenarioCommandTypes type) { _Type = type; }