bool AllowedAction(PAction action){ return allowedActions.GetValue().Contains(action); }
/// <summary> /// Logs when the mod is loaded. /// </summary> public static void OnLoad() { PUtil.InitLibrary(); BulkChangeAction = PAction.Register(BulkChangeStrings.ACTION_KEY, BulkChangeStrings.ACTION_TITLE, new PKeyBinding(KKeyCode.Q)); }
public bool Action(string USERGROUP_OID, string Name, string Desc, string UserLogin, bool rowState, PAction action) { /* * [USERGROUP_OID], * [Name], * [Desc], * [CREATE_BY], * [CREATE_DATE], * [UPDATE_BY], * [UPDATE_DATE], * [ROW_STATE]*/ dt = UserGroupDto.Data(); dr = dt.NewRow(); dr["USERGROUP_OID"] = USERGROUP_OID; dr["Name"] = Name; dr["Desc"] = Desc; dr["CREATE_BY"] = UserLogin; dr["CREATE_DATE"] = ""; dr["UPDATE_BY"] = UserLogin; dr["UPDATE_DATE"] = ""; dr["ROW_STATE"] = rowState?"1":"0"; dt.Rows.Add(dr); switch (action) { case PAction.Add: isCan = Add(); break; case PAction.Update: isCan = Update(); break; case PAction.Delete: isCan = Delete(); break; } return(isCan); }
/// <summary> /// Registers the UI debug action (default Alt+U) to dump UI element trees to the log. /// </summary> internal static void RegisterUIDebug() { UIDebugAction = new PActionManager().CreateAction("DebugNotIncluded.UIDebugAction", DebugNotIncludedStrings.INPUT_BINDINGS.DEBUG.SNAPSHOT, new PKeyBinding( KKeyCode.U, Modifier.Alt)); }