/// <summary> /// /// </summary> /// <param name="fun"></param> /// <param name="cat"></param> public void DropFunction(MFunction fun, int cat) { _DBE.ReInit(); _DBE.AddTable(DataConst.P3100600); _DBE.AddWhere(DataConst.P3100601, fun.Order.ToString()); _DBE.AddWhere(DataConst.P3100602, fun.SolId); _DBE.AddWhere(DataConst.P3100603, cat.ToString()); _DBE.ExecuteDelete(); }
private static IFunction CreateControl(MFunction mFun) { switch (mFun.Action) { case EAction.ThreadWait: return new ThreadWait(); case EAction.ExecuteApp: return new ExecuteApp(); case EAction.ShowWindow: return new ShowWindow(); case EAction.HideWindow: return new HideWindow(); case EAction.GetControl: return new GetControl(); case EAction.KeybdInput: return new KeybdInput(); case EAction.MouseInput: return new MouseInput(); default: return null; } }
private void ShowControlSuf(IFunction iFun, MFunction mFun) { iFun.UserControl.Location = new System.Drawing.Point(0, 0); iFun.UserControl.Size = new System.Drawing.Size(262, 27); iFun.UserControl.TabIndex = 1; iFun.UserFunction = mFun; if (_sufIF != null) { PlSuf.Controls.Remove(_sufIF.UserControl); } _sufIF = iFun; PlSuf.Controls.Add(_sufIF.UserControl); }
/// <summary> /// /// </summary> /// <param name="row"></param> /// <returns></returns> private static MFunction ReadFunction(DataRow row) { var fun = new MFunction(); fun.Order = (int)row[DataConst.P3100601]; fun.SolId = row[DataConst.P3100602] + ""; fun.Action = (EAction)Enum.Parse(typeof(EAction), row[DataConst.P3100604] + ""); fun.Param = row[DataConst.P3100605] + ""; return fun; }
/// <summary> /// /// </summary> /// <param name="fun"></param> /// <param name="cat"></param> public void SaveFunction(MFunction fun, int cat) { _DBE.ReInit(); _DBE.AddTable(DataConst.P3100600); _DBE.AddParam(DataConst.P3100601, fun.Order); _DBE.AddParam(DataConst.P3100602, fun.SolId); _DBE.AddParam(DataConst.P3100603, cat); _DBE.AddParam(DataConst.P3100604, (long)fun.Action); _DBE.AddParam(DataConst.P3100605, fun.Param); _DBE.ExecuteInsert(); }